Particle Textures

To me it looks like a zbuffer issue, like a particle is being drawn closer to the camera first with depth writing enabled.  The blend happens correctly, but subsequent particles fail the depth test and are partially clipped.



Try adding a simple, non-enabled zbufferstate:


ZBufferState zstate = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();
zstate.setEnabled(false);
myParticles.setRenderState(zstate);

I tried that, and it gets rid of the artifacts, but then the particle system is in front of everything. From the side, the rocket flames look okay, but when you pan so that you are following the vehicle from above, the flame is visible on top of the nose cone.



So, I have to figure out a way to get the rocket model in front of the flames. I think. :?



Thanks, now I'm getting close.

aokjoey

Didn't shingoki have a familiar problem in air carrier?



Thats his cue to turn up and help!  Or you could try searching the forums for his posts.

Gentleman Hal said:

Or you could try searching the forums for his posts.


That's what I did and it turns out zbuffering is the answer, but I needed to make it active and adjust the order:


ZBufferState zstate = Main.game.getDisplay().getRenderer().createZBufferState();
zstate.setEnabled(true);
zstate.setFunction(ZBufferState.CF_LEQUAL);
zstate.setWritable(false);



Thanks again to all!
aokjoey