Z buffer problem?

this is the renderstate i use for transluent objects:

public ZBufferState getAlphaBlendZState()
    if (m_defaultZStateForBlending == null)
      m_defaultZStateForBlending = m_core.getDisplay().getRenderer().createZBufferState();
    return m_defaultZStateForBlending;

this is what i also do:

          final AlphaState l_alphaState = Core.getInstance().getSharedRenderStates().getDefaultAlphaState();

the problem is that the result looks like this:

the green cloud (spider blood) is right in front of the player, but the web (far away) is making the green cloud disappear. any idea what is happening here? how can it prevent the cloud from being drawn?

Might be rendered in the order they are attached to the scene graph.

worth a try i guess: add the zbufferstate to the web as well

how can i fix this? putting all transluent nodes into a single node would completely screw up my scenegraph

the javadoc says transluent node are rendered nearest last. using alpha test on the web (and making it opaque) and alpha blending on the cloud fixes the problem, but i want the web to be transluent.

i'm using jme 1, maybe there's a bug in the render queue?

Have you set render queue mode for all transparent nodes and setup the bounding boxes. The bounds are used in sorting of the transparent queue .

transparentNode.setModelBound(new BoundingBox());

i found the reason: my particles, about 100 "jme-units" in size have a worldbound-size of about 2000-100-3000

it's a simple particlemesh. what could be wrong here?

(after debugging)

some parts of the particlemesh seem to be located at 0/0/0 - maybe the not yet spawned ones?.. known bug? any way to fix it?

interesting, play with setParticlesInWorldCoords(boolean) and report back, else, we should change the code to either disregard the non ALIVE particles when calculating the bounding box or move  all non ALIVE particles to the MarticleGeometries Origin.

the method does not exist (i am using some jme 1.x version). where is the worldbound of a particlemesh calculated? maybe i can fix it. my suggestion would be to ignore all not rendered particles.

fixed it by making 4 hacks at several places tying the hhexen & jme source together in a way that can never be undone. hhexen II will have to be rebuild from scratch. but hey, who cares :smiley:

i like to make clean cuts.

Are you sure it's not just the common problem of particles spawning on creation before the position is set?

that would mean that there are lots of active particles at 0/0/0 which are simply blocked by my terrain, right? one of my hacks filtered out any particles at 0/0/0 ;D