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 :(
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
answered Dec 15 '14 at 02:43 PM
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.
answered Dec 15 '14 at 02:47 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here