# nanite foliage opacity mask problem after 5.4 preview updated to 5.4

**URL:** <https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471>\
**Category:** World Creation\
**Tags:** unreal-engine, Nanite, question\
**Created:** [April 27, 2024, 11:22pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471 "2024-04-27T23:22:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![WpWhite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WpWhite](https://forums.unrealengine.com/u/WpWhite)\
**Post date:** [April 27, 2024, 11:22pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/1 "2024-04-27T23:22:49Z")

</div>

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/3/343af946d84a1dd55bec208ede23212cc20ee303.jpeg)

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/d/cad68093cc93cd1badaa3f089a73331ba277f232.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/8/cc87f8a68cbf5b051cbcf963c3434146d5536700.jpeg)

---

<div class="post-metadata">

**Author:** ![FreshCan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FreshCan](https://forums.unrealengine.com/u/FreshCan)\
**Post date:** [April 28, 2024, 11:21am UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/2 "2024-04-28T11:21:19Z")

</div>

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

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/f/b6fb1b9fe9eeb9cecec40fab93d623de3d21c026.jpeg)

---

<div class="post-metadata">

**Author:** ![WpWhite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WpWhite](https://forums.unrealengine.com/u/WpWhite)\
**Post date:** [April 29, 2024, 9:36am UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/3 "2024-04-29T09:36:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![FreshCan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FreshCan](https://forums.unrealengine.com/u/FreshCan)\
**Post date:** [April 30, 2024, 12:09pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/4 "2024-04-30T12:09:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![icebar0n](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@icebar0n](https://forums.unrealengine.com/u/icebar0n)\
**Post date:** [April 30, 2024, 2:40pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/5 "2024-04-30T14:40:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [May 1, 2024, 7:45pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/6 "2024-05-01T19:45:48Z")

</div>

Hi !

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

Greg

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [June 5, 2024, 8:30am UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/7 "2024-06-05T08:30:38Z")

</div>

Hi again !

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

Thanks !

Greg

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [June 9, 2024, 12:02pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/8 "2024-06-09T12:02:22Z")

</div>

Hi !

Fix available here :  
[https://github.com/EpicGames/UnrealEngine/commit/53e0e97e5ecb4e820b24f0b441cafba99220c485](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

---

<div class="post-metadata">

**Author:** ![Raztalxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raztalxx](https://forums.unrealengine.com/u/Raztalxx)\
**Post date:** [July 18, 2024, 4:44pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/9 "2024-07-18T16:44:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [July 18, 2024, 5:55pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/10 "2024-07-18T17:55:05Z")

</div>

Hi !

I was hoping this fix would be pushed to 5.4.3.

I can’t migrate my project because of this …

EPIC ???

Greg

---

<div class="post-metadata">

**Author:** ![Gamefel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gamefel](https://forums.unrealengine.com/u/Gamefel)\
**Post date:** [July 22, 2024, 1:37pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/11 "2024-07-22T13:37:29Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/9/b09b1bd4a75f8025cc45cf9b719e5853864ccffd.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![Raztalxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raztalxx](https://forums.unrealengine.com/u/Raztalxx)\
**Post date:** [August 13, 2024, 12:57pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/12 "2024-08-13T12:57:25Z")

</div>

Lets hope it will get fixed in 5.5

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [August 28, 2024, 7:11am UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/13 "2024-08-28T07:11:58Z")

</div>

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

Thanks !

Greg

---

<div class="post-metadata">

**Author:** ![Gamefel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gamefel](https://forums.unrealengine.com/u/Gamefel)\
**Post date:** [September 4, 2024, 1:43pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/14 "2024-09-04T13:43:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GrinGenhub](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrinGenhub](https://forums.unrealengine.com/u/GrinGenhub)\
**Post date:** [September 7, 2024, 7:10pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/15 "2024-09-07T19:10:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![A.zoOmika](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/a.zoomika/32/1046344_2.png) [@A.zoOmika](https://forums.unrealengine.com/u/A.zoOmika)\
**Post date:** [September 8, 2024, 2:29pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/16 "2024-09-08T14:29:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Regnelas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Regnelas](https://forums.unrealengine.com/u/Regnelas)\
**Post date:** [September 30, 2024, 6:41pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/17 "2024-09-30T18:41:28Z")

</div>

Hey ! Just found this : [Unreal Engine Issues and Bug Tracker (UE-220040)](https://issues.unrealengine.com/issue/UE-220040)

Seems related and planned for 5.5.

---

<div class="post-metadata">

**Author:** ![WpWhite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WpWhite](https://forums.unrealengine.com/u/WpWhite)\
**Post date:** [January 7, 2025, 2:13am UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/18 "2025-01-07T02:13:35Z")

</div>

I am about to move over to 5.5 let’s see how this goes…

---

<div class="post-metadata">

**Author:** ![CRYOMEN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CRYOMEN](https://forums.unrealengine.com/u/CRYOMEN)\
**Post date:** [April 5, 2025, 1:44pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/19 "2025-04-05T13:44:19Z")

</div>

The issue seems related to this: “Absolute World Position” and “Two Sided Sign” nodes acts weird if used in computation for the Opacity Mask pin, in Nanite.

But the problem still persists in 5.5.4

Any workarounds in this case?

---

<div class="post-metadata">

**Author:** ![CRYOMEN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CRYOMEN](https://forums.unrealengine.com/u/CRYOMEN)\
**Post date:** [April 5, 2025, 1:48pm UTC](https://forums.unrealengine.com/t/nanite-foliage-opacity-mask-problem-after-5-4-preview-updated-to-5-4/1825471/20 "2025-04-05T13:48:53Z")

</div>

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-250357)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.
