nanite foliage opacity mask problem after 5.4 preview updated to 5.4

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.

Here is the effect on different nanite enabled foliage assets. Note the different distances it appears.


2 Likes

We have the similar issue with modular meshes as well. In distance, meshes are disappearing when the opacity mask is enabled in material.

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.

Got the same problem with nanite and masked material, it’s something in 5.4, in 5.3 all is ok .

Hi !

Same issue in my migrated project - still not fixed in 5.4.1 …

Greg