View Full Version : Visualize smoke & fire

03-16-2004, 03:35 AM
I am trying to model explosions, through particles.

I need to visualize it, and until now I have used a texture with the GL_POINT_SPRITE_ARB extension along with the following blend function:


This works when I use a dimmed gauss-bell shaped texture, because the particles are added on top of each other.

The case is that I want to let the particles become dark smoke after a while.

How do I do that?

Can I define a 3D texture, and come up with some other blending scheme?

Any suggestions are welcome!

I am not drawing my particles in any particular order, and I would preferebly avoid sorting them.

03-16-2004, 07:32 AM
Use glColor4f() to set the alpha. This alpha is multiplied by the texture alpha just like color, so you can gradually fade them out.

03-17-2004, 11:59 AM

I tried that, and it looks OK when I use a white cloud and fade it out. Looks like good steam!!

I would like to mimic fire, but I find it hard to do because the blending is additive.

I would like to ad yellowish colour in a cloud at the beginning, and fade it to dark black smoke. Is it possible to substract color with a point sprite. Could the colour value fx. be negative ?!?