Upon moving to 5.4 any material opacity mask setting for foliage that isn’t a constant 1 causes foliage to disappear when too close to camera. Interestingly this distance is different for different assets that share the same masked material. Note that this arbitrary distance is quite far, making most nanite enabled foliage in a scene appear bare.
Things I have ruled out:
Changing r.Nanite.MaxPixelsPerEdge 0.5
Setting r.Nanite.MaxNodes 200000
after checking stat RHI to get a triangle value
Changing the opacity mask clip value to pretty much anything between 0 and 1, even very small values.
None of these change the amount or distance from the camera that nanite eliminates the material from view. It is always close to the camera that to asset disappears, not far away, and always only appears when nanite is enabled. The material graph does not show the behavior, and what mask is placed into the opacity mask node is irrelevant, any non-constant exhibits the effect.
Curious that yours occur in the distance and what I observe is in the foreground. I thought maybe I was overloading some buffer or other, but if the two are related the behavior is rooted in something else. Did yours occur upon change to 5.4 as well?
It happened when we trying to upload our packs to Unreal Engine 5.4. We also having issues with foliage when nanite is applied. I think newer version’s Masked and Translucency shader is broken.
I wanted to update you on the current status of this issue.
Thank you for pointing out the fix in version 5.4. Unfortunately, it seems that the update to version 5.4.3 has caused this “fix” to stop working. After updating from 5.4.2 to 5.4.3 with the fix, I encountered an error.
I guess thats the same issue then? Recently changed my tree material from using opaque to masked, to use the DitherTemporalAA node for distance fading. Now, from certain distances, there are holes on the mesh. Nanite is enabled on trees. Working in 5.4.3.