Thxture alpha channel not working properly

Hi,



I just tried using a texture with an alpha channel for in a tree, so multiple leaves can be on the same polygon, which is faster and it makes the mesh smaller (which makes a download take less long). But I ran into a problem: because of z-buffering, only the topmost texture is drawn, even if that part is fully transparent. This makes holes appear in the textures underneath them, which makes them look weird.



Here’s a screenshot from the scenecomposer to show what I mean. The yellow circle indicates an obvious area where this happens:





I’m using the lighting material with only a diffuse map, useAlpha set to true, and BlendMode set to alpha. The queue bucket is set to transparent. I tried messing around with the settings, but this was the best I could make of it. Is there a way to fix that (I wouldn’t mind having to write my own shaders if nessicary).

http://i.imgur.com/l4Leg.png


First link:
http://hub.jmonkeyengine.org/groups/graphics/forum/topic/z-sort-for-alpha-blending/

Hope it helps.

Thank you. I set the alphaTestFallOff to 0.5 and it now works