Shadow issues while rendering huge forest

Hello,

I’m rendering a massive forest scene in Unreal Engine 5.6 and have run into persistent issues with distant camera views. The primary problems are:

  1. Shadows fading out prematurely at a distance.
  2. Visible pop-in of tree meshes/LODs.

My setup uses Lumen for global illumination and raytracing for shadows. I believe the issue lies in the shadow or virtual texture settings, but my adjustments haven’t fixed it. I’ve experimented with the following console commands to manage shadow cascades and transitions:

r.Shadow.CSM.TransitionScale 0.5

r.Shadow.FadeExponent 2.0

r.Shadow.FadeResolution 256

r.Shadow.Virtual.Enable 1

r.Shadow.Virtual.SMRT.Enable 1

r.Shadow.Virtual.LastCascade 1

r.Shadow.Virtual.TransitionScale 0.3

I would appreciate some clarity on the correct approach to stabilize shadows and eliminate pop-in over long distances.

[Attachment Removed]

Hey there! Thanks for your patience while we’ve been off on our winter break.

If you’re using raytracing for shadows, then none of the settings you mentioned will impact shadows at all. (I’m assuming you’ve either enable raytraced shadows in your project setting, or you’ve set the “Cast Ray Traced Shadows” option on your lights to “Enabled”). If that’s the case, what’s likely happening is that your shadows are cutting off at the same time as the raytracing scene, since it only extends so far out from the camera.

I wouldn’t recommend using raytraced shadows in general. There are other methods that are more performant, higher quality, or both. For example, if you disable raytraced shadows (either at the project level, or at the light level), and you use virtual shadow maps, then you’ll likely see shadows extending out to the horizon. For cascading shadow maps, I included some information about how to work with the various techniques and cascades involved in a YouTube video from a few years ago that’s all still relevant.

But the real right answer for you will depend on what kind of platform or output you’re targeting. Is this for Gen9 consoles? Offline-rendering? Tethered or untethered VR?

[Attachment Removed]