Summary
Some materials ignore Opacity Mask in Masked Blend Mode. For example a material copied from an engine built-in material (DefaultSpriteMaterial, the default material for Niagara Sprite Renderer).
What Type of Bug are you experiencing?
Rendering (Graphics / Niagara)
Steps to Reproduce
- Create a blank project in UE 5.8 (I tested it in 5.8.3 and 5.8.4)
- Make a copy of the engine material “DefaultSpriteMaterial” (found under Engine/Niagara/DefaultAssets)
- Set the Blend Mode of the copied material to Masked
- Set Opacity Mask value to 0
Expected Result
Preview mesh should be completely invisible
Observed Result
Preview mesh is fully visible, as if Opacity Mask value were 1.
Affects Versions
5.8
Platform(s)
Windows
Upload an image
Video
Additional Notes
I found this thread that might be related to this issue:
I tried the C++ function written in this thread. While it didn’t fix the problem, I made some interesting observations: the flag “bCanMaskedBeAssumedOpaque” is present and set to true in the faulty material, and if I open the HLSL code of the material, the value of PixelMaterialInputs.OpacityMask is 1.0f (in 4 occurrences within the HLSL code), even though I set it to 0.0f. If I run the fixing function in the above mentioned thread, bCanMaskedBeAssumedOpaque is set to false and the HLSL OpacityMask value becomes correct, but only until I modify anything and click Apply again – then the bCanMaskedBeAssumedOpaque flag gets reset to true and the HLSL OpacityMask value becomes incorrect agian. Even when the HLSL code was right, the preview of the material still hasn’t changed.
Creating an instance of the faulty material, and setting the Blend Mode to Masked solves the problem within the material instance, while the parent material remains faulty.
I also tried playing with Substrate material settings in Project Settings (turning it completely off, changing GBuffer Format, etc.), but no combination seemed to yield results.
