Search Unity

Light probes flicker with multiple draw calls and break with multi-scene at runtime 2018.2

Discussion in 'Global Illumination' started by sbsmith, Aug 6, 2018.

  1. sbsmith

    sbsmith

    Joined:
    Feb 7, 2013
    Posts:
    126
    I have a character controller whose mesh gets drawn in different positions by multiple cameras in a single frame. The character controller has a primary position for the purposes of physics. When Camera A draws, the mesh is moved to Position A. When Camera B draws, the mesh is moved to Position B.

    Positions A and B happen to be within different light probe groups that were loaded at runtime from different scenes. This breaks some of the draw calls.

    multi_draw.png

    Also, probably a different issue, loading scenes with light probe groups at runtime seems to break some light probe groups that were previously loaded. Loading all scenes at the same time does not produce all of these issues (except for the flickering shown below).

    broken_probes.png
    flicker2.gif

    Update: I forgot to say, there are a bunch of assertions

    Code (CSharp):
    1. Assertion failed on expression: 'root1 >= -epsilon || root2 >= -epsilon || root3 >= -epsilon'
     
    Last edited: Aug 6, 2018
    hippocoder likes this.
  2. sbsmith

    sbsmith

    Joined:
    Feb 7, 2013
    Posts:
    126
    I forgot that I made this post. The problem was that I wasn't using enough light probes. Each level was composed of multiple scenes with their own probe groups. Each of these scenes needed to be wrapped in a couple of layers of probes so that when all the vignettes were loaded, none of the probe groups would interfere with each other and no dynamic object would ever appear in the area between groups that would cause it to try to interpolate over great distances. The solution, since there were so many scenes, was to make a tool that would automatically generate probes based on where the player was allowed to walk.
     
    chriscode and JenniferNordwall like this.
  3. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    So the problem is all solved?
     
  4. sbsmith

    sbsmith

    Joined:
    Feb 7, 2013
    Posts:
    126
    I believe so.
     
  5. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    Sweet :) And thank you for getting back to us about what the problem was and how it was solved!