Search Unity

How exactly is DynamicGI.isConverged supposed to work?

Discussion in 'Global Illumination' started by pyjamaslug, Sep 14, 2019.

  1. pyjamaslug


    Jul 5, 2017
    I really hope someone can help me here because this is driving me crazy.
    I have a quite a large world consisting of lots of scenes all loaded at the same time and I am using dynamic lighting with precompute. All the lighting assets are there and eventually it all comes together and looks great. My problem is that the lighting takes a long time to converge and, even though I wait for isConverged to return true before removing the splash screen, the first few rendered frames are wrong (actually it can be a lot of frames).
    When I monitor isConverged every update, I see that actually most of the time it is false, only returning true a small number of times. So what is happening is I catch the first true and remove the splash screen but then it goes back to false on the next frame and rendering looks like crap. Eventually I get another true and things look correct but then it goes right back to false. This time the rendering stays ok, though.

    Maybe it is something I am doing to trigger a recalculation. Between the first isConverged == true and the first render, I instantiate some objects that are carrying lights but why does it even tell me it is converged when clearly it isn't?