Flickering issue with Landscape Nanite at close camera distances

Hello,

I am writing to report a flickering issue I’m encountering when using Landscape Nanite. Specifically, parts of the landscape that are close to the camera flicker and appear to have holes.

In Figure 1 below, you can see the terrain is being clipped, revealing a static mesh located behind it. Figure 2 shows the scene in Wireframe mode. Figure 3 shows the wireframe view after the Landscape actor has been hidden. If you overlap Figure 2 and Figure 3, you can see their wireframes are identical, proving that what is visible through the terrain is the static mesh behind it.

This issue only occurs in areas close to the camera. Could this be a problem with the culling of Landscape Nanite clusters?

The problem is resolved when I disable the “Enable Nanite” setting for the Landscape.

I also found a forum post describing a nearly identical issue: https://forums.unrealengine.com/t/is-nanite-tessellation-broken-on-terrain-in-5-6/2163989

Thank you for your time and assistance.

[Image Removed]

[Image Removed]

[Image Removed]

재현 방법

Hi,

thanks for reaching out and reporting this issue. I have tried to reproduce what you are seeing on my end, but without success. Would it be possible to create a simple repro project that shows the bug?

Thanks,

Sam

Hello,

Here is some additional information regarding the issue.

Reproduction Steps:

  1. Enable Nanite on the Landscape actor.
  2. In the assigned Material (M_ProcGridFlickering), apply the following settings:
    1. Check “Enable Tessellation”.
    2. Set the “Center” value to 0.0.
    3. Set the “Displacement” input to a constant value of 0.3.
  3. Sculpt the Landscape to create a steep slope or a cliff.
  4. Move the camera near the cliff. The issue will occur intermittently. (Note: It can be observed by starting and stopping the game multiple times.)

Additional Observation:

As you can see in the attached video, the issue appears and disappears when the viewport size is changed.

I am not sure why this phenomenon occurs, especially since the amount of displacement is not large.

Thank you.

[Image Removed]

Hi,

thanks for the repro steps, I could replicate the issue on my end. It looks like this is a bug that has been reported before on the Unreal issue tracker in this ticket: https://issues.unrealengine.com/issue/UE-232188. According to that ticket, there might be two different workarounds:

1. Set the near clip plane to 100 with r.SetNearClipPlane 100

2. Manually set DisplacementMax = 0.0f in NaniteSplit.usf

Can you please try one (or both) of these workarounds to see if that solves the problem?

Thanks,

Sam

Thank you for the reply.

We’ve tested both solutions and confirmed they fix the artifact.

  • r.SetNearClipPlane 100

Unfortunately, this approach isn’t suitable for us. It pushes the near clip plane out, which results in clipping for objects close to the camera.

  • DisplacementMax = 0.f

This works perfectly and doesn’t seem to introduce any new problems. A check with stat GPU also shows no significant performance impact. Our only concern is that this might be affecting the culling process, and we’re worried about potential unforeseen side effects.

Is it safe to use DisplacementMax = 0.f as a temporary workaround?

Also, we noted that a fix is scheduled for version 5.8. Is there any particular complexity that is causing this issue to take a while to be addressed?

Hi,

thanks for trying the workarounds. I found that setting the near clip plane to a lower value (such as 20 instead of 100) still gets rid of the artefacts in my repro scene, while preserving most geometry close to the camera.

I’m not sure if the workaround involving setting the DisplacementMax to 0 is safe, as I believe there may be some side effects related to Nanite tessellation. I can pass this question to someone at Epic with more knowledge of this matter.

Best,

Sam

I’ve set NearClipPlane to 20. Your answer was a great help. Thank you.

Hi, I do not see an inherent issue with this workaround at the moment, so feel free to keep the displacement for now. Do note that Nanite tessellation is still an experimental feature, so I recommend you keep an eye out for any changes we make to the feature in the future. If you have any further questions, please let us know.

I’m the OP for https://forums.unrealengine.com/t/is-nanite-tessellation-broken-on-terrain-in-5-6/2163989/3 and just tested the DisplacementMax = 0 and I now get flickering triangles everywhere in 5.7 preview. I don’t know how this can be called a fix. Are you using 4K resolution ? Because I mentioned in my post that it’s not reproduceable unless you’re on 4K.

UPDATE: Perhaps I should’ve mentioned I’m actually using the nanite displacement. Regardless I don’t think my issue is related to the near plane because the errors appear far beyond the near plane