i'm newly working with opengl. I'm trying to create a simple program that will simulate fire. My question is what are the ways other than particle effects to simulate fire. And can fire simulation really be done without particle system effect??

  • \$\begingroup\$ Look up fluid dynamics - a few implementations exist that can run in realtime on the GPU. \$\endgroup\$ Dec 1, 2011 at 14:14

1 Answer 1


You could try something like the method described here . Basically, you generate random heat sources (random pixels in a texture for instance), then iterate over the whole texture and compute each pixel as a function taking the nearby ones as arguments.

Let c0 be the color of the current pixel, c1 is at its left, c2 at is right, and c3 and c4 the two at its bottom; c0 color (value) is the result of (c1+c2+c3+c4)/4. Do this for every pixel at every frame, and voilà, you got a (somewhat basic) 2D fire. Feel free to distort the source image to add realism.

Note that the very same technic is usable on 3D as well.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .