this is the renderstate i use for transluent objects:
public ZBufferState getAlphaBlendZState()
{
if (m_defaultZStateForBlending == null)
{
m_defaultZStateForBlending = m_core.getDisplay().getRenderer().createZBufferState();
m_defaultZStateForBlending.setEnabled(true);
m_defaultZStateForBlending.setWritable(false);
m_defaultZStateForBlending.setFunction(ZBufferState.CF_LEQUAL);
}
return m_defaultZStateForBlending;
}
this is what i also do:
final AlphaState l_alphaState = Core.getInstance().getSharedRenderStates().getDefaultAlphaState();
p_o.setRenderState(l_alphaState);
p_o.setRenderState(Core.getInstance().getSharedRenderStates().getAlphaBlendZState());
p_o.updateRenderState();
p_o.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);
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?
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?
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
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