[Bf-committers] fire sim update and design question

Lukas Tönne lukas.toenne at googlemail.com
Wed Feb 10 10:15:27 CET 2010


Hello,

First of all, i started a new site to collect information and
documentation about my fire simulation system:

http://sites.google.com/site/blenderinflames/home

It's been a while since the last update, the reason being some tricky
math problems i had to tackle. I worked on the rendering side of the
system, implementing the important flame turbulence feature. After
several days of trial-and-error and wasting a lot of paper, i managed
to get a fairly good looking, stable and efficient method of
simulating combustion turbulence along the flame curves. Here is a
little test video:

http://vimeo.com/9326339

The remaining tasks on the rendering part would be relatively easy to
implement: coloring tweaks, small scale air turbulence and compositing
to make it look more "energetic", i.e. simulate the
desaturation/overexposure effect of bright flames (white color).
BenDansie seems to have done a great job with the compositing on a
procedural texture basis, i guess this could be useful:
http://blenderartists.org/forum/showthread.php?t=158484
Help is always appreciated!

Now i want to concentrate on the physical simulation part again, since
this is still rough and buggy and prevents me from doing some really
cool demos
I want to set up a couple of test cases, including:

- burning city
   I claim to create an efficient system for large scale fires, so i
guess i have to prove it :D
- moving emitters
   Since i use particles to emit flames, it should be possible to
keep them sticking to the emitter and make flames drag behind (swaying
torch)
- moving reference frame
   Imagine a moving railway cab with a candle: the candle flame will
go up straight, since the air in the cab moves with it. It should be
possible to use the particle parent object for this reference frame.
- force field and collider extremes
   While basically working, the interaction with effectors and
especially colliders needs improvement.

Now there is a design question related to the way flames are rendered.
Currently it works this way:

- An object has a particle system in "Fire" mode (as opposed to
"Emitter" and "Hair"), which generates one permanent and possibly one
buoyant (disconnectedly rising) flame per particle.
- Another dedicated rendering object (most often a simple cube) has a
volumetric material, density, scattering, emission, etc. all set to 0
- A special texture "ParticleFire" is used on that material to add
density and color from flame data. This is pretty similar to the way
point density and voxel data textures work: The texture is explicitly
linked to the emitter object and it's fire particle system.

While it works nicely, imho this system is crude in terms of design:
When having a lot of burning objects (e.g. several houses in the
burning city example), one can only either
- create a render object for each burning object, which means to
duplicate the material and texture over and over again, because they
are linked to just one specific emitter, or
- make a separate fire emitter object with a couple of faces for each
burning object and somehow project these faces on the appropriate
burning objects to make it look like they actually emitted those
flames

Either way it's very ugly and imo a problem with the current particle
system design (before you start shouting, i know particles will be
redesigned some time and there are more important things atm, so this
is just a theoretical question). How about this: Instead using one
object as the owner of the particle system and it's (only!) emitter at
the same time, wouldn't it be better to have particle systems as a
distinct object type (like mesh, light, etc.) and have a list of
objects, which function as emitters for this particle system? Not that
i would want to implement this right now, i would just like hear an
opinion on this (Jahka?).

Regards
phonybone


More information about the Bf-committers mailing list