Fire Physics

Hi, I figured I’d start contributing, the current smoke engine in blender 2.62 is basically in it’s baby-steps, maybe because we are using a fluid engine instead of one built for fire and smoke erby the physics are incorrect and lack proper controls.

so, I did a scientific study on fire and it’s interactions and gave a few suggestions on an interface to produce fire with ease and total control (which is what artists want)

here is the results of my studies:

Fire and smoke are effected by 6 different sources.

First of all we must understand what is fire and what is smoke, what makes them different?

What is fire:

Fire is not comprised of physical matter but rather plasma, plasma is created by the process of creating heat from a source through the medium of burning materials, the fire itself is not a gas, fluid or solid but rather sin-waves arching between the edges of the combustible materials, these sin-waves are effected by 6 sources:

1: base heat, the base of the fire can be represented as a colour-mat (an image representing hot and cold sections in a topographical format) with certain sections being hotter than others perpendicular to which the sin-waves run, from the apex of these heat sections vertical sin-waves arise and bend the original horizontal sin-waves which represent the base of the fire. These bends create sharp arching points which may move as the base heat colour mat slowly changes over time as the energy or fuel of the fire is spent in certain locations. The bends in the horizontal sin-wave do 2 things; create apexes of the flames (high points) and create new arching points (low points) which can bend the plasmic emissions from the previous arching points.

the center of the fuel zone or center of the fire is usually the hottest point the hotter the point the more energy it contains and the farther it stretches (to a point) the Horizontal sin-waves (HS-wave) as the intensity of the heat drops and then rises again it creates new arching points at the lower points (above the original base). This produces a basic fire shape bend to the plasma

initially the base sin-waves are visibly flat and run in X and Y horizontal directions (can possible be controlled in 2 ways, wave height and number of waves X number of waves Y). The geometry under the waves is the fire, when effected by HS-Waves the fire can be calculated simply by calculating the internal geometry, if a HS-wave cuts out a portion of the plasma base wave that region is no longer filled, HS-waves are always moving upwards this creates initial motion in the flames. when an HS-wave bends the plasma conside the shape it has created around it as a curvesided cone, if there is more than one HS-wave then at the point where the cones meet the fire creates a low point or bend which contains a polarity.

2: heat waves, like above HS-waves are vertically oriented sin-waves that emit from the entire base mat of the fire the rate at which they ripple depends on the intensity of the heat at their emission location, these sin-waves bend the plasma additionally to the basic shape in accordance with it’s outside edge to create extra flickering points and bend the edges of the flames as they go up, the flickering points are created when the heatwave stretches beyond a valid curve of the HS-wave. The stronger the heat; the smaller the ripples in the sin-wave, the lower the heat the larger the ripples in the sin-wave.

3: air pocket temperature, when the plasma’s edge touches a warm or hot pocket of air the edge will bend (side) or curl (tip)towards the warm pocket, when the plasma’s edge comes near a pocket or current of air that is cold it will bend (edge) or curl (tip) away from said pocket if the cold pocket moves through and severs the HS-wave of a section completely it will create a temporary gap between the tip of that arch and it’s base, splitting the fire. The cold and hot pockets of air can be best represented as 3 intersecting heat maps (images), 1X, 1Y and 1Z which can then calculate a air pocket volume.

4: air pocket density, although similar the cold and hot air pockets the interactions of air density are slightly different, a dense volume of air will deter plasma from arching in that direction completely whether it is hot or cold it creates friction on the plasma, a volume of air with very little density is easily permeated by the arching plasma giving very little or no resistance at all. This is best represented as 3 intersecting density maps 1x, 1y and 1z.

5: air currents from moving objects, though the heat/cold air from an object does have some fall-off due to air density, while the hot/warm or cold current coming off a moving object passes by a fire the trajectory of that wind and it’s temperature will have direct effects on the plasma as with air temperature plasma flees from cold and pulls towards warm and hot, however plasma from a fire will always move with a moving air current as if it were a flag in said wind, this wind creates a sin-wave that will effect the whole flame which travels at a trajectory from the center of the hottest base points parallel to the motion of the object, if the object is warm or hot the plasma will arch slightly towards the object breaking the parallel angle, if it is cold the plasma will arch slightly away from the object.

6: Force interaction, plasma cannot permeate electromagnetism at any time, plasma can be bent by the polarities of both electricity (plasma’s fast, strict and stringy cousin which it will arch towards and away from if given the chance based upon the polarity of the electrical source and it’s proximity to the positive and negative arching points of the plasma) and magnetism (from which strangely plasma flees if the magnetic current contains more energy than the sin-wave of the flame)

if there is no magnetism (gravity) or if the fire base is in the shape of a ball with magnetism inside, flames can emit in all directions simultaneously, in order to best simulate a ball of fire the original base sin-waves should already be bent softly into a spherical shape from which HS-waves and heat waves can emit in all directions.

flame colour: flame can be a wide array of colours most distinctively this is based on the colour-heat spectrum; white flame is cold enough to be touched by the human hand without any adverse effects, white flame is only present where blue flame occurs because blue flame is absorbing all the energy and fuel leaving a hollow white plasma inside, blue flame is the hottest possible flame. Green flames happen when chemicals from plastics or certain gasses are burnt the reason being is the toxic chemical is extremely reactive to heat and will flee from it as fast as possible, this energizes the plasma as it travels trough it creating a non-polarity based colour.

So white is the lowest heat; white<yellow<orange<red<violet<purple<blue
and >green<

this is plasma’s natural colour spectrum. Though through a custom colour spectrum other colours may be achievable. (I suggest displaying a default color spectrum and allow the user to edit each increment of this spectrum via colorband.)

Plasma never mixes colours, each colour is distinctly separated.

Flame energy fall’s off becoming weaker as it travels, this causes a change in colour outside of a certain distance away from the fuel, based of coarse on the temperature and density of the air and the amount of original energy, the colours are based on the colour spectrum of the fire as the fire’s energy falls off the colour changes will happen in closer colour-bands. After the white and sometimes paper-thin colour-band the plasma ceases to hold enough energy to emit light but creates a light-bending and waste filled set of heat waves called smoke. But we will get into that in greater detail later.

A sun: a sun is not just a ball of plasma, but rather a ball of burning gasses, the gasses used and their quantity determine the colour of the plasma, it is actually mainly the quantity that determines colour of a star because more quantity = more gravity= more compression = faster burning= more energy.

The smaller a star the weaker the flames such as the white and red dwarfs a red dwarf usually contains black, used non-burnable gas that gives of a red glow and a few red flames, a white dwarf contains slightly less quantity of gasses than a yellow star, though stars also contain billions of nuclear explosions which in fact actually spawn the plasma and give off flares of flame off the main mass.

On the surface of the sun this can be represented as a series of small cloudy eruptions, as these eruptions conflict flaming gaseous and possibly forked strands are emitted in flares from lines in between the many explosions, theses flares may bend or wrap around the star’s gravitational pull in any direction before they exit it’s domain being effected (bent and expanded) by other explosions as they travel.

Fire can easily be conformed to any shape by manner of simple deflection by a non-fuel material.

Fire can also be bent by fuel materials as it wraps around their geometry violently consuming their solid energies.

The physics of a nuclear explosion; an atom has a neutron(electromagnetic force-bond), some protons(magnetism=to the polarity of the hemisphere in that location) and some electrons (electricity), a nuclear explosion happens when the neutron is split in half, at which point there is a massive electromagnetic disruption caused by the splitting of the electromagnetic force bond present in the neutron this creates a lot of light then the light and energy implode at which point both halves of the neutron violently tare apart from each other as the polarities of the two halves reject the presence of the other half leaving a giant flaming pillar stretched between the 2 halves and exploding towards multiple random sides in quick small explosions as they hit other particles in their current trajectory, in short the electricity and the electrical half of the neutron will always rush towards the nearest and strongest magnetic source (AKA earth’s core if a planetary explosion) meanwhile the protons and the magnetic half of the neutron create a hemispherical and equal polarity to the earth’s core causing them to be pushed violently in the opposite direction until they reach a distance from the core where their energy is more than the core’s energy fall-off at which point a giant ring of connected but dispersing protons will explode parallel to earth’s core riddled with rolling flames in a torus, if not a planetary explosion the electrons on the other side will do the same effect. But instead of 2 toruses you will achieve two bowl shapes.

Aurora Borealis: this event occurs due to 2 conditions; 1, fuel for flames is ignited by electromagnetism, and 2, plasma cannot permeate electromagnetism, in short the fuel hits the wavering electromagnetic barrier at one of the poles where it is emitted from the earth’s core, the gas becomes trapped in the cone shaped space and burns with only one axis instead of 3 like fire due to a lack of atmosphere, upon burning the plasma hits the electromagnetic field and it and it’s fuel cease to be able to permeate the field at which point they move and waver with the field until they get free of the cone and drift off OR until they are burnt completely and no longer capable of being a fuel source, at which point the plasma stops and the remains fall as dust to the surface. It’s colour is based upon fuel composition, the colour may change as the fuel composition changes or gets replaced by new coming gas

Smoke; smoke is plasma that no longer has energy, whereby it does not glow and yet still bends light, smoke is more physical than fire in that it’s primary composition is the particles of waste gas left over from the burning.

Smoke is effected by air temperature pockets and air density pockets as well as moving air and objects, smoke dilutes slowly into the air as it cools eventually becoming colourless and transparent although the heat waves may still carry-on beyond this point.

Smoke is not a plasma but a combination of spent plasma and gas, it should have basic fire physics but also the ability to ‘plume’ or expand as it encounters air pockets.

smoke colour is usually grey, black or white, rarely in chemistry green, blue and other colour smokes can be created based upon the soot content, therefore smoke’s colour cannot be inherited from physics and should be subject to the material, reflection and emission colours.

Smoke colours mix if the gas densities are compatible.

Smoke can’t permeate electromagnetism, it is not disturbed by electricity but will naturally and slowly flow towards a strong magnet.

Smoke can conform to nearly any shape once it fills a space, smoke will travel in all directions if gravity is not present.

for fire, we need to define objects as various things:

Fuel: for fuel enabled objects I suggest a numerical input for;
Energy 0.001 to 10.000 (the energy supplied to the fire from this object)
Flam (flammability): %0-100 (the speed at which the object catches fire and combusts, 100% is instant upon contact, 0% is not at all)
Time: frame # to Frame # (enter nothing for infinite burning, define the frames during which the material is combustible)

Domain: for a domain object;
Temperature map: X:(Texture/ image here) Y(Texture/ image here) Z(Texture/ image here)
Density map: X(Texture/ image here) Y(Texture/ image here) Z(Texture/ image here)

Input: the surface from which the fire will emit
Base Heat map: (Texture/ image here) Or Geometry (the geometry will be considered as fuel that is burning)

Out take: an object that removes fire geometry from the scene.

Obstacle: an object which deflects the fire;
Percent: 0-100

any questions? I’ll be happy to answer/ discuss.

Air, fire, smoke are governed by the laws of fluid- & thermodynamics. Blender can simulate fluid dynamics but can not (yet?) simulate thermodynamics (like Maya or Houdini does). Thus you need to fake that to get realistic fire.

But to be honest it’s way simpler to get ok-looking fire in Blender than in Maya or Houdini anyway… ;D

correct, though a fluid system has limited control of fire or smoke for that matter, also I will note that blender’s fluid system itself is little more than a splash simulator that still has yet to be perfected, which is great in it’s own regard, but I’ve found I can make more realistic acting pools/ rivers of water with a soft body mesh.

this is why I posted the lame-mans explanation of fire, to see if we could possibly make a better fire and smoke generator.

this is why I posted the lame-mans explanation of fire, to see if we could possibly make a better fire and smoke generator.

Well, I would love to see this happen, but I am only beginning python, and am more focused on the art side of blender. However, if there is anything I can to do help Blender see a good smoke/fire sim I am more than happy to help!

thing is, I know physics, but I don’t know scripting or how to develop new features for blender or edit existing ones for that matter… I tried looking through the source of blender before but all the physics stuff and GUI buttons are not part of the source at least not that I have seen.

Perhaps you could find a good coder that does not do this because of his lack of physics knowledge?

Sorry I have little knowledge of coding, or I would totally help.

I wish the simulations could get some GSOC love!

Hey josex,

Very big thanks for sharing what fire should be physically about, it is nice to read some scientifically founded material (I, myself, enjoyed every single line of what you wrote)! Unfortunately though, I think you are in the same position as hundreds (and by now I guess thousands, including me) of us find ourselves in … knowing how it should look like but not really knowing how to actually code it to make it look that way!

Are you willing to take the challenge? Than I think you should start learning C, the language Blender was written in. If you get that, you can promote to python to implement your “Physical” ideas;

I can only wish you good luck and don’t hesitate to ask us your most pranging questions!


thanks!, I actually just got an e-book a few days back on python and blender scripting, I hope to be able to give it a good study next month, as soon as I figure out how to write a new feature I can supply the math.

and jonathan, I’ll give that link a good look as soon as I find some time. thanks muchly!

If you want to know how fire behaves you might want to look into the Navier-Stokes equations:

And here is a great article on a cheap faked fluid and fire simulation from Intel: