Hello, I am having a severe problem which is slowing down the creation of my main menu scene:
Note how the vertical energy beam in the middle is being incorrectly drawn(violet dust and brown dust on top of it); the sun itself in the middle, if put a little down of where it is will too present alpha draw problems(the dust behind it is draw on top of it). I have been trying and trying to find a way to fix this by myself, and all I found is which objects with alpha textures, near to other objects with alpha texture cause the problem(there may be other causes too). The objects positioning is correct.
I also don’t understand as the scene camera has a decent .far and .near planes, and the objects are not ‘glued’ between them, they have quite a space separating them.
Thanks for any help, if needed I can provide the blend.
I made a new clean blend to test if my old file was corrupted; I did very few things(just made anew the two disc rings, the beam and the sun) but it was enough for me to clearly see which the Alpha Sort and Alpha Blend options are bugged. Will submit a bug report now.
Even an plane with no texture, opaque, set to one of these two options give this result.
First off, make sure alpha sorting is enabled for each object(or does BGE do that automatically? I don’t remember. Maybe there isn’t a setting for it and it’s on by default.). Sometimes, though, alpha sorting on a per-object basis isn’t enough. Individual faces from the same object can still render in the wrong order- transparent faces that are actually behind others will appear in front of them). In that case, you need to enable per-face alpha sorting. That option used to be located in the texture face panel where you would set faces to clip alpha mode, but it may have been moved in recent versions, I haven’t been keeping up.
But the most important thing to remember is this: use ALL triangles for alpha objects. Triangulate all your transparent quads. Last I checked, the BGE sorts alpha tris and quads separately, which leads to incorrect ordering if you use both.
Date: 2012-01-11 10:02
Sender: Brecht Van Lommel
It’s a limitation of the alpha sorting in the game engine. It will happen at two levels, if Alpha Sort is enabled, faces will be sorted inside a mesh, and it also always sorts objects. In this case, it’s not possible to sort the objects in such a way that it can do correct alpha drawing because they mutually overlap each other. The only solution seems to either split the objects into smaller pieces, or to join them into a single mesh.
PS: Joining didn’t worked neither splitting objects into smaller pieces
After quite some time chatting with the bug tracker guys, with no reliable workaround, I think the only way to see this properly working is to fund this patch to be done; hope I can find someone trusty to do it. Wish me luck.