(RESOLVED) Is Lumen Screen Space/Depth Buffer Global Illumination?

So after seeing the initial “demo” forever ago, and now the release today. I was under the impression that Lumen was a fully dynamic global illumination system. After playing with it for awhile in different environments, I noticed LOTS of pulsing of the bounce light during camera movement, similar to the effect you get around edges with say HBAO+ where if you move the object just off camera, you lose the AO.

Below are some tests I did with it, and by all means it’s an amazing solution regardless, it’s VERY jarring though. Something just out of view gives off no bounce light at all in this scenario.

The environment has a default directional light and skylight. The spotlight in the hallway is a default spotlight that’s 100cm away from the wall that’s 0.5 roughness and pure green.

GI Method is Lumen
Reflections are Lumen
Software ray tracing is set to Global Tracing (Still occurs with Detail Tracing, but with what looks like very small amounts of bounce light)
Shadow map method is Virtual Shadow Maps (with regular shadow maps there is light bleed all over the place)
Using hardware ray tracing when available
Ray traced shadows are on
Static lighting is not allowed
Skin cache is on
And of course mesh distance fields are being generated

9900k @ 5ghz
ASUS Z390-I ROG Strix
Nvidia RTX 3080FE @ stock (driver 466.47)
32GB of 3200mhz Corsair Vengeance LPX

Am I doing something wrong, or is this working as intended? It reminds me a LOT of what Pascal Gilcher does with his ReShade script. I’m not a fan of the flickering you get with camera movement and the pop in/out that occurs when occluding/including the light source.

EDIT/UPDATE: Under the Mesh>LOD0>Build settings, enable Two-Sided Distance Field Generation and the problem is solved. Unsure why this fixes it, but it does.

Spotted this too with emitting materials. The documentation says that Lumen is a mixture of screen space and world space techniques, so perhaps the emissive/bounce part is screen space. Looks fantastic when the camera is positioned right but it can be rather odd looking in movement.

Have you seen anything in the documentation about being able to turn off the screen space part? It’s so abrupt I can’t use it for my project since it’s a mix of indoor/outdoor and it doesn’t work for the indoor sections. While outdoors it works fine, which is great, you can barely notice it in a nicely lit outdoor scene.

You can indeed turn off screen traces. It’s covered in the more technical part of the documentation here

1 Like

Completely missed this post. I just created a thread about basically the same thing where emissive effects disappear base on visibility but that is not always the case.
At least in my case its if the emissive part is part of on object it’ll stop contributing GI when the source is not visible on the screen.

But if I make an object completely emissive the contribution will stay even if I don’t see the source on my screen.

So as an update to this situation, I went through the light settings, the mesh lighting settings and none of them changed any of this. So I went into the Mesh>LOD0>Build settings and found that Two-Sided Distance Field Generation set to ON resolves the issue above. You then no longer need to have the light on screen to have the bounce lighting work as expected. Not sure why this change makes it work better, the performance difference seems to be unnoticeable and since UE5 isn’t finished yet, there is no description for what this option is supposed to do when you mouse over it. I just tried every setting until I found this one and it worked.

If anybody knows why it’s working (on a technical level), please let me know.

1 Like

Lumen traces rays against the distance fields for off-screen geometry, so you need to make sure they are correct. Try using the Lumen debug view modes to check if your distance fields and mesh cards are correct:

While this definitely alleviates the issue it sadly doesn’t make it completely go away. Hopefully for the full release this will be a non issue cause sadly it really ■■■■ noticeable if lit objects suddenly get darker depending on your camera angle.

Especially if you use emissive decals. Those are sadly not at all influenced by the 2 sided distance field solution and behave the same way you outlined in your original post.

You need to ensure first that all your assets are visible on “Lumen scene”. Otherwise they won’t bounce any lightning. And Lumen cuts off Emissive materials aggressively for some reason. But it is tweakable via commands.