Making fire with Terranim8or      


While waiting for plug-in support in Anim8or, Terranim8or version 5.4 brought the capability of making easy fire animations in Anim8or. The fire is based on particles, or "fire atoms". They are generated at the bottom, have an ascending movement while cooling and changing their color, then vanish. Like in any particle animation, more particles make a more convincing effect, but use more computer resources. For a more convincing visual effect, avoid a close look with the camera to the fire. As there is no lighting effect used, the fire is equally good for day and night scenes.

Making a fire animation with Anim8or using Terranim8or is a two steps process: 
- Creating the fire animation in Terranim8or
- Placing the fire in the desired position in the Anim8or scene and optionally, customizing the colors

Creating the fire animation
In Terranim8or, click "Add To Project" -> "Fire...". The Fire Editor window appears. 
- Set the starting and ending frame of the fire animation. 
- Set the overall dimensions of the fire: Fire max. height (Anim8or units) sets the maximum vertical extension of the flames. A negative value makes an upside down fire. The width of the fire will be set indirectly, as a combination of  Firebase width (# of atoms), Size of fire atoms and Horizontal compression. Usually, you won't need to modify the "Advanced Parameters", like Size of fire atoms, or Horizontal compression. The width in Anim8or units is displayed in the editor window. The number of particles created is in direct proportion with the Firebase width (# of atoms), so be careful not to increase it unnecessarily. This sample animation shows a fire with Fire max. height 60, Firebase width (# of atoms) 15, and another with Fire max. height 35, Firebase width (# of atoms) 40. The Chaos factor is 10, the Bézier Tangents all 0, the unmentioned parameters are the defaults.
- The Flammability sets the strength (speed) of burning. Low flammability needs more particles! The next sample animation compares two fires, one having a low flammability of 10, the other 40, Bézier Tangents all 0. The rest of parameters are the defaults.
- The Chaos factor sets the amount of chaotic movement of the flames. Chaos extends the width of the top of the fire. The sample animation shows two fires, one made with default parameters, the other being an extreme case with no chaos at all (0).
- The Wind parameter shifts the top of the fire with the specified amount. A positive value is a wind blowing from the left, a negative value is a wind from the right. Use moderate values. The next sample animation shows the effect of a wind of strength 10 on a campfire and on a  regular fire of width 20 particles, chaos 10, Bézier Tangents all 0.
- The Bézier Tangents  make the shape of the fire in the same way as the control points act on a spline segment in Anim8or. High X setting at an end makes the fire thicker at that end. High Y setting pushes the thicker part to the opposite end. The use of these parameters bring an undulation in the flame and increase the realism of the fire, allowing a wider range of shapes. The sample animation shows a fire with the default settings (including  Bézier tangents). The next sample animation shows a candle effect obtained using a higher X tangent at the bottom. In order to have a good understanding of these valuable parameters make some experiments in Anim8or with the "Edit Path" tool.
- Checking Campfire makes a fire with an overall triangular shape. See the sample animation showing a regular - and a campfire with chaos 15.
- The Size of atoms (Anim8or units) sets the size of the fire particles and indirectly the width of the fire. The sample animation contain fires with Firebase width (# of atoms) 20, Fire max. height 40, Chaos 15, Bézier Tangents all 0, one having Size of atoms (Anim8or units) 1, the other 1.5
- The Height variation  parameter sets how much can differ the random flame length compared to Fire max. height. This sample animation shows two campfires of 20 atoms wide, with chaos 25, Bézier Tangents all 0, one having Height variation 0.1, the other 0.9. Notice that the high value for chaos destroys the campfire shape!
- Horizontal compression squeezes the base line particles with the specified factor, influencing the width. It is useful for narrow fire beams (like jet engine fire). The sample animation shows a propane gas flame and a jet engine fire. The former has the following settings: max. height 25, width 30 particles of size 1, flammability 30, chaos 5, Bézier Tangents all 0, campfire, height variation 0.3, horizontal compression 5.
The jet fire:  max. height -60, width 30 particles of size 3, flammability 45, chaos 2, Bézier Tangents all 0, campfire, height variation 0.8, horizontal compression 10.
- Hot color balance changes the proportion of the two hot colors at the bottom of the fire. See the sample animation (max. height 60, chaos 15, Bézier Tangents all 0, campfire). The fire on the left has Hot color balance 0.35 (in this case means 35% yellow, 65% white at the bottom), the fire on the right has Hot color balance 1 ( 100% yellow, no white).
- Hollow influences the density of the fire. A higher value makes the top of the fire mushy, spongy. The sample animation illustrates two extreme settings for hollow: 0 and 1.
- Sparks. Allowing this parameter makes the appearance of sparks at the top of the fire.
- Darken. A low value makes a lighter fire, a higher value makes a richer and darker color. The sample animation displays a fire with the darken parameter 0 (left) and 0.6 (right).

Positioning the fire
First of all, be aware that a project file containing thousands of particles with many visibility, position and orientation keys will load slowly, creating the false impression of freezing Anim8or. Depending mainly on the number of particles, a file could take a few seconds, or up to 10 minutes to load, while Anim8or is "not responding". Be patient!
The fire effect is placed by default in the center of the scene. To facilitate the positioning in the scene, the fire particle system has a parent, a target named "TAN8firetarget" placed by default at (0, 0, 0). Just move TAN8firetarget where you want the fire to be located!
About the orientation of the fire: by default, Terranim8or creates a vertical fire (possibly upside down). For a custom angle (for example a taking off jet-plane engine's fire) set the orientation editing the properties of "TAN8firetarget".
Before adding a second (third...) fire to an Anim8or project, you should do a few extra steps for safetyness: 1. Rename the "TAN8firetarget" (make it "TAN8target1", for example)
2. Rename the fire atom object "TAN8fire" (do it "TAN8fire1", or whatever)
3. Save the file! (very important). By saving the file, Anim8or rearranges the fire data properly for Terranim8or to add a new set of fire data.

Customizing the colors
To paint the fire in your preferred colors, modify the materials of the fire atom "TAN8fire". The four materials "TAN8fire1" ... "TAN8fire4" make up the dominant colors of the fire from bottom to top. To further improve the effect, you could use appropriate fire textures (on the cost of slowing down the rendering). Other option is to replace the default fire atom. A horizontal cylinder with the same dimensions, mapped with a color gradient texture makes a good job.
To combine fire with smoke, edit at least one of the "TAN8fire..." materials (starting with "TAN8fire4") to an appropriate smoke color (usually dark gray, black, bluish or yellow). To have just smoke without fire, modify all the colors to smoke color. Using different levels of transparency (increasing towards top) makes a progressively vanishing smoke. Note: when using transparency, the materials must be two sided, with completely transparent backside, no specular component (otherwise there will be unwanted interference with the colors of the opposite sides).

A final note about the dynamics and positioning of the fire animation on the time-track:
On the first frame (set in Terranim8or), the fire consists only of a bottom line of particles. During the next frames, the fire evolves to a quasi-stationary height and shape and stays that way until the last frame. "End frame" (set in Terranim8or) means that the fire is no longer fed and vanishes from bottom to top. 
Now, if the animation has to show only a steady fire, seeing the growing phase can be avoided simply by not aiming the camera to the fire in the first frames. If the steady fire must be shown from the first frame, proceed as follows:
- count the number of frames to reach the steady state: # of frames = 60 - "Flammability" (set in Terranim8or)
- in the initial scene (before adding the fire) insert as first frames a number of empty frames equal to the number computed above, then add the fire from frame zero. Now the actual animation begins at the frame where the fire is already stabile.

Suggestions and constructive criticism are welcome.

Have fun playing (safely) with the fire!
Leslie  www.biederman.net/leslie