Material with Opacity Mask flickers when viewed in front of Volumetric Clouds

As per the title, a material with an opacity mask added to a simple plane flickers when viewed in front of volumetric clouds in UE5.0/UE5.1.

Initially noticed this occurring on trees and bushes that use an opacity mask for leaf and twig cards. Created a simple grid material and assigned it to a basic plane to better demonstrate the problem:

https://www.youtube.com/watch?v=hh4njZstkj0

Here’s the texture I created for this test:

https://drive.google.com/file/d/1U555SK3a_MF47TMKeJw6x3Hb1plQwBpo/view?usp=share_link

The issue is not caused by anti-aliasing. The video was recorded with anti-aliasing set to TAA. Setting this to TSR, FXAA or MXAA makes no difference. I even tried the Nvidia DLSS plugin.

The problem seems to occur when volumetric cloud is directly behind the plane. The only workaround was to replace volumetric clouds entirely with a simple skybox, however for the project I’m currently working on this isn’t a solution.

I found this thread on Reddit that describes the same exact issue. Their solution was to purchase the Dynamic Volumetric Sky pack from the Unreal Marketplace, however I’m not entirely sure how this solves the issue or whether it’ll solve the issue on my end. I’ve tried creating my own volumetric cloud material and the flickering occurs regardless.

The problem occurs with the megascan Black Alder tree pack as well, but isn’t as noticeable since the leaf cards are much smaller.

Enabling ‘Dither Opacity Mask’ in the material properties makes this problem even more apparent.

Is there a known solution for this?

1 Like

Sorry I had the video set to Private. It should be viewable now.

Running this console command appears to fix the flickering:

r.VolumetricRenderTarget.Mode 2

2 Likes

Sorry for bringing the post back, but, after restarting the project the issue comes back, what exactly this command does? Is there any way to make it as default on the whole project?

Add it to the level blueprint to Event BeginPlay. As far as I’m aware there’s no project setting to change to make this default.

See the RayMarching Quality Modes section of the docs:

You can add it to your projects ini config file, should probably be in the scalability ini.

1 Like

If you mean the scalability.ini file under \Saved\Config\WindowsEditor i’m not sure if that still works anymore. After adding r.VolumetricRenderTarget.Mode=1 and relaunching the editor, running ‘r.VolumetricRenderTarget.Mode’ returns ‘0’.

No idea where you found this folder but that’s not what I was referring to, it should be DefaultScalability.ini in /ProjectName/Config/

If the file doesn’t exist you can either copy the one (BaseScalability.ini) from the Unreal engine install directory and rename it, or use it as a template, then add the command.