Search Unity

HDRP 5.13 - DynamicGI no longer recomputes reliably

Discussion in 'Graphics Experimental Previews' started by dgoyette, May 16, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,694
    This is a pretty serious regression from 2018.4 + HDRP 4.X moving up to 2019.1 + HDRP 5.13. I've confirmed that this does not occur under a built-in renderer project under 2019.1, so it appears that it's something happening only under HDRP (or maybe under any SRP, I don't know.)

    The short version is that making significant changes to lighting no longer consistently triggers Dynamic GI to recompute. This results in very dark scenes until something (hopefully) gets the Dynamic GI system to recompute properly.

    I've uploaded a video showing how lighting isn't updating. (It's at about 0:25 that Dynamic GI stops updating consistently):


    You can also import the package I've attached to this issue. (Note that after doing so, you might need to change the material assigned to the "Plane" objects in the scene.)

    What follows is the content of the bug report (1155068) I submitted:

    Find the DynamicGITestScene in the attached project and open it. This scene is a simple box with DynamicGI enabled and baked. (You might need to bake it yourself). The scene should have a light in the middle, and due to the Dynamic GI, all surfaces of the inside of the box should be well lit.

    Run the scene, and you can do the following things:
    - Press J to add another light
    - Press K to reload the scene
    - Press L to randomize the position of the lights.

    My expectation is that following any of those operations, Realtime GI should recompute. What I'm actually finding is that Realtime GI doesn't recompute in most cases, leaving the scene extremely dark.

    In the video, things look more or less okay until the 0:26 mark. There I've reloaded the scene, and you can see that despite the same lighting state as when the video started, everything is very dark. I add more lights, move the lights, reload the scene, and nothing gets the lighting to update properly. You'll see me alt-tabbing out of Unity a bunch, because I've found that sometimes returning to Unity after alt-tabbing out will force Unity to update the GI. You'll see that happen at 0:54. (It seems that alt-tabbing away, and staying away for a couple of seconds, triggers GI to update upon returning to Unity.)

    Also note that I'm logging changes to DynamicGI.isConverged. I initially though that maybe Unity was just busy recomputing lighting, but for almost 100% of the time, DynamicGI.isConverged is true. Sometimes you'll see it go to false for exactly 5 frames, before returning to true again, but this does NOT actually result in any lighting changes. When lighting does occasionally update, you'll notice that DynamicGI.isConverged goes to false, and stays that way for many more than 5 frames, before returning to true with actually updated lighting.

    I've tried adjusting DynamicGI settings by setting DynamicGI.updateThreshold to 0, or setting DynamicGI.synchronousMode to true, but neither of these seems to affect the behavior.

    So ultimately, DynamicGI lighting feels very broken under 2019.1, and I don't know how I can force it to update. It appears that DynamicGI lighting recomputes sporadically.
     

    Attached Files:

    Last edited: May 16, 2019
  2. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    267
    I already wrote about similar problem here but silence so far...
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,694
    This is still an issue under HDRP 5.16. It would be very helpful to know whether this is in-fact a bug, or whether I'm just doing something wrong. My lighting is is all messed up because of this, as most of the time there's no dynamic GI contribution.

    Again, a repro project was submitted with FogBugz 1155068.
     
    id0 likes this.