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.
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 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?
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?
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.
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.
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