Containing fire and smoke (performance issues)


I need to contain fire and smoke inside a room. Ideally, i would be able to take apart a particleMesh and put each particle inside a DynamicPhysicsNode and have it collide with the room surfaces.  This does not seem to be very easy. I've tried to just mimic fire and smoke with little red and gray boxes, but i'm going to need tens of thousands of these boxes to generate something that remotely looks like fire. This is a bad solution, esthetically and performancewise.

To sum it up, i need up to a hundred thousand particles, all living their own life, and colliding with the surfaces in a room.

Is there any way to do this in jME (with or without jME physics) without committing performance-suicide?

if not, why? is this a jME problem? or would you encounter this problem with any game engine?

100k particles with surface collisions is going to hammer your performance in most game engines.

Usually you would want many times fewer.

I would think about do you really need that many and why? Do you absolutely need collisions? Can you better fake the effect you are looking for (particles are purely visual effects so how you get the look is largely irrelevant).

A reasonable standard particle fire can be achieved with nowhere near so many. If you need extremely realistic fire then you might need to research or develop a better method for rendering it.

Take a look at FloorInfluence. You can play around with it in the RenParticleEditor. You just might want to add 5 FloorInfluences and set them up as your walls and ceiling.

Thank you for your answers.

Sorry for the late reply.

I've been fiddling around with FloorInfluence. I'm trying to configure the FloorInfluence with roof-coordinates instead of floor-coordinates (0,0,0). I have inverted the plane normal, and set roof-coordinates. However, the floorinfluence still only seem to be working under the floor. I'm calling FloorInfluence like this:

new FloorInfluence(new Vector3f(0,12.5f,0), new Vector3f(0,-1,0);

Still, the influence only works under the floor.

I can't seem to find a mathematical, general description of what's called the plane-constant on the web, but i'm guessing passing the position of where i want the center of the plane to be, and the normal should be correct.

Below is an image showing how FloorInfluence works under the floor when the normal has been inverted.
I want this effect to work in the same way, under the roof, inside a given room.


The problem was related to scaling.