Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I was wondering around, searching internet about particle system and fire effects but I haven't found any good answers. On some games I have realized that some sort of movie is being shown as the fire, which is pretty good but not for the fires which are close to the viewer. Please let me know how to make realistic fire and smoke effect in a game. Also if you have a good sample code or good description of how to make these kinds of cool fires please note them too.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

How to create prerendered effect is another question. You can create fires, smoke etc in Autodesk Maya. It has very strong fluid solver (fluids means fire, smoke, nebulas or even fog ...). This can be also putted into sequence of files and played.

For real smoke/fire etc. simulation, you can implement physically correct (or very near to it) fluid solver is based on 3D grid and Navier-Stokes equations - which refers to volumetric rendering. Lots of techniques exists, but to make long story short - it is possible on the gpu - and it is very fast.

Simulation is little harder, but basicly it is computing new values for each voxel based on some settings - Great for gpgpu computing. Volume rendering is that possible with taking lights in scene into account. Using opacity maps, such Fourier opacity maps, which are one of the newest (paper from 2010). Result can be see here (this is volumetric rendering in our engine, with shadows using Fourier opacity maps, number in the left upper corner says number of FFT coefficients):

enter image description here

share|improve this answer

Such effects are done with particle systems. Basically it's a big collection of 2D images that move as a group.

In both cases the individual images have alpha transparency so that they look like blobs instead of squares. For fire the sprites usually have add blend while smoke particles generally don't.

share|improve this answer
    
Thanks, it was helpful. But my consideration was mostly about some sort of pre-rendered frames. –  Green Code May 20 '11 at 14:48
3  
Pre-rendered fire animations are still usually done with particle effects, just a particle effect in a graphics tool and not in the game engine. Or are you asking how to create the individual particle images? –  jhocking May 20 '11 at 14:50

Your Answer

 
discard

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.