Godot Version
4.4.stable
Context
So, I have just created a simple 3D test world using Terrain3D and I am doing some tests with 2D sprites in a 3D world. Everything was going alright so far, but then I started to experience some odd problem related to ordering:
My Character3D have Sprite3D node child. When they get close to each other, the rendering order is ok (i.e. render order between Character3Ds with Sprite3D as child).
Then I created some items, those are just Sprite3D, and for some reason the ordering is not ok between Sprite3D and the previously mentioned Character3Ds.
Depending on where my character is relattive to the Sprite3D, one will be drawn on top of the other in unexpected ways.
I have done all kind of tests with offsets and positions and they are all correct, I am sure.
Now, here is the odd most part… I have being using the Sprite3D transparent flag for both my characters and my items, because otherwise they will have a weird black background behind them - no idea why, the original sprites have alpha background. Looking in Godot engine they have all been imported as “DXT5 RGBA8
”… I have no clue if that is the reason for the black background, couldn’t find any info on that. An additional note: all my images are PNGs generated from Inkscape.
If I unflag the “Transparent
” for my Sprite3Ds, then the sorting works as expected but I am left with that black square background behind my sprites.
Question
What should I do here? I would ideally want one of the following solutions:
Is there a way to import the textures in a way that it will preserve the original transparent background without I am having to use the Transparent
flag? Or is there a way to use the Transparent
flag on Sprite3D without messing up with the render order?
Thanks in advance.