2D sprite in a 3D space problem

I’ve been working on a 3D racing game where majority of the graphics are 2D sprites. Either with the block objects or the 3D sprites object and then often using the (but not always) using the billboard behaviour. Looks good and all but for some reason there seems to be a masking issue with them where in certain angles the sprite creates “see through” area around it where transparency is used or just disappears.

So it seems to be a problem with transparencies and masking.

Example image:

Couple video examples of the problem:
https://www.newgrounds.com/dump/item/711fa075fe340053ad286b1836666e60

Anyone know if there is any fix to this?

1 Like

IDK IF THIS IS POSSIBLE
But why dont u just have the player character on its own layer? like theres a invisible player box with the sprite ontop ig? idk

1 Like

Seems like an annoying bug.
Should be addressed by the devs.

1 Like

Because then it wouldn’t react to collission properly. It would look very bizzare going up slops and jumping and what not. And yes I did try it. That was my first idea actually before settling with billboard sprite with a 3D person camera which I would assume is how other games does it too.

Though I guess I could try it again but that would mean I’d need to remake a lot of the code probably

Shoul I make a bug report or something like that on a different forum here about this?

And btw for those who see this. I did notice someone else complained about this (or at least a very similar issue) like last year but that thread didn’t get any eyes on it.

If you think about alpha channel as another color and not as separate thing
Then looking at your screenshot if background behind player wound be fully red then what you see is exact what you should see

Like if we cover all that transparent with red then you should see

So idk if that would be exactly a bug but more like rendering alpha as another color

BUT i cannot deny the fact it does look wrong and is annoying

1 Like

I thought abt my idea some more and i think it would cause a lot of errors

well this glitch is really annoying dont let it discourage you this game looks very cool

1 Like

you can kinda fix this by clipping alpha values under a threshold using javascript.

1 Like

Yeah it would make sense that way. I guess GDevelop thinks of transparent pixels in a sprite in a funky way

If you could show how to do that I can give it a shot. I’ve barely touched Javascript as of now.

Maybe my assumption was not precise enough

I think what is going on its trying to KINDA LIKE consider only ONE transparency at a time when they are layered
SINCE transparency of your player there is overlapping that fence
It tries to favorite that transparency ignoring image of fence at all
Actually now im not even sure if its due mixing transparencies
Or its just due object with transparency overlap another object so that transparency color is taking prority

Well whatever this is technical talk just trying to figure out WAT IS GOING ON

Nothing i wrote will help you solve it so just wait for someone with more knowledge to jump in

1 Like

That at least makes sense in my mind. But what is odd is that it only happens at some angles. Your explanation would probably be very accurate if it would constantly happen.

Works fine here

Doesn’t work when I turn the player a bit to the right

But yeah hopefully someone with more knowledge notices this.

1 Like

If you would draw line on bottom of your fence from left to right
You would see how exactly your player is gutting in into fence itself
I assume its like how much of player needs to be inside fence for it to consider it as priority

Again this is technical blablabla
But you for sure seen that in some 3d games that if you move camera way up or down it will clip trough some object in VERY strange way showing you parts of these objects
Where if you would move camera toward these objects in same distance but in straight line they would look perfectly fine

Whatever i am also curious could any1 solve this

1 Like