Camera weird interaction with Lumen

Hi guys, here’s the problem:

Camera casting shadows depending on distance

Some context:
I’ve tried to increase Lumen View Distance in the post process volume, I’ve tried r.RayTracing.Culling, I’ve tried to increase distance field shadows and cascaded shadow maps in the directional light settings and a few other things but I can’t get this problem fixed.

It’s obviously caused by the camera distance interacting with Lumen but I can’t find a solution.

Does anybody know a trick to fix this problem?
Thank you

Is this scene scaled a lot and you’re exceeding Lumen range? Hard to say from this video how big are those boxes. Worth also checking Lumen Overview View Mode, maybe it will show what’s the issue is.

Yes, this scene is really big and those blocks replace the mountains.

From what I could see there’s like a bounding box around the camera that casts those shadows and there’s a sphere bounding box too which causes to “correctly” apply lumen when you’re nearby the mesh.

I had a look in the Valley Of The Ancient sample and it seems that there’s the same problem even if in the Dark World is more evident.
Probably in dark scenes this problem is more obvious while in brighter ones it’s harder to notice.

So I guess it’s a hard-coded limitation unfortunately.

I’ll give a look in the lumen overview view mode and see what’s happening there and see if I can smooth the issue by tweaking the lighting intensity or other settings I couldn’t think of.

In any case if you find a solution or a workaround let me know.
Thank you so much.

If it’s a box moving with camera then likely it’s Lumen Scene range. After that range it fallbacks to unshadowed skylight, which likely is producing this effect. You either need to reduce scale of your environment, try to match skylight better or try Far Field.

Ok so I came back to the scene and I discovered what it was causing the problem:
basically I had the skydome material “directional light” conflicting with the actual directional light.

For artistic purposes I was not matching the position of the skydome material sun position with the position of the directional light sun.

Just by matching the positions of the two the problem was solved.

This is probably a noob mistake so my advice is to be very careful with every light source you add into your scene while using Lumen since it is pretty unforgiving, paying more attention to “big” light sources such as directional light, skylight, cubemaps, skydome materials etc.

Edit: there is still the same issue on other parts of the scene that’s why I tried to increase the directional light intensity and the problem is much less visible almost solved.
At this point my guess is that Lumen is very sensitive to low light intensity scenes.