I’m seeing some weird behaviour with my translucent material. I have a top down camera (well, technically a bottom up camera) with a 2D, grid based map made up of static mesh instances. I have a single pawn in the level (other than the player pawn that holds the camera) and I have it moving around to various parts of the map. Occasionally, the actor will disappear. If I move the around, the actor will start rendering again. This happens with ortho and perspective cameras.
It took me awhile to figure out the source of the bug, but when I switched my material from Translucent to Masked, the bug went away. Honestly, Masked is what I should have been using in the first place, so I’m fine with making that change, but I’m still bothered that it was happening at all. My material is dirt simple, just a texture going into Emissive Color and Opacity.
Does anyone know why this was occurring or how to fix it?
A bit more messing around and I’ve narrowed it down to a combination of two objects both with translucent on that causes the problem. In other words, if the map tiles and pawn are set to translucent (even if alpha is 1 everywhere) then the bug occurs. If I switch the map tiles to masked and leave the pawn as translucent, the bug is gone.
My guess is that this is something to do with the way the engine is trying to blend objects. I’d love to hear if anyone knows what’s going on here.
Practically all of the translucency problems people post about are due to translucency sorting. Since your game is 2D you’re lucky, you can probably just use translucency sort priority.
I had the exact same issue and this was the perfect solution, as the mechanism is intended to work that way and to be used that way (by taking ownership of the translucency sort priority when needed and not just rely on the engine to figure it out). Thanks so much!