|
..::dragon fire::..
Note
from the author:
This article was written with 3ds max 4.x in mind. Due to software
improvements, bug fixes, user interface amendments and added features,
some items listed below may not apply to 3ds max after version 4.x...
Creating
realistic looking and flowing fire is tricky without some fancy
third-party plugin. So here we will try to do just that with 3ds
max 4’s own toolkit. Up for the challenge?
Fire
effects are one of the most awkward elements to simulate in 3D.
Normally, an artist would have to resort to stock footage, pass
the task to a compositor to merge the fire element into the scene
or purchase a third party plugin to generate the effect. Granted,
this can give a very nice result, but what if you can’t afford
these materials? Creating fire in 3D can be challenging, but one
of the most enjoyable, with one simple value change can alter the
fire’s behaviour from a simple flame to a force to be reckoned
with. Depending on the situation and combustible material, fire
can take on many forms; from tendril and flickering shapes through
to rolling clouds. Here we are going to attempt to introduce a realistic
turbulent fire cloud into our scene to add some extra drama, kind
of like a flamethrower, being shot out of our dragon’s mouth.
All of the scene elements have been previously created, so all we
need to concentrate on is the fire, it’s appearance and motion
and how it interacts with the rest of the scene.
 |
Firstly,
we will load the scene: Dragon_hall.max . The scene is lit using
several Omni lights from each chandelier to create the right
ambient effect, which as a downside, will increase your rendering
time, so feel free to remove some lights from each chandelier
and increase the multiplier of the others (which are all instanced). |
 |
As
this tutorial is based on the fire effect, we won’t concentrate
on the animation of the beasty with the bad breath. Note though
the dummy object around it’s head; this will be used later
on to align and position the fire emitter and any additional
lighting we require. |
 |
Create
a Geosphere primitive anywhere in the scene. Set the radius
to 300 with 7 segments. Ensure the Geodesic Base Type is set
to Icosa. This is a relatively high segment count for a particle
system, so when working within the viewport, you may wish to
reduce the number of segments, but increase it back when rendering. |
 |
Assign
a UVW Map modifier to the sphere and set the Map ID spinner
to 2. We are using Map ID 2 as when the sphere is referenced
by the particle system, the particle system itself uses Map
ID 1 which can cause conflicts. |
 |
To add
some irregular motion and shape to the particle, assign a Noise
modifier to the sphere. We can then animate these settings if
required to make the fire ripple and contort more, depending
on our requirements. As this modifier is positioned after the
UVW modifier, it will therefore also deform the map. |
 |
Turn on
Animate Noise in the Noise modifier’s Animation Rollout
and amend the Frequency spinner to 0.5. This will increase the
rate of the Noise modifier’s animation. Turn on Fractal
and increase the Roughness to 0.3 set all X Y and Z Strength
spinners to 100. |
 |
Create
a SuperSpray particle system and set the Icon size to 1000 so
we can see it clearly and use it as a sense of proportion. Select
the Align tool and click on the Select By Name icon (or press
H). Select the Dragon Mouth Dummy object as the object to align
to. |
 |
In the
Align pop-up box, check on X Y and Z position align and also
check on local X Y and Z Align Orientation. Clicking OK will
automatically position and rotate the particle system exactly
where we want it to be, directly inside the dragon’s mouth. |
 |
With the
particle system still selected, expand the Command Panel by
pulling it out from the left hand side to the right. The particle
system has a lot of rollouts and settings that we need to amend,
so viewing all of them at once helps the process and aids our
workflow. Select the particle system’s properties and
turn off Cast and Receive Shadows. |
 |
In the
particle system’s Basic Parameters rollout, change the
Particle Formation Off Axis Spread to 10 degrees and the Off
Plane Spread to 90 degrees. Change the Viewport Display to Mesh
and the Percentage of Particles to 100 to view the entire particle
system. |
 |
In the
Particle Generation Rollout, amend the Speed spinner value to
500 with 20% variation. In the Particle Timing section, set
the Emit Start spinner to 1 and the Emit Stop and Life spinners
to 100 with 20 variation. |
 |
In the
Particle Size section, set the Size spinner to 5 with 20% variation,
amend the Grow For value to 30 and set the Fade for value to
0. These set the general physical size of the particles. They
don’t have to be increased as much as normal due to the
particle type is to be set as Instanced Geometry. |
 |
Under the
Particle Type rollout, set the Particle Type to Instanced Geometry.
In the Instancing Parameters section, click on the Pick Object
button and choose the Geosphere. Under Animation Offset Keying,
check the Birth radio icon. This makes the particle begin animating
the Noise modifier when a particle is born, adding more variation
to the particle appearance. |
 |
In the
Rotation and Collision rollout, set the Spin time to 20 with
50% variation. Under the Object Motion Inheritance rollout,
set the Influence spinner to 0. So if the SuperSpray emitter
is moved or rotated, the particles don’t move or rotate
to follow but continue on the same path. |
 |
Scrubbing
the timeline forward, we should now see the particles being
emitted from the dragon’s mouth in a linear motion; further
still, we will see them intersect the floor and continue downwards.
Create a large (about 80000 square) Deflector SpaceWarp slightly
larger than the ground, and position it just slightly above
the ground and tiles. |
 |
Set the
Bounce to 0.2 and the Chaos to 10%. Bind the particle system
to the SpaceWarp. We should now see the particles reflect back
up, although half of the particle still remaining below the
ground and Deflector. This is normal as max’s particle
collision detection is set to the center of the particle. |
 |
To add
some more random motion to the fire effect, create a Wind SpaceWarp
and rotate it so the direction arrow is pointing vertically
up at the Scene’s arched roof. Set the Wind’s Strength
to 0.3 (only a slight breeze!) and the Turbulence to 2. Bind
this SpaceWarp to the particle system. |
 |
We shall
now create the fire material. The material is comprised of several
elements; the main billowing fire effect, the smoke cloud material,
the combination of the above and a transparent element to mask
out any harsh edges of the particles. Combined with this, the
use of material ID’s to add a post glow effect. |
 |
We shall
start with the main fire material. Create a new standard material
labelled Fireball and change it’s shading type to Oren-Nayar-Blinn.
Check on Self-Illumination. Set the Specular Level and Glossiness
spinners to 0. In the Extended Parameters rollout, set the Falloff
Amt spinner to 65. |
 |
In the
Diffuse Color slot, create a new Smoke map and label it White.
Set the Size spinner to 0.5, the # Iterations spinner to 10
and the Exponent to 0.4. Select the Color #2 swatch and set
it to White (RGB 255,255,255). Set the Source to Explicit Map
Channel and the Map Channel to 2. |
 |
In the
Color #1 slot, create a new Smoke map and label it Yellow. Set
the Size spinner to 0.5, the # Iterations to 10 and the Exponent
to 1.3. Set the Source to Explicit Map Channel and the Map Channel
to 2. |
 |
Create
a new Smoke map in the Color #1 slot and label it Red &
Black. Set the Size to 0.5, the # Iterations to 10 and the Exponent
to 0.5. Set the Source to Explicit Map Channel and the Map Channel
to 2. In the Color #2 slot, create a new Gradient Ramp map and
label it Orange & Red. Change the mapping to Planar from
Object XYZ and set the Y Angle spinner to –90. |
 |
In the
Gradient Ramp Parameters rollout, set the Interpolation type
to Ease In Out. Design the Gradient as shown, with keys at 100
(RGB 255,163,0), 63 (RGB 255,0,0) and 0 (RGB 255,0,0). |
 |
In the
Yellow Smoke map, create a Gradient Ramp map in Color #2 and
label it White Yellow & Orange. Change the mapping to Planar
from Object XYZ and set the Y Angle spinner to –90. Change
the Interpolation type to Ease In Out and design the gradient
as shown with keys at 100 and 92 (255,255,255) 73 (255,255,0)
40 and 0 (255,163,0) |
 |
Diffuse
Color slot to the Diffuse Level and Diffuse Roughness slots.
Create a new Smoke map in the Bump slot and label it Xtra Bump.
Set the Source to Explicit Map Channel and the Map Channel to
2. |
 |
Instance
copy the White Smoke map tree into the Color #1 slot and make
the Color #2 swatch black. Set the size to 0.5, the Iterations
to 10 and the Exponent to 0.6. Back at the top of the material,
set the Bump spinner to 60, create a new Falloff map in the
Self-Illumination slot and label it Outer & Inner Glow. |
 |
Instance
copy the Yellow Smoke map into the first slot and set the second
swatch to RGB 252,220,0. Amend the Mix curve at the bottom of
the map so that it resembles the screenshot. Back at the top
of the material, create a new Falloff map in the Opacity slot
and label it Opaque Inner. |
 |
Set black
as the 2nd swatch colour and instance the Yellow smoke map into
the 1st slot. Amend the mix and output curves to those displayed
in the screenshot. We have now completed the main fire material.
The rest of the material structure consists of more simple materials… |
 |
Create
a new Standard material and label it Smoke. Set the Diffuse
swatch to black, Specular and Glossiness to 0, change the Advanced
Transparency type to Out and set it’s spinner to 100.
In the Opacity slot, create a new Falloff map, set the type
to Fresnel and flip the white and black colours. |
 |
Create
a new Standard material and label it Transparent. Set the Specular,
Glossiness and Opacity spinners to 0 to create a completely
transparent material. That’s all the materials created,
so next we’ll put them all together… |
 |
Create
a new Shellac Material and instance copy the Smoke material
to the Base Material slot. Instance copy the Fireball material
to the Shellac Material slot and set the Shellac Color Blend
spinner to 340. Label this material Smoke & Fireball Mix. |
 |
Create
a new Blend Material, label it Fireball End Mix and assign a
Material ID of 1 to it. Instance copy the Transparent material
to the Material 1 slot and the Smoke & Fireball Mix Shellac
material to the Material 2 slot. Create a Falloff map in the
Mask slot and set the type to Fresnel. Flip the black and white
colours and amend the Mix curve to the one displayed. |
 |
Assign
this material to the Sphere and in the particle system under
Mat’l Mapping and Source, check on Instanced Geometry
and click on the Get Material From: button. Create a new Omni
light and set the colour swatch to 255,245,87. Ensure shadows
are checked on and amend the Multiplier to 5. |
 |
Set the
Contrast and Soften Diff. Edge values to 50 and check on Use
and Show under Far Attenuation. Set the Start spinner to 0 and
the End to 30000. Under the Shadow Map Params rollout, set the
Bias to 0.01, the Size to 1024 and the Sample Range to 20. As
with the particle system, align this to the Dummy object. |
 |
In the
Environment window, check Ambient is set to 0,0,0. In the Effects
window, create a new Lens Effects effect. Add a Glow effect
and name it Fire Glow. In the Glow Element rollout, set the
Size to 0.1, the Intensity, Occlusion and Use Source Color to
100. In the Options tab, ensure Effects ID is checked and set
to 1. |
 |
Create
a new Glow effect and label it Illumination Glow. In the Glow
Element rollout, set the Size to 3, Intensity to 200, Occlusion
and Use Source Color to 100. In the Options tab, ensure Effects
ID is checked and set to 1. Hide the Sphere, select the particle
system and add 0.5 of image motion blur. Voila. |
 |
Due to
the nature of the particle system, the geometry count, the number
of lights and the resolution of the image, it may take a white
to render even a single frame. Consider lowering the particle
birth rate if you find it’s taking too long, or reduce
the detail of the referenced sphere. You may also wish to animate
the phase of the smoke material to add more chaos to the fire
effect. Should you decide to render out the scene at a size
other than the default (640x480), you may wish to adjust the
Glow settings as they will appear more or less intense depending
on the image size. |
 |
Download
the max file & maps! |
 |
The resulting
rendered animation. |
..::additional
tips::..
Fire
Plugins: As mentioned, additional 3rd party plugins could
be used to add more realism to the fire effect. Most effective ones
for the fire appearance are Afterburn, Pyrocluster, Outburst and
Phoenix, with the first three generating volumetric fire and smoke,
with Phoenix designed to generate tendril-like fire. Cebas’
Pro-Optic Suite could also be used in conjunction with Pyrocluster
(of which it contains) to enhance the glow effect to add more effective
intensity to the fire.
Particle
Systems: Max’s particle system and corresponding
SpaceWarps as it stands has it’s limitations. To create any
real convincing fire simulation, the particle system must interact
with the scene. In which case you may want to look into the use
of particle dynamics and / or the use of an additional particle
system such as Particle Studio or Thinking Particles which allows
you to design the particle system to the relevant needs of the scene.
Materials:
Due to the nature of our fire simulation, we have to use several
mixed and composited materials to create the desired result. Because
of this, you will find that render times in the scene will increase
dramatically. The main culprit behind this is the Shellac material,
which could be replaced with a Composite material, additive transparency
or having two particle systems; one with the bare fire material
and the other with the dark smoke effect.
Illumination:
Max currently does not have any geometric-based lighting system.
Therefore, the fire cannot accurately illuminate the scene depending
on it’s intensity so we have to simulate this with a Glow
post effect. The Omni light positioned in or near to the dragon’s
mouth is the main light source for the fire illumination, which
could be cloned, reduced in intensity, moved further along the particle
trail and animated to illuminate the scene as the particles pass
over it.
Particle
Trails: Our fire setup currently behaves as clouds. More
tendril-like effects can be created by amending the material settings
slightly, assigning them to a new and smaller reference sphere,
and turn on Particle Spawning in the SuperSpray particle system.
By choosing Spawn Trails, each born particle will generate an additional
few particles, and by tweaking the settings, we can get it to move
erratically, spawn the new reference sphere for it to die abruptly
like a tendril.
Interparticle
Collision: With the amount of particle chaos in the scene,
particles do often collide but have no effect on one another. To
make the fire motion more realistic, turn on Inter-particle collision,
and increase it’s value spinner to detect collisions at a
sub-frame value, but not too high as geometry updates will be slow.
Particle
Motion: Currently, the particles just simply emit from
the dragon’s mouth. To generate a more realistic motion, try
animating the speed of the particle from 0 up to the set value.
Also animate the birth rate from 1 up to the set value. With these
values animating over a short time, coupled with Inter-Particle
collision, we can see smaller particles being forced through the
larger particles as the fire’s full velocity is achieved.
Particle
Age Map: In the tutorial, we haven’t taken the particle’s
appearance as it dies in to consideration. This is due to the nature
of the material setup and the inability to assign a Particle Age
map to the referenced sphere as the Particle Age material has to
be directly assigned to the particle system and not to instanced
geometry. If we assigned the fire material directly to the particle
system, we would not be able to lock the material to the individual
particle, and as a result would have the particles “passing
under” the fire material.
Other
Material Methods: Depending on the “design”
of your fire, you may wish to create the particles and materials
differently. Facing particles with a fire material set to face map
and additive transparency keeps render times down and gives an effective
result, but does not generate the fireball-type effect generated
in this tutorial with the darker patches of fire and smoke.
Fire
Motion: To add more dramatic motion to the fire, try rotating
the dragon, Omni light and SuperSpray particle system so the particles
just clip a close pillar by about 25%. Create UDeflector and Cylindrical
Decay SpaceWarps (to form the particles around the pillar) and adjust
their settings and position accordingly to react with the pillar.
Note that once the SpaceWarps have been bound to the SuperSpray
system, the Viewport update time increases. To stop particle updates
in the Viewport, simply hit the Escape key.
Initially
published: Computer
Arts Special magazine, Issue 27, December 2001.
Copyright
© Pete
Draper, December 2001. Reproduction without permission
prohibited.
www.xenomorphic.co.uk |