Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

How exactly is DynamicGI.isConverged supposed to work?

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

  1. pyjamaslug

    pyjamaslug

    Joined:
    Jul 5, 2017
    Posts:
    43
    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?
     
unityunity