Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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??

share|improve this question
Look up fluid dynamics - a few implementations exist that can run in realtime on the GPU. – Jonathan Dickinson Dec 1 '11 at 14:14

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.