Hello. I’m completely new to using transparency in real time and I don’t know many of the limitations so maybe someone can explain whether I’m experiencing one.
Here I have a magazine, on the left it has opaque blending and on the right I have it set to translucent & with surface forward shading. I’ve tried all the different lighting modes, two sided and not and it keeps rendering over itself. Interestingly the rendering messes up even when I have opacity set to 1 (meaning it should be fully opaque).
Here’s the opacity map if necessary. My shader is very basic. AO, Roughness and metallic in one map without sRGB (sampler type linear color), a diffuse with the opacity in the alpha (sampler type color) and a normal map (sampler type normal).
I’ve even tried putting the same material on just a regular cube, with the same overlapping results. Am I doing something wrong? Or is this a limitation with real time transparency? Can anything be done to make this work?
It’s not a fix for transparency so if anyone has any more info, please post it. Nevertheless I’ve found a solution that works perfectly for me!
Looking at the Material_Experimental example in the content examples I found a material that uses temporal AA to create translucency. Basically it just plugs in a ‘DitherTemporalAA’ node into opacity creating a blend between black and white pixels. This means that the material type can be masked, not translucent. This eliminates all the problems I have and also creates a really nice ‘noisy’ effect on top of that. To get my mask working I just simply plug my mask into the temporal AA node and then plug that into the opacity mask. Here are my results.
What you’re seeing is a depth sorting issue which is indeed due to real time optimizations.
The engine decides whether to render a surface in front or behind something based on the objects bounds.
What you could do in this case is to split the object into multiple actors or use the dithering technique you already found out about.