Transparent Blending Issue

I’m using a few quads with a transparent and emissive texture mapped onto them for a flame effect from my missiles. It almost works except it seems that there’s a bit of a blending issue when viewing one quad through another. The transparent part shows whatever is beyond the object instead of showing the quad that is directly behind it. I’ve played around with the different alpha settings and tried every permutation, but this was the closest that I could get to correct.







Any input on what I might try to fix this would be greatly appreciated. I’ve tried using both the opaque and transparent render queues.



Here’s the pertenant code in question:




      as2 = DisplaySystem.getDisplaySystem().getRenderer()
      .createAlphaState();
      as2.setBlendEnabled(true);
      as2.setSrcFunction(AlphaState.SB_SRC_ALPHA);
      as2.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);
      
      as2.setTestEnabled(true);
      as2.setTestFunction(AlphaState.TF_GREATER);
      as2.setEnabled(true);
      
      ms2 = DisplaySystem.getDisplaySystem().getRenderer()
      .createMaterialState();
      ms2.setEmissive(new ColorRGBA(75f, 75, 75, 1f));

      exhaust[n].setRenderQueueMode(Renderer.QUEUE_OPAQUE);
      exhaust[n].setLightCombineMode(LightState.OFF);
      exhaust[n].setRenderState(ms2);
      exhaust[n].setRenderState(as2);
      exhaust[n].updateRenderState();
      exhaust[n].setLocalTranslation(engineLocation[n]);
      exhaust[n].setTextureCombineMode(TextureState.OFF);
      exhaust[n].setLocalScale(0.02f);

probably because the quad behind is being z-buffer rejected…

Er, ok. Is there a way for me to fix that?

if the quads are intersecting, the engine might not be able to sort them correctly…in that case you could do with setting a zbufferstate that doesnt write to the zbuffer on them