Clipmap shadow line when using displacement fade

Hey!

When using displacement fade in addition to a nanite landscape, that has a tesselated material on it, I am getting hard shadow line. I am using virtual shadow maps and from what I can tell, its related to the clipmap-levels.

How can I get rid of this hard shadow line, when using displacement fade?

[Attachment Removed]

Steps to Reproduce
How to reproduce issue for yourself:

  • Create a level with a unreal landscpe (default settings)
  • Enable nanite on landscape and build it
  • Add a material with displacement to it (with a suitable displacement texture asigned to the displacement channel)
  • Enable the displacement fade (Startfade=14, Endfade=8)

How to encounter the issue in the provided repro-project:

  • Open “DisplacementFadeIssue”-level (should be automaticially open when starting the repro-project)
  • Press Play
  • Walking forward/backward a harsh shadow line can be seen on the nanite landscape
    [Attachment Removed]

Hi,

thanks a lot for providing the repro project. I can confirm that the hard shadow edge is related to the clipmap level (the line shows up on the border between two clipmap levels) and only occurs with displacement fade. One way to reduce this is to set r.Shadow.Virtual.ResolutionBiasDirectional to negative values. This doesn’t get rid of the edge, but increases the distance (from the camera at which it occurs. This also increases the shadow resolution, which may have an impact on performance and memory.

I will do some further investigation to see if there are better workarounds for this issue and to find out if this is a bug that needs to be reported. I’ll provide an update soon.

Best,

Sam

[Attachment Removed]

Hi,

I received an update from Epic on this case:

"this is expected for this content as shadows in the fade region get pushed to min displacement (it’s not feasible to match the shadow tessellation pixel for pixel for the receivers in the fade region). Thus if the displacement is moving the geometry too much - as it is here - there can be obvious differences between clipmap levels.

The resolution in this case is that more of the shape of the geometry/silhouette really has to be in the actual underlying geometry, not moved by dynamic displacement. Using the dynamic displacement just for the small up-close details rather than larger changes that significantly push coarse sections of the terrain in/out should minimize issues."

Hope that helps.

Best,

Sam

[Attachment Removed]

Hi,

after further investigation, this does seem to be a limitation or bug, so I have filed a bug report for this. You can find the public link here, to allow you to track its progress.

Thanks,

Sam

[Attachment Removed]