Download

Laggy lighting, what happens here and how to fix?

Hi, In my current project I have recently passed all my moveable lights to static lights and have been using GPU lightmass, it works well, but annoyingly, at runtime, my lighting is a bit “laggy”. To visually explain what I mean please have a look at this gif, more particularly on the floor.
2021-12-31-Laggy-lighting
I am not yet knowledgeable with static lighting, I don’t really know what happens here (note: same behavior for a scene displayed with ‘lighting only’). At first I thought it was a matter of streaming the lightmaps so in World Settings I forced the lightmap textures to ‘Never Stream’, for good measure I also disabled texture streaming in my project settings. None of this has an effect. Can someone please explain what happens here? (Note2: I don’t use ambient occlusion in World Settings. Note3: happens in editor or in a packaged game).
Thanks.

Edit: this effect seems to be caused by the size of my VT lighmap textures (in my project by default I have 4 lightmap virtual textures (two HQ, two LQ) of 16384 x 16384 each … So setting “Maximum Texture Size” to a more reasonable 1024, 2048 or 4096 appears to fix the behavior, at the expense of a significantly reduced lightmap quality of course. So I will actually modify my question a bit:

  1. What are the recommended values as a reasonable sweet spot for lightmap texture size?
  2. The issue being, the next time I build my lighting with GPU lightmass, my settings to reduce texture size in the virtual lightmap textures are gone. Can you suggest a more permanent approach? I can’t seem to find anything in GPU lightmass or anywhere else to pre-define the size of these textures?

Edit2: Actually, the real culprit seems to be the fact that I set excessive lightmap resolutions for my meshes (too many 1024, without thinking this through). Viewmodes > Optimization Viewmodes > Lightmap density shows that my lightmaps are way too dense. By reducing the lightmap resolution of my assets (1024 down to 512 or 256 in many cases), the lightmap density is back to more acceptable values. With lower values for lightmap resolutions, my GPU lightmass build times are significantly lower, and more importantly those visual glitches are largely reduced. Unfortunately with those lower lightmap resolution values, the result is less visually appealing, I hope I can find an acceptable tradeoff … Any comment welcome.