Interactive Control of Fire Simulation based on Computational Fluid
Dynamics
Keisuke Mizutani
1
, Yoshinori Dobashi
2
and Tsuyoshi Yamamoto
1
1
Graduate School of Information Science and Technology, Hokkaido University, Sapporo, Japan
2
Graduate School of Information Science and Technology, Hokkaido University / JST CREST, Sapporo, Japan
Keywords:
Fire simulation, Control, Fluid Dynamics, Interactive Editing.
Abstract:
Visual simulation of fire plays an important role in many applications, such as movies and computer games. In
these applications, artists are often requested to synthesize realistic fire with a particular behavior. This paper
presents two methods in order to help artists meet such requirements. First, we propose a method for control-
ling fire simulation by extending a previous method for smoke simulation. Controlling fire simulation with the
previous method is difficult because of strong buoyancy forces caused by high-temperature. To address this
problem, our method locally adjusts magnitudes of control forces. Second, we present an interactive editing
method for external force field. The user can interactively design the shape of fire by placing a set of control
points. Our method generates a force field to form the shape of the fire. Experimental results show that our
method can control the fire into an arbitrary shape specified by the user.
1 INTRODUCTION
In computer graphics, many methods have been pro-
posed for simulating natural phenomena such as
smoke, fire, water, and so on. Fluid animations rep-
resented as various shapes are used in movies and
TV games. In order to enhance reality of these an-
imations, controlling motions of fluids based on nu-
merical fluid analysis is effective. Several methods
have been proposed for controlling the fluid simula-
tion (Hong and Kim, 2004) (McNamara et al., 2004)
(Shi and Yu, 2005). In previous methods, the motions
of smoke or water are controlled into user-specified
shapes using external forces.
Visual simulation of fire is important in creating
synthetic images of in a scene, such as a burning
house and a dragon breathing out fire. Computational
fluid dynamics (CFD) is effective for synthesizing re-
alistic fire (Nguyen et al., 2002) (Hong et al., 2007)
(Horvath and Geiger, 2009). Although methods using
CFD can generate realistic fire, there are many physi-
cal parameters that influence the motion of simulated
fire. Therefore, animators usually attempt to create
the desired fire motion by repeating fluid simulation
with different parameter settings until satisfactory re-
sults are obtained. Moreover, it is almost impossible
to adjust the parameters manually so that simulated
fire forms the desired shapes.
Several methods have been proposed for proce-
durally creating desired motion of fire (Lamorlette
and Foster, 2002) (Fuller et al., 2007). However,
these methods do not use computational fluid dynam-
ics to generate the fluid flow. Therefore, the result-
ing animation is less realistic than that created using
physically-based simulation.
Our purpose in this paper is to control re sim-
ulation based on CFD. A straight forward approach
to achieve this goal is to use the previous methods
for controlling smoke or water. However, we found
that those previous methods could not control fire
simulation accurately. The reason is that fire has
strong buoyancy force, which is not observed in other
phenomena. The strong buoyancy forces interfere
with control forces. Therefore, we developed a new
method that computes the control force taking into ac-
count the buoyancy forces.
We propose two methods to control fire simula-
tion: a target-driven method and an interactive edit-
ing of external force field. The first method con-
trols fire simulation by using a potential field com-
puted from a user-specified target shape. This method
is an extension of the previous method proposed by
Fattal and Lischinski (Fattal and Lischinski, 2004) so
that it can handle strong buoyancy forces caused by
high temperature of fire. In the second method, the
user can interactively design the shape and motion
242
Mizutani, K., Dobashi, Y. and Yamamoto, T.
Interactive Control of Fire Simulation based on Computational Fluid Dynamics.
DOI: 10.5220/0005746902400245
In Proceedings of the 11th Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP 2016) - Volume 1: GRAPP, pages 242-247
ISBN: 978-989-758-175-5
Copyright
c
2016 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
of fire by placing a set of control points. External
force fields are automatically generated according to
the user-specified control points.
Although several methods have been proposed for
simulating realistic fire, we employ a relatively sim-
ple method for the simulation of fire. We simulate fire
as a heated gas generated by combustion. Although
the behavior of the simulated fire is slightly less real-
istic than that by the two-fluid model (Nguyen et al.,
2002), our method is far more efficient and is easy
to implement. We employ the simple method because
our primary purpose is to synthesize the desired shape
interactively with plausible appearances. Our method
is fully implemented on the GPU and the user can in-
teractively edit the fire animation.
2 RELATED WORK
There are many methods for visual simulation of fire.
They are roughly classified into two categories: the
procedural approach and physical-based approach.
Methods based on the procedural approach have
focused on efficiency and control. Particle sys-
tems are the most widely used method. The earli-
est reported fire model, presented by Reeves(Reeves,
1983), used a particle system to animate fire. This
method required a large number of particles to
achieve natural visual effects. After this work, some
methods have been proposed for procedural model-
ing of fire animation (Beaudoin et al., 2001)(Lamor-
lette and Foster, 2002) (Fuller et al., 2007). Although
the computational cost for the procedural methods is
low and the desired fire shapes are easy to generate,
some important visual features, such as vortex mo-
tions, cannot be reproduced.
On the other hand, methods based on the
physically-based approach can generate realistic vi-
sual results with evolving and dynamic fires. Various
fire simulation methods have been developed based
on incompressible fluid solvers (Nguyen et al., 2002)
(Hong et al., 2007) (Horvath and Geiger, 2009). Al-
though these methods have the potential to generate
realistic fires, many physical parameters have to be
adjusted to obtain the desired results. This indicates
that adjusting the parameters manually to synthesize
fire with desired shapes is time-consuming or, further-
more, almost impossible.
Some researchers have developed methods for
controlling simulation of phenomena related to flu-
ids. Treuille et al.(Treuille et al., 2003) developed
a method for keyframe control of smoke simulation.
McNamara et al.(McNamara et al., 2004) proposed
an adjoint method for controlling smoke and water.
Hong et al. (Hong and Kim, 2004) proposed to use a
geometric potential field generated from given target
shapes to generate control forces. Fattal and Lischin-
ski(Fattal and Lischinski, 2004) developed a target-
driven method to control smoke simulation by us-
ing some external forces. The basic concept of this
method is similar to ours, however,their method is not
directly applicapable to fire simulation since it does
not take into account the strong buoyancy force. Shi
and Yu (Shi and Yu, 2005) proposed a method using
a feedback force field and the negative gradient field
of geometric potential function for creating the ani-
mation of water towards to the rapidly changing tar-
gets. Thurey et al (Th¨urey et al., 2006) introduced
control particles for controlling the motion of water.
Kim et al. (Kim et al., 2006) proposed a method to
advect smoke along a user-specified path. However,
these methods do not cover fire simulation. Control-
lable fires have been an active reserch area in the last
few years. Lever and Komura (Lever and Komura,
2012) controlled re simulation with textured force
for generating volumetric patterns similar to input
textures on the fire volume. Hong et al. (Hong et al.,
2010) introduced a method for controlling blue core
for modeling fire propagation along complex curves
or surface. Zhang et al. (Zhang et al., 2011) applied
high geometric motion constraints to the fire anima-
tion. Bangalore and House (Bangalore and House,
2012) proposed artistic control of flames using a set
of curves drawn by the user. This method deals with
target shapes formed by a set of curves only. How-
ever, there are no methods for interactively control-
ling the motion of fire based on computational fluid
dynamics.
3 FIRE SIMULATION
Before describing our method, this section explains
the numerical simulation of fire. We simulate fire by
using a grid-based approach. The simulation space is
subdivided into a grid, and a fire source is placed at
an arbitrary position in the simulation space. Velocity
u and temperature T are assigned at each grid point
(see Figure 1). Motions of the fire are simulated in the
following way. Velocity u is updated at each time step
by solving the following Navier-Stokes equations.
u
t
= (u· ) p+ f, (1)
· u = 0, (2)
where t is time, p is a fluid pressure, and f represents
any external forces such as gravity or wind. For the
Interactive Control of Fire Simulation based on Computational Fluid Dynamics
243
fire simulation, temperature and buoyancy forces are
calculated by using the previous techniques proposed
by Nguyen et al. (Nguyen et al., 2002). Temperature
T is calculated by the following equation.
T
t
= (u· )T C
r
T T
amb
T
max
T
amb
4
, (3)
where T
amb
is ambient temperature, T
max
is the max-
imum temperature, and C
r
is a cooling constant. As
an external force, the buoyancy force is taken into ac-
count. The buoyancy force f
buo
is given by:
f
buo
= κ
b
(T T
amb
)y, (4)
where κ
b
is the coefficient for the buoyancy and y is
a unit vector pointing upward vertical direction. Tem-
peratures and velocities at the grid points around the
fire source are fixed on those of the fire source.
-velocity u
-
pressure p
-temperature T
!
Figure 1: Simulation space.
4 TARGET DRIVEN CONTROL
Our first method to control simulation of fire uses a
driving force term (Fattal and Lischinski, 2004) as the
external force. Figure 2 shows an overview of our
control method. First, we calculate a target tempera-
ture using a target shape specified by the user. Next,
we calculate the driving force term by using a gradi-
ent of the target temperature and then we apply the
driving force to the fire simulation.
However, controlling the fire simulation by apply-
ing the driving force only is difficult because of the
strong buoyancy forces. Therefore, we locally adjust
coefficients of the driving force term by calculating
a cumulative distribution (see Section 4.2), represent-
ing accumulated differences between the shape of the
simulated fire and the target temperature. The shape
of the simulated fire is calculated by binarizing the
temperature distribution of fire. Then, we locally ad-
just coefficients for the driving force term in propor-
tion to the cumulative distribution. In the following
subsections, we describe the details of each process.
target shape
output!
input!
cumulative distribution
of difference!
fire simulation!
binarized
fire
adjusting
coefficient!
target
temperature!
driving
force!
Figure 2: Target driven control method.
4.1 Control Force
In this section, we describe a calculation of the driving
force term F. The purpose of this force is to cause the
fluid to advect the current fire temperature T towards
the target temperature T
. The target temperature T
has a binary value: 0 or 1. The evolution of fire sim-
ulation is governed by the Navier-Stokes equations.
We add the driving force term F to the external force
term f in the Navier-Stokes equation (Equation (1)).
The driving force term is defined by the following
equation.
F(T, T
) = ν
f
˜
T
˜
T
˜
T
, (5)
where ν
f
is an user specified coefficient,
˜
T and
˜
T
are obtained by convolving T and T
with a Gaussian
kernel respectively. The gradient of the target temper-
ature T
always points uphill towards higher con-
centrations of T
. This means that the gradient T
points in the direction of flow to the target. How-
ever, T
might be uniform in some regions, causing
T
= 0 there. In order to avoid this problem, we
substitute
˜
T
for T
.
˜
T
ensures T
6= 0 ev-
erywhere. In addition, the magnitude of
˜
T
is very
small in the region away from the target shape. There-
fore, we use a normalized gradient of the target tem-
perature, which is obtained by dividing the gradient
˜
T
by
˜
T
. The magnitude of the driving force is pro-
portional to the target temperature
˜
T. Consequently,
this prevents the driving force from being applied in
the areas where the temperature is zero.
GRAPP 2016 - International Conference on Computer Graphics Theory and Applications
244
4.2 Adjusting the Coefficient
As we describe before, the buoyancy forces interfere
with the driving force and the simulated fire exceeds
the target shape. In order to address this problem, we
use an adaptive force coefficient ν
f
(x) at each grid
point x, instead of the constant ν
f
in the entire simu-
lation space. The adaptive coefficient ν
f
(x) is calcu-
lated by using the cumulative distribution, as shown
in Figure 3, and given by the following equation.
ν
(n)
f
(x) = k
f
T
(n)
cu
(x)ν
(n1)
f
(x), (6)
where n is a time step, k
f
is a control parameter spec-
ified by the user and T
cu
(x) is the cumulative distribu-
tion of differences. This is expressed by the following
equations.
T
(n)
cu
(x) = {T
bi
(x) T
(x)} + k
c
T
(n1)
cu
, (x) (7)
T
bi
(x) =
1 (T(x) T
th
)
0 (T(x) < T
th
)
(8)
where k
c
is a coefficient to control the degree of ac-
cumulation and ρ
bi
is a distribution obtained by bina-
rizing fire temperature with a threshold temperature
T
th
. In this paper, T
th
is experimentally determined.
T
bi
(x) T
(x) is set to zero when it is negative. k
c
is specified between 0 and 1. The force coefficient
ν
f
(x) is proportional to the cumulative distribution.
Increasing k
c
results in stronger driving forces in re-
gions where the cumulative difference is large. By
using the above method, our method can control mo-
tions of the fire so that the fire shape matches the user-
specified target shape.
=!
binary fire!fire!
cumulative
distribution!
target ! difference!
=
+
c
k
n! n-1!
Figure 3: Process of calculating cumulative distributions of
difference.
5 INTERACTIVE EDITING OF
FORCE FIELD
This section describes the interactive editing of the
force fields to generate the desired flow and fire shape.
In this method, the user can design the desired shape
and motion of fire by interactively placing a set of
control points. When the user places a control point
on the screen, it is projected onto a plane that is per-
pendicular to the xy components of the view direction
(see Figures 4). Let us denote the projected position
by P
s
. The user drags the control point on this plane
to an arbitrary position, P
e
. A force field is then gen-
erated around the control point so that the temperature
at the dragged position P
e
becomes an user-specified
target temperature. The force field is generated inside
a cylinder with the user-specified radius r and height
l. The top and bottom centers of the cylinder are P
e
and P
s
, respectively (see Figure 4). The force field is
used as an external force in the Navier-Stokes equa-
tion (Equation (1)) and is defined by:
F
e
= c
f
(P
e
P
s
), (9)
where c
f
is a coefficient for adjusting the magnitude
of the force field. In our method, the coefficient is
controlled by using PID control mechanism so that
the temperature at the end point becomes the user-
specified target temperature. In this case, we update
the coefficient c
f
at each time step according to the
following equation.
c
f
= K
P
e+ K
I
Z
T
0
edt + K
D
de
dt
, (10)
e = T
target
T
end
, (11)
where e is the temperature difference between the
temperature T
end
at P
e
and the target temperature
T
target
. The target temperature is set to the threshold
temperature that defines boundaries between smoke
and fire. Let us now explain the meaning of Equation
(10). The first term on the right updates c
f
in pro-
portion to the current difference. This term is called
the proportional controller and K
P
is called propor-
tional gain. The second integral term updates c
f
in
proportion to both the magnitude of the difference and
the duration of the difference. The integral controller
is sum of the instantaneous difference over time and
gives the accumulated offset that should have been
corrected previously. T is the duration for the accu-
mulation. The accumulated difference is then mul-
tiplied by the integral gain K
I
. The contribution of
the third term is proportional to the derivative of the
Interactive Control of Fire Simulation based on Computational Fluid Dynamics
245
process difference. This term is calculated by deter-
mining the slope of the difference over time and mul-
tiplying this rate of change by the derivative gain K
D
.
Derivative action predicts system behavior and thus
improvessettling time and stability of the system. The
control parameters K
P
, K
I
and K
D
are determined ex-
perimentally.
viewpoint!
force field!
simulation
space!
screen!
P
s
P
e
control
point!
interface!
Figure 4: Overview of our editing system.
6 RESULT
This section shows some examples created by our
method. We used a desktop PC with Intel Core i7
(8GB of RAM) and NVIDIA GeForce GTX 780 as a
GPU to compute all the examples shown in this sec-
tion. Please refer to the accompanying video file for
animations of the examples shown in this section.
Fig. 5 shows examples of fire simulation con-
trolled by our method. The simulation space is sub-
divided into 64 × 64× 96 grid points. The computa-
tion time for each step took 0.03 seconds. The target
shapes are the Y-shape and the spiral-shape in Figs.
5(a)(b) and Figs. 5(c)(d), respectively. The target
shape is shown with blue dots. Fig. 5(a)(c) are exam-
ples without our method for automatically adjusting
the coefficient of the driving force and Figs. 5(b)(d)
are examples with our method. As shown in this fig-
ure, the fire shapes in Figs. 5(b)(d) are much closer
to the target shapes than those in Figs. 5(a)(c). In
both examples, the cumulative coefficient k
c
is set to
0.95. The threshold temperature is 0.4 that is chosen
experimentally.
Next, Figs. 6 and 7 show examples of fire sim-
ulation edited by our method. The simulation space
is subdivided into 128× 192× 128 grid points. The
computation time for each step took 0.1 seconds.
Figs. 6(a) and 7(a) are original fire simulations and
Figs. 6(b) and 7(b) are examples edited by using our
editing method. In Fig. 6, the shape of fire from
the Dragon is edited so that the shape becomes wider.
Fig. 7 shows an example of a burning house. By us-
ing our editing method, we can make fire wrapping
around the house like Fig. 7(b) without computing
interactions between fire and the house.
(c)! (d)!
(a)!
(b)!
Figure 5: Comparison of results with and without our
method. In (a)(c), our method is not used while (b)(d) use
our method.
(a)! (b)!
Figure 6: Fire from dragon.
(a)!
(b)!
Figure 7: Burning house.
7 CONCLUSION
We have proposed two methods to control fire sim-
ulation based on computational fluid dynamics: the
target driven method and the interactive editing of ex-
ternal force field. In the first method, we locally adjust
a coefficient of the driving force term by calculating
the cumulative distribution of differences between the
shape of the simulated fire and the target shape. Our
method can control the simulated fire into an arbitrary
shape specified by the user. In the second method, the
user can interactively design the shape and motion of
GRAPP 2016 - International Conference on Computer Graphics Theory and Applications
246
fire by a set of control points. In order to generate
the desired flow and fire shape, our method computes
external force fields automatically generated accord-
ing to the user-specified control points. Our method
provides a simple way to generate realistic fires with
desired shapes and motions.
In our future work, it might be interesting to con-
trol a fire source in order to generate additional ef-
fects. In addition, we plan to extend our method to
other types of fluid simulations such as particle-based
methods.
REFERENCES
Bangalore, A. and House, D. H. (2012). A technique
for art direction of physically based fire simulation.
In Proceedings of the Eighth Annual Symposium on
Computational Aesthetics in Graphics, Visualization,
and Imaging, CAe ’12, pages 45–54, Aire-la-Ville,
Switzerland, Switzerland. Eurographics Association.
Beaudoin, P., Paquet, S., and Poulin, P. (2001). Realistic and
controllable fire simulation. In Proceedings of Graph-
ics Interface 2001, GI ’01, pages 159–166, Toronto,
Ont., Canada, Canada. Canadian Information Process-
ing Society.
Fattal, R. and Lischinski, D. (2004). Target-driven smoke
animation. In ACM SIGGRAPH 2004 Papers, SIG-
GRAPH ’04, pages 441–448, New York, NY, USA.
ACM.
Fuller, A. R., Krishnan, H., Mahrous, K., Hamann, B., and
Joy, K. I. (2007). Real-time procedural volumetric
fire. In Proceedings of the 2007 Symposium on Inter-
active 3D Graphics and Games, I3D ’07, pages 175–
180, New York, NY, USA. ACM.
Hong, J.-M. and Kim, C.-H. (2004). Controlling fluid an-
imation with geometric potential: Research articles.
Comput. Animat. Virtual Worlds, 15(3-4):147–157.
Hong, J.-M., Shinar, T., and Fedkiw, R. (2007). Wrin-
kled flames and cellular patterns. In ACM SIGGRAPH
2007 Papers, SIGGRAPH ’07, New York, NY, USA.
ACM.
Hong, Y., Zhu, D., Qiu, X., and Wang, Z. (2010).
Geometry-based control of fire simulation. Vis. Com-
put., 26(9):1217–1228.
Horvath, C. and Geiger, W. (2009). Directable, high-
resolution simulation of fire on the gpu. In ACM SIG-
GRAPH 2009 Papers, SIGGRAPH ’09, pages 41:1–
41:8, New York, NY, USA. ACM.
Kim, Y., Machiraju, R., and Thompson, D. (2006). Path-
based control of smoke simulations. In Proceedings
of the 2006 ACM SIGGRAPH/Eurographics Sympo-
sium on Computer Animation, SCA ’06, pages 33–42,
Aire-la-Ville, Switzerland, Switzerland. Eurographics
Association.
Lamorlette, A. and Foster, N. (2002). Structural model-
ing of flames for a production environment. In Pro-
ceedings of the 29th Annual Conference on Computer
Graphics and Interactive Techniques, SIGGRAPH
’02, pages 729–735, New York, NY, USA. ACM.
Lever, J. and Komura, T. (2012). Real-time controllable
fire using textured forces. The Visual Computer, 28(6-
8):691–700.
McNamara, A., Treuille, A., Popovi´c, Z., and Stam, J.
(2004). Fluid control using the adjoint method.
In ACM SIGGRAPH 2004 Papers, SIGGRAPH ’04,
pages 449–456, New York, NY, USA. ACM.
Nguyen, D. Q., Fedkiw, R., and Jensen, H. W. (2002). Phys-
ically based modeling and animation of fire. In Pro-
ceedings of the 29th Annual Conference on Computer
Graphics and Interactive Techniques, SIGGRAPH
’02, pages 721–728, New York, NY, USA. ACM.
Reeves, W. T. (1983). Particle systems&mdash;a technique
for modeling a class of fuzzy objects. ACM Trans.
Graph., 2(2):91–108.
Shi, L. and Yu, Y. (2005). Taming liquids for rapidly chang-
ing targets. In Proceedings of the 2005 ACM SIG-
GRAPH/Eurographics Symposium on Computer An-
imation, SCA ’05, pages 229–236, New York, NY,
USA. ACM.
Th¨urey, N., Keiser, R., Pauly, M., and R¨ude, U. (2006).
Detail-preserving fluid control. In Proceedings of the
2006 ACM SIGGRAPH/Eurographics Symposium on
Computer Animation, SCA ’06, pages 7–12, Aire-la-
Ville, Switzerland, Switzerland. Eurographics Associ-
ation.
Treuille, A., McNamara, A., Popovi´c, Z., and Stam, J.
(2003). Keyframe control of smoke simulations.
In ACM SIGGRAPH 2003 Papers, SIGGRAPH ’03,
pages 716–723, New York, NY, USA. ACM.
Zhang, Y., Correa, C. D., and Ma, K.-L. (2011). Graph-
based fire synthesis. In Proceedings of the 2011 ACM
SIGGRAPH/Eurographics Symposium on Computer
Animation, SCA ’11, pages 187–194, New York, NY,
USA. ACM.
Interactive Control of Fire Simulation based on Computational Fluid Dynamics
247