Z-Buffer problems with paper2D sprites using Translucent material

If I set all my sprite materials to MaskedUnlit… then everything is fine; but I don’t want to lose the smooth antialiazed borders of my sprites I imported from PNGs.

When I use TranslucentUnlit materials then the sprites rendering order become buggy and unstable. See the images attached. The character is at y=0 while the yellow bar is far away y=-100, anyway the zbuffer problem occurs at random positions.

The black dotes eyes of the character are sprites and I am forced to make them Masked because with Translucent they almost never show up in front :frowning:

How can I fix this if possible?







Happily, I have found a solution that works perfectly. The magic property is: “Translucency Sort Priority” located at “Rendering” in actor details. Is an integer 0 by default, When you put lower values (-1, -5,…) this translucent actor are rendered first, with higher values they are rendered last. You can think of it as Layers. By default everyone is at layer 0.

This should work only for actors with translucent materials. I think for opaque and masked materials z-buffer technique will rule and Translucency Priority is ignored (My guessing)

This is the answer where I found the solution after a deeper research: https://answers.unrealengine.com/questions/143785/2d-25d-with-mix-of-3d-rendering-transparency-issue.html

Wow I just found an answer from yourself @Eric Ketchum and posted the solution here a minute before! :slight_smile:
Thank you very much, the Translucency Sort Priority property save my life!

Hey piXelicidio -

This issue is related to how the engine derives translucent Z order for 3D meshes, but there is actually a simple work around which will allow you to control the Z sort directly. You can go into the details panel of your sprites and under Rendering >> advanced roll out >> Translucent Sort Order. This value is 0 by default setting it to a higher number will make the high number render on top of the lower numbers. So your far background may be 0 while you near background may be 1 and the foreground 2 and the player’s sprite 3.

Thank You

Eric Ketchum

One thing I like to do is use a certain blueprint snippet in the construction script to manually set the translucent sort priority depending on where you place the transparent object in the level.
This will save you TONS of work!

Is there a way to set the Sort Priority with particle effects?