[SOLVED] Particles rendered from behind a wall :(


Now it’s time to play with particles n_n

Basic, but first decent result:

Yay! Lovely particles n_n

Ok, now we can suppose this post is related to a question :slight_smile:

Look at the “fountain” from behind:

Woa. Water from chernobyl, you can see it through walls…

I thought all I needed was a bounding box:

      Box wallBox = new Box("wall", new Vector3f(), new Vector3f(0.5f, 2,
      StaticPhysicsNode wall = getPhysicsSpace().createStaticNode();

      wall.setModelBound(new BoundingBox());

The same has been made for the particle system:

      particles.setModelBound(new BoundingBox());

-> Now I feel ModelBounds are not meant to that kind of end... they're for picking purpose so?

Not yet feeling easy with rendering, I felt this would perhaps help:



but no, it doesn't :(

Hmm, please help before it starts looking like a Sorcerer's Apprentice clone, jME version ;)

the particles need a zbufferstate

Ah thanks, that's the solution n_n

      ZBufferState zstate = display.getRenderer().createZBufferState();

But! The answer brings a new question...

The counts show the engine still creates the particles, even if they are not visible... any idea why that could be?


They are drawn as long as they are in the camera's frustum…  even if they would be obscured by something.

Ok thanks for that!

  • This has just made me understand frustum!



clearly shows that the particle are not rendered anymore as they leave the camera scope - Framerate improves and counts are back to few.

:D Thanks all!
even if they would be obscured by something.

Has anyone worked on occlusion culling??

I could probably handle something like that if not. ;)

I think it would be a decent addition to jME

yeah, momoko_fan did.  You should be able to find it on the forums