View Full Version : Smoke effect

12-12-2003, 06:47 AM
I display smoke by solving CFD equation.
After I get temperature, density and
speed, how can I render smoke using OpenGL?
Thanks for help.

12-12-2003, 08:32 AM

12-12-2003, 10:31 AM
Thanks. Actually, I have been reading his
papers for a while which are more about
solvers not rendering. Does anyone have
some example code OpenGL code for rendering?

12-12-2003, 11:46 AM
Google particle system.

12-13-2003, 03:54 AM
Store the result of your simulation in a texture. If your simulation is 2d you can then just render this texture mapped on a single quad onto the screen with blending enabled. If the sim is 3d you upload the smoke voxels as a 3d texture and render a stack of quads aligned with the camera on top of eachother with blending enabled and the texture mapped to get basic volume visualisation going. ATI has an example program that does this on their dev site called "VolViz" or something similar.