Keep transparency in material without Translucency?

Dear experts,

I created a transparent .tga file and imported it in Unreal as a texture. It looks good and the parts I want transparent are transparent:

I struggled a bit when creating a material using that texture and keeping the transparency. I finally came up with this. The result node however
is set to Masked and Transluscent:

I read once that blend mode “Transluscent” should be avoided if possible since it is expensive and bad for the performance.
Also I am planning to use that material in Niagara in a “Sprite renderer”. It works, I am just concerned about performance:

Is there a different way to create the material and better for the performance?

Thank you,

It can only be one or the other, not both. “Decal blend mode” doesn’t do anything unless your material domain is set to deferred decal, which yours is not, hence why it is grayed out.

Masked and translucent? Schrodinger’s blend mode!

If you need transparency, you should turn on transparency.

EVERYTHING has a performance cost. Your job is not to “avoid all performance costs;” your job is to “use the performance costs you choose, artfully, to deliver a good experience to the player.”

I use transparency all the time for particles. That’s a very common case where it’s useful. You’ll probably want to avoid putting the camera and particle size such that there are 100 full-screen transparent particles, but the fact that some smoke in the distance uses transparency, is not a problem in practice.

Thank you for the explanation, I thought greyed out means active but not editable. I will pay more attention to this now.

something new every day! I might apply to the university in Vienna :slight_smile:

Thank you for the heads up, I will keep that in mind.

This might be a silly question, but why exactly is masked and translucent not possible in UE4? Or why can you have only one, and not both at the same time? It´s possible in normal 3D Programs like Cinema 4D. There you can apply a black and white mask to make certain parts completely invisible for everything, while the parts, that stay visible can be transparent/translucent, even with refraction, colors, caustics and all that stuff, that comes with good transparency.

Here is an example of how it looks, left the rectangular plane, right the result with both mask and transparency. Notice the mountains and tree line replacement from the refraction.

This is perfectly achievable within UE4 but this would be a translucent material with a mask in it, not a “masked and translucent” material.

Not a graphics programmer so take this with a grain of salt, but my understanding is “masked” materials are essentially opaque in the visible areas and so nothing behind them is rendered, as a result you can’t change the opacity because there would be nothing to show.

Because it does exist, under the standard translucent blend mode, blend mode only controls how its, well, blended, just attach a round to transparency and clamp it, or any other method of getting a value between 0 and 1, the reason its not in the blend modes is because, you can’t have something be blended 2 different ways at the same time, you have over 250 comments already, you should know this stuff.

True, but i was always a little bit disappointed by the limitations, that came with the translucent mode, especially with RTX. Maybe they should already create a new mode for RTX only, and then with a switch for cinematic aka i-don´t-care-about-performance ^.^

That would make sense, thanks :slight_smile:

You can easily enable and disable ray traced translucency.

About masked, the mate told you. But you also asked about creating a masked translucent material: yes, it’s possible, but it will be a translucent material where some areas are 0% opaque. The rest or areas would be translucent. For a masked material, some areas would have 0% opacity and the others would 100%.


I know, but until now, it´s just to incomplete and does not work very with raytraced reflections either way (the feature, i am mainly interested in, besides transparent and/or semi-transparent stuff).

“masked” means that the Z buffer can be written by the material, which in turn means that other kinds of tests/optimizations will kick in.

If you do any bit as “translucent” then then rendering pipeline needs to be configured differently (either Z sort, or turn off depth writes) so there’s no particular benefit (to the renderer) from a “masked and translucent both” material mode. Thus, if you want variable opacity, just put in 0 in the alpha channel in a translucent material, for the areas you want to mask out.

Custom rendering engines may do tricks with stencil or pre-pass, where they mask in one pass, and render/blend in the second pass, but this does not work well with general-purpose, “realistic lighting” type approaches, such as used by Unreal.