Important Renderer.QUEUE_TRANSPARENT issue ? [VIDEO]


I’ve tried some Renderer.QUEUE_TRANSPARENT rendering with JME and I’ve found something that looks like a problem:

I’ve constructed a little scene with two spheres, one has a transparent texture on it. The second is solid.

Blendstates, zbuffers have been setup and culling is disabled.

The two spheres are sligtly overlapping.

Flying around the first sphere I’m able to see the second one, but it desappears in some cases.

See the video here:

For me this is an unexpected behavior. Is it my fault ?

Ahem… please moderators don’t keep ignoring my posts  :cry:

This issue may be related to this :

I can confirm that problem, happens also to me now…

Although, if I set that not transparent object (in this example, smaller sphere) uses Opaque queue, everything looks fine, except when I updateRenderState(), things start messing up again (inner part of the object gets unusual color and cannot be seen good anymore…).

Has anyone played with this and maybe got some clue of what could be the problem here?

Did you put both spheres in the transparent queue ?

Post the small example so other can easily reproduce it.


the project was built with the SceneWorker. As far as I remember the spheres were both in the transparent queue. Maybe InShadow has some code for our tests. If not, I'll try to replicate it by myself.


My code is highly integrated in my project, so I can't really post this here, but will make some example and post it later…

Ok, here is the code. I make some Text3D and surround it with transparent sphere. If I set that whole rootNode or at least node that has both those children attached to use transparent queue, this glitch occurs (when moving camera). If I set manually for each object which render queue to use, it is working fine.

import java.awt.Font;

import com.jme.light.DirectionalLight;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.renderer.Renderer;
import com.jme.scene.shape.Sphere;
import com.jme.scene.state.BlendState;
import com.jme.scene.state.CullState;
import com.jme.scene.state.LightState;
import com.jme.scene.state.MaterialState;
import com.jme.scene.state.ZBufferState;
import com.jme.scene.state.MaterialState.ColorMaterial;
import com.jme.system.DisplaySystem;
import com.jmex.font3d.Font3D;
import com.jmex.font3d.Text3D;
import com.jmex.font3d.effects.Font3DBorder;
import com.jmex.font3d.effects.Font3DGradient;

public final class TransparentQueueTest extends SimpleGame {
   public static void main(String[] args) {
      TransparentQueueTest app = new TransparentQueueTest();

   protected void simpleInitGame() {
      display.setTitle("Transparent Queue Test");
      MaterialState ms = DisplaySystem.getDisplaySystem().getRenderer().createMaterialState();
      Font3D myfont = new Font3D(new Font("SansSerif", Font.PLAIN, 2), 0.001f, true, true, true);
      Font3DGradient fontGradient = new Font3DGradient(Vector3f.UNIT_Y,,;
      Font3DBorder fontBorder = new Font3DBorder(0.01f, ColorRGBA.white.clone(),, myfont);
      Text3D mytext = myfont.createText("S", 1, 0);
      float tf = -5f * mytext.getWidth();
      mytext.setLocalTranslation(new Vector3f(tf, tf, 0));
      mytext.setLocalScale(new Vector3f(10, 10, 2.5f));
      Sphere sphere = new Sphere("Spawn Sphere", 40, 40, 6.8f);
      ColorRGBA sphereColor = ColorRGBA.white.clone();
      sphereColor.a = 0.25f;
   private void setRenderStates()
      DirectionalLight dr = new DirectionalLight();
      dr.setAmbient(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
      dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
      dr.setSpecular(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
      dr.setDirection(new Vector3f(-1, -1, 1));
      LightState lightState = DisplaySystem.getDisplaySystem().getRenderer().createLightState();
      BlendState blendState = DisplaySystem.getDisplaySystem().getRenderer().createBlendState();
      CullState cs = DisplaySystem.getDisplaySystem().getRenderer().createCullState();
        ZBufferState buf = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();