Molehill +backface culling + transparency = suicide é_è

Hi there!

I’m kind of desperate so I try my chance here :ne:.

I’m new in 3D stuff and even more with molehill and i’m stuck on a weird problem.
I’m using this nice engine :

I adapted it a bit to get this :
http://bit.ly/qYN5sr

It works well, except that there are rendering problems with the transparent cubes.
It does something like this :

Basically it hides the faces of the same chunk behind it but not the faces of the other chunks behind.
And if we put the camera at the oposite of the same cube then the problem isn’t as bad. But still, we don’t have the top face of the cube under it (although the vertices/indices of this face are sent to the GPU for drawing) :

I tried to play with setCulling, setDepthTest and setBlendFactors but had no good result :(…
Before some updates to get progressive loading of the chunks depending on the camera’s angle there already was a problem but less important. The top face of the under cube was displayed corectly but looking throught the transparent cube was revealing problems anyway :

And, of course, i have no idea what could be the source of that in what i changed :(.

Does anyone have any idea where the problem could come from.?
I’m not even sure it’s a back face culling mistake but that’s the only thing i see.

In case anyone would like to get an eye on the sources, here they are :
http://bit.ly/pksUiZ

Basically the Main class uses the VoxelsManager to instanciate/update the chunks. Each chunk has a VoxelData defining its geometry based on the Map data.
So the fact that a face geometry is created or not depending of the neighbors is done on the VoxelData.

If you have any question, or if anything isn’t clear on my explanations, let me know :slight_smile:

Thanks