8

I searched the internet for information about particle systems and fire effects but I haven't found any good answers.

Some games have some sort of movie shown as the fire, which is pretty good, but not for fires which are close to the viewer.

How can I make realistic fire and smoke effects in a game? I am looking for good sample code or descriptions how to do this.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Amir Zadeh
  • 3,481
  • 2
  • 26
  • 47

3 Answers3

5

If you really want to get started on the simulation of fluid like effects (which actually include smoke and fire) then have a look at Jos Stam's excellent "stable fluids" paper. It is perhaps mathematically somewhat involved if you're not familiar with the terrain. But if you get past the equations (this might help), it's not that hard. And there are plenty of implementations available.

Just Google "Stable Fluids" :) Perhaps not an actual particle system, but great fun nonetheless.

Bart
  • 19,692
  • 7
  • 68
  • 77
1

While I do not have the knowledge to provide an answer myself, I can provide a lead for you: http://sourceforge.net/projects/real-time-fire/

The goal of this project is to create a fast generator of a volumetric fire animation. The generator uses a short precomputed sequence to produce an endless animation. Packages real-time-fire2.0 and higher contain additionally a heat haze.

Seidr
  • 4,946
  • 3
  • 27
  • 39
  • Thanks, it looked cool but wasn't real enough ;). – Amir Zadeh May 20 '11 at 13:37
  • 2
    @Green Code: Rendering really good looking fire is still a serious problem. Even in offline renderings it still doesn't look perfect yet. You've probably seen "Avatar", and in the night scene, where the protagonist makes a makeshift torch, the fire of that can be clearly told as being CGI. – datenwolf May 20 '11 at 14:37
  • @datenwolf: What do you mean by CGI? – Amir Zadeh May 20 '11 at 15:43
  • @Green Code: Computer Generated Imagery – Bart May 20 '11 at 15:43
1

I would suggest searching for the source code of some games that require the use of a particle system.

If you can't find them, there's always Wikipedia for some basic knowledge. This might not be enough though.

lesderid
  • 3,388
  • 8
  • 39
  • 65