#Why 2.5D Character sprite appear below VFX

1 messages · Page 1 of 1 (latest)

quiet rapids
#

Hi everyone !

I am trying to know why does my character appear below the VFX shield and the VFX on the ground (magic circle) ?

For the 2.5D character I am using a AnimatedSprite3D and the VFXs are MeshInstance3D with some shaders applied to them.

If anyone know about, can you help 😕 ?

I can provide any details if asked 😀

Thanks !

cunning oriole
quiet rapids
cunning oriole
# quiet rapids That's right, I'll try to play on these for a bit

Well, the thing is that sorting gets handled really different depending on that setting. When the meshes you're rendering are only fully transparent or fully opaque, draw order doesn't really matter. For every fragment the shader can just check what distance the mesh fefore it had on that pixel and if it's closer, overwrite it. Since the only mesh affecting the resulting color is the one closest to the camera, all the others don't really matter (which is also why there are methods like deferred rendering and depth prepass to reduce it to only that closest one).
But when using alpha blending, as the name implies, it require blending of the texture with what got rendered before it, so render order matters. And Since Meshes are renderen in one piece, you are limited to sorting them. So meshes can also either be fully in front or behind eachother, not in front at one part and behind at another. It's really similar to y-sorting in 2D, but instead of sorting by the y-position of the nodes origin, you sort by the distance of the nodes origin to the camera. And that's the important part: the only thing that matters is the origin. the size of the mesh, how its angled, all that doesn't matter.

cunning oriole