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

Hi again !

It’s still broken for me in 5.4.2. What about you ?

Thanks !

Greg

Hi !

Fix available here :
https://github.com/EpicGames/UnrealEngine/commit/53e0e97e5ecb4e820b24f0b441cafba99220c485

You’ll need to update the shader manually though as it was not deployed in release.

Regards,
Greg

Hi everyone,

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 hope this will be resolved soon.

Hi !

I was hoping this fix would be pushed to 5.4.3.

I can’t migrate my project because of this …

EPIC ???

Greg

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.

Lets hope it will get fixed in 5.5

Still not fixed in 5.4.4 … Can someone confirm the same ?

Thanks !

Greg

Also having the same problem with holes in my trees in 5.4.4.

Have same issue but on assets like torn flags or other fabric-made things which use masked shader… Still waiting for the fix:(

I may be wrong, but after the last update, I began to notice even more “holes” on different objects.

Hey ! Just found this : Unreal Engine Issues and Bug Tracker (UE-220040)

Seems related and planned for 5.5.