|
..::bunsen burner flame::..
Note
from the author:
The new Deconstructing the
Elements book (estimated release: June / July 2004)
also contains detailed flame tutorials which are similar to this
paper, but go into a lot more detail (at great length - approx 15
pages!), resulting in a much more realistic effect
These
types of questions tend to surface quite regularly. Fire is one
of the most complex things to emulate in CG as it’s one of
the most common things we see in our day to day lives, next to water,
smoke and human motion. As we see these things very regularly it’s
very difficult to convince an audience that a CG version is real
because they can easily spot any irregularities in motion, colour
or form. We therefore, as always, need to grab as much reference
material as possible to observe the object’s properties.
From
this reference material (and recalling old physics and chemistry
lectures!) it is relatively straightforward to create a convincing
effect, provided no other forces are exerted on the flame; for example
wind or motion (ie moving the burner around so the fire trails around).
Therefore, a simple cylinder can suffice for the main shape of the
flame.
Next
we need to generate the rough shape of the flame itself. By observing
our reference material, we notice that the flame bulges out somewhat
after the emitted gas has been ignited before coming back together
to a peak before forking off at random at the top of the flame.
This bulge can be created using a simple Taper modifier, or an FFD
cage should you wish. Basically, use anything available just to
pull the cylinder’s sides out a little and to bring the top
in to almost a point.
Because
each environment isn’t completely draught-proof, the flame’s
motion will be slightly irregular, but only at the top. This can
be simulated using a Volume Select modifier, with soft-selection
enabled and just the top quarter of the cylinder’s vertices
selected so any other modifiers added after this selection will
have their influence reduced according to the selection falloff.
The next modifier added to generate the irregular motion will be
a Noise modifier with animated Gizmo.
The
reason the Gizmo is animated and not the Noise’s phase is
because we want the noise motion to travel up the cylinder. Therefore
the gizmo’s position is animated along the Z-axis.
Even
now we should have a convincing motion. But something is missing.
The flame seems to be stationary, and if you observe a real flame
being emitted from a Bunsen Burner, you will notice that it bobs
irregularly; it’s height grows and shrinks and the flame seems
to pulse somewhat. The simplest way to simulate this is by animating
the height setting in the cylinder’s base parameters. This
can be easily keyframed, but a more convincing effect can be created
by using a Noise controller to control the cylinder’s height.
This noise controller will have to be set to greater than 0, and
will also have to be mixed with another controller (say a TCB Float
controller) to raise the initial height value before noise is added,
else the flame will be too erratic and will therefore look unconvincing.
The
final thing to do as far as the geometry is concerned is to smooth
out the flame. Even though the flame’s motion is erratic,
it’s shape is quite smooth; almost liquid in appearance. Therefore
any rough edges caused by the Noise modifier need to be smoothed
out by using a simple Meshsmooth modifier.
Next
we need to tackle the materials. The colour of the flame, self-illumination
and opacity can be set up by using simple Gradient Ramp maps within
a standard material with an Oren-Nayar Blinn shader. To add extra
intensity to the material, additive transparency is used, and the
material is set to two sided. To create an outer glow to the flame
material, we can overlay a yellow gradient on top of the self-illuminated
gradient map, and mask it out using another gradient map so the
falloff is only opaque in the middle of the flame; the top and bottom
parts of the flame do not have this intense falloff.
Because
no additional UVW modifiers have been used, the scale of the UVW
map is the exact side of the cylinder even when it’s size
if being continuously changed due to the Noise controller, therefore
the gradients will shrink and grow to fit the cylinder no matter
how large or small it gets. Finally, coloured attenuated lights
are attached using attachment controllers to the flame so they stick
to polygons as the object is deforming to illuminate the scene effectively.
The end result is a quite convincing flickering yellow flame.
 |
Open
up the bunsen_burner_start.max scene that can be found on the
cover cd. Create a cylinder primitive with a Radius of 20, Height
of 350, 15 Height Segments and 16 Sides. Label this cylinder
“Flame”. Position it above the Bunsen Burner as
illustrated. |
 |
Add a Taper
Modifier to the Flame’s stack. Set the Amount to -0.8
and the Curve to 4. Add a Volume Select Modifier. Set the Stack
Selection Level to Vertex. Move the Volume Select’s Gizmo
½ way up the cylinder so the top half of the cylinder’s
vertices are selected. Enable Soft Selection and amend the falloff
setting to get a falloff intensity as shown. |
 |
Add a Noise
modifier to the stack. Set the Scale to 165, turn on Fractal
and set the X and Y Strength to 80. Move the Noise Gizmo above
the Flame geometry. Turn on animate and at frame 200 reposition
the gizmo approx 4500 units above the flame geometry as shown.
Amend the Noise Gizmo’s two new Z keyframes to create
a linear motion with no velocity ramping as shown. |
 |
Add a Meshsmooth
to the stack and set the number of Iterations to 1. The Flame
material has already been pre-created for you, so simply assign
this to the Flame geometry. Open up the Function Curve Editor
and navigate to the Height controller of the cylinder. Assign
a Float List controller to the Height Controller. In the resulting
first Available slot, add a Noise Float controller and in the
next resulting Available slot add a TCB Float controller. |
 |
In the
Noise Float’s properties, set the Frequency to 0.2, Strength
to 300, turn on “>0” and set the Roughness to
0.1 . Select the TCB Float controller and draw keys from frame
0 to 200. Delete all keys from frames 1 to 199 inclusive and
set both keys properties to a value of 200. |
 |
Create
an Omni light with a Multiplier of 10, Inverse Square decay,
Far attenuation to 1000, Shadow map Bias to 0.1, Size to 256
and Sample Range to 35. Change light’s position controller
to an Attachment controller. Click on it’s Attach To:
Choose button and choose the Flame geometry. Click on the Set
position button and position the light at the top of the flame
by clicking on a face at the top of the flame. |
 |
Additional
post glows and motion blur have been added to the flame to blur
any harsh edges and to emphasise the brightness of the “flame”.
|
 |
Zip file
to accompany. |
..::tips::..
Clone
the light 5 times and reposition the clones down and around the
Flame using their Attachment controllers. Change all the lights
colours so they form a gradient vertically down from orange to yellow
matching the diffuse gradient in the Flame’s material. Finally
exclude all lights from illuminating and casting shadows on the
Flame geometry and turn off Receive Shadows and Cast Shadows in
the Flame geometry’s object properties.
Reduce the sample range by 5 for each light going vertically down
the Flame geometry. This will give the impression that the light
is more intense and not as diffused as the light that is being emitted
further up the flame.
Should you want to introduce more than one Bunsen burner to the
scene, simply select the lights and geometry and clone them. This
will result in both flame’s animation being identical, so
amend the seed values in the copy’s Noise modifier and Noise
controller to create a different flame shape. To prevent the Flame
lights from illuminating the new Flame geometry you will have to
exclude this geometry from the all (including the original) Flame
lights as well.
As always there is a very good plugin solution if you can stump
up the cash. Phoenix from Chaos Group is an Atmospheric-based plugin
which creates realistic fire materials, lighting and dynamics. For
more information on Phoenix visit www.chaosgroup.com
Initially
published: 3D
World magazine, Issue 40, July 2003.
Copyright
© Pete
Draper, July 2003. Reproduction without permission prohibited.
www.xenomorphic.co.uk |