EUROGRAPHICS 2015/ B. Bickel and T. Ritschel

Short Paper

An Interactive Editing System for Visual Appearances of Fireand Explosions
Y. Dobashi1,2,3 , Y. Shibukawa1 , M. Tada1 , S. Sato3 , K. Iwasaki2,3,4 and T. Yamamoto1
1 Hokkaido University, Sapporo Japan,
3 UEI Research, Tokyo Japan,

2 JST CREST, Tokyo Japan,

4 Wakayama University, Wakayama Japan

Abstract
Synthetic volumetric fire and explosions are important visual effects used in many applications such as computer
games and movies. For these applications, artists are often requested to achieve the desired visual appearanceby adjusting some parameters for rendering them. However, this is extremely difficult and tedious, due to thecomplexity of these phenomena and the expensive computational cost for the rendering. This paper presents aninteractive system that assists this adjustment process. Our method allows the user to interactively change theratio of smoke and flame regions, the emissivity of the flame, and the optical thicknesses of the smoke and flame
separately. The image is updated in real-time while the user modifies these parameters, taking into account themultiple scattering of light. We demonstrate the usefulness of our method by applying our method to editing of thevisual appearances of fire and explosions
Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: Three-Dimensional
Graphics and Realism—Volume Rendering

1. INTRODUCTION
Volumetric objects, such as smoke and fire, are importantelements that enhance the realism of a synthetic scene.
Among such volumetric objects, fire and explosions are often the most important visual effects in movies and computer games. Artists are often requested to produce a particular visual appearance in order to achieve a specific visual effect. One must adjust the parameters used in both thesimulation and rendering processes to create the desired visual appearance of fire and explosions. Here, we focus on
the rendering part. Fire and explosions consist of emission
and absorption regions, corresponding to flame and smoke,respectively. The visual appearances of fire and explosions
therefore change according to the ratio of these two regions
and their colors and opacities. Adjusting these factors is avery time-consuming and tedious task.
We propose a system that assists the user in designing thevisual appearances of fire and explosions. Our system allows
the user to interactively modify the ratio of smoke and flame
regions, their opacities, and their colors. Images are updated
in real-time, taking into account multiple scattering. A setof basis images are precomputed to realize interactive feedc The Eurographics Association 2015.
⃝Figure 1: A visual appearance of an animated explosion
edited by our system.

back. Fig. 1 shows examples of the editing of the visual appearance of an explosion by using our system.
2. RELATED WORK
The visual appearances of volumetric fire and explosions
can be designed by using a transfer function that assigns acolor and an opacity for each voxel. In the field of scientific visualization, many methods have been proposed forY. Dobashi et al. / Editing of Fire and Explosions

constructing suitable transfer functions [Kin02]. Recently,
many researchers have focused on the interactive designof transfer functions by directly painting rendered images[WQ07, CM11, GY13]. However, these methods basicallyassign the desired colors/opacities directly to each voxel, andtherefore the colors of the rendered image do not match thedesired colors. In addition, these methods do not take into
account the physical process of light scattering.
Several methods have been proposed for designing volumetric effects caused by subsurface scattering [STPP09,HR13]. However, these methods are limited to relatively
opaque objects and are not suitable for fire and explosions.
Klehm et al. [KISE13] proposed a method for computing thevoxel properties so that the rendered image of the volume
becomes the same as a user-specified image. Although thismethod can design the visual appearances of the volumessuch as smoke, multiple scattering is not taken into account.
3. SYSTEM DESIGNWe designed our system by taking into account the following
requirements. We assume that the input volume data stores adensity and a temperature at each voxel.
1. The system must take into account important factors that
determine the visual appearance of fire and explosion.
2. The number of manipulatable parameters should be as
small as possible.
3. The system must provide interactive feedback with theuser.
As for the first requirement, there are three important factors that affect the visual appearance of fire and explosions:the ratio of the smoke and flame regions, their colors, andtheir opacities. Multiple scattering of light is also an important factor. We need to take into account these factors in designing our system.
For the smoke and flame regions, we follow the common approach: using a threshold temperature to classify
each voxel into either smoke or flame. For the color andopacity, a traditional system uses a color map and an opacity map. These maps often depend on both the temperatureand the density. However, this approach violates the second requirement; the parameters are too many. We thus propose the following model. The opacity is controlled by using
only two extinction coefficients corresponding to smoke andflame regions, respectively. The colors are controlled by using a color map that converts the temperature to the colorand intensity of the emissivity of the flame. We found thissimplified model can produce various visual appearances, asdemonstrated in Section 6.
Next, to address the third requirement while taking
into account multiple scattering of light, we employ aprecomputation-based approach. Basically, a set of images
are precomputed with different sampled values of the parameters; we call the precomputed images basis images. In orderto reduce the precomputation time, we develop an efficientmethod using the photon mapping technique.
4. PARAMETER REPRESENTATIONLet us denote the temperature and the density stored in thevolume by T and ρ, respectively. In our system, the temperature T is sampled into n bins at a regular interval ∆T .
Let us denote the center of the bin by Ti = (i + 0.5)∆T (i =0, 1, · · · , n − 1). The number of bins is specified by the user.
The ratio of the smoke and flame regions and their extinction coefficients are controlled in the following way. Theattenuation of light between a pair of points x and y is expressed by:( ∫ y)
τ(x, y, Tc ) = exp −κ(T (s), Tc )ρ(s)ds ,(1)xwhere κ is the extinction coefficient computed from temperature T (s) at point s between x and y. Tc is the threshold forthe classification of a point into smoke or flame. We represent the extinction coefficient by:κ f − κsκ f + κsf (T (s) − Tc ) +, (2)22where κ f and κs are the extinction coefficients for flame andsmoke, respectively. f is a sigmoid function modified to be
fit into a range from -1 to 1, that is,
κ(T (s), Tc ) =f (r) = 2/(1 + exp(−r/σ f )) − 1,(3)where σ f determines the slope of the function around r = 0.
We use ∆T for σ f . The threshold temperature Tc is sampled
at Ti (i = 0, 1, · · · , n−1) and the extinction coefficient is computed for each sampled temperature. The attenuation ratio τis linearly interpolated between them. By adjusting Tc , theuser can control the ratio of the smoke and flame regions.
κs and κ f are independently controlled to adjust the optical
thicknesses of the smoke and flame respectively. The use of
the sigmoid function allows us to smoothly interpolate theextinction coefficient between smoke and flame. It also results in the smooth transition of the ratio of smoke and flameregions.
The emissivity is controlled in the following way. We assume that the emissivity of each voxel is a function of temperature T and wavelength λ. λ is sampled at the wavelengths corresponding to the RGB color channels. The emissivity is specified for each sampled temperature Ti . We useradial basis functions (RBFs) for the smooth interpolation;that is, the emissivity function Le is given by:
n−1

Le (T, λ) = ∑ ci (λ)φ(T − Ti ),(4)i=0where ci is the coefficient for i-th RBF and is determinedfrom the user specified emissivity at temperature Ti . The
number of RBFs is the same as the number of temperature samples. We use a Gaussian RBF: φ(r) = exp(−r2 /σφ ),c The Eurographics Association 2015.
⃝Y. Dobashi et al. / Editing of Fire and Explosions

Ve = ∑n−1
ciVi . Then, Eq. 5 is rewritten as:
in−1

L(x) = ∑ ci Li c s

Vi(y)(T ,κ ,κ f )

(x),

(6)

i=0

pixel p(T ,κ ,κ )where Li c s f is the radiance due to the basis emission
volume Vi and is given by:

Lb
xa

xb
x
Li(Tc, ks, kf)(T ,κ ,κ f )Li c sBi(Tc, ks, kf)
screen∫ xb

Lv (p) =Figure 2: Calculation of basis images.

xaρ(x)L(x)τ(xa , x)dx + Lb (p)τ(xa , xb )n−1=where σφ controls the smoothness of the emissivity function.
We use ∆T /3 for σφ .
5. EFFICIENT RENDERING USING BASIS IMAGESThis section describes the method for real-time rendering offire and explosion by precomputing the basis images. We
first explain the definition of the basis images and then an
efficient method for computing the basis images using thephoton mapping technique. In the following, let us omit thewavelength λ to simplify the notations. Our method applies
to each of the color channels independently.
5.1. Definition of Basis Images(T ,κ ,κ )Fig. 2 illustrates the idea of the basis images Bi c s f (p)that stores intensity of light reaching the viewpoint throughpixel p taking into account multiple scattering of light, whenthe emissivity and transmittance of the volume are determined by i-th RBF φ(T − Ti ), and the parameters (Tc , κs , κt ).
In this section, we derive the formulation of the basis image.
For simplicity, let us assume that the light source illuminating the volume is the emission of the volume itself. We will
explain later how the light sources outside the volume areincorporated. We assume isotropic scattering.
Let us define an operator M that computes the radianceat voxel x taking into account multiple scattering, given anemission volume Ve storing the emissivity Le at each voxel.
M is a function of Tc , κs , and κ f . Let us denote this dependence by using superscripts like M(Tc ,κs ,κ f ) . We express theradiance at x by the following equation.
(5)

M is a linear operator with respect to the emissivity Le .
Since Le is expressed by a linear combination of RBFs as
shown in Eq. 4, the emission volume Ve is also represented
by a linear combination of basis emission volumes Vi storing a value of i-th RBF φ(T − Ti ) at each voxel, that is,∑ ci Bi(Tc ,κs ,κ f )(p) + Lb (p)τ(xa , xb ),

(8)

i=0

where,(T ,κ ,κ f )c The Eurographics Association 2015.
⃝(7)

The final image is obtained by accumulating L(x) along theviewing ray. By using Eqs. 6 and 7, the radiance reaching
the viewpoint through pixel p is expressed by:viewpoint

L(x) = M(Tc ,κs ,κ f ) (Ve ).

(x) = M(Tc ,κs ,κ f ) (Vi ).

Bi c s∫ xb(p) =xa(T ,κ ,κ f )ρ(x)Li c s(x)τ(xa , x)dx,(9)and xa and xb are the intersections of the viewing ray and thevolume, x is a point between xa and xb (see Fig. 2). Lb is theradiance of light reaching from behind the volume. Eq. 9 isthe definition of the basis image.
As shown in Eq. 8, an image of the volume is represented
by the weighted sum of the basis images. Therefore, by precomputing the basis images, we can obtain the image very
efficiently. The illumination due to light sources outside thevolume is easily incorporated by preparing an additional setof basis images for the external light source. The number ofbasis images increases in proportion to the number of thelight.
5.2. Efficient Computation Using Photon Mapping
We use the photon mapping technique [JC98] to compute thebasis images. The photon mapping firstly computes a photonmap by shooting many photons from light sources. For theemissive volume like fire and explosion, light sources are thevolume itself. Every voxel with positive temperature is potentially a light source. We choose a voxel with positive temperature by using a uniform random number and generate aphoton at the center of the voxel. The direction of the photon
is also determined by using a uniform random number.
Let us now consider a photon q generated at point y inside
the volume. The initial light energy assigned to this photon iscomputed by using the emissivity function Le (Tq ), where Tq
is the initial temperature of the photon (i.e., Tq = T (y)). The
path of the photon is constructed by using random numbersthat determine the successive locations where the scattering
events occur. The photon is absorbed when a random number
is smaller than the albedo at the scattering location.
When photon q is absorbed, the light energy of the photon

Y. Dobashi et al. / Editing of Fire and Explosions

is expressed by the following equation.
(T ,κ ,κ f )Lq c s(T ,κ ,κ f )= Le (Tq )τq c s(10)(T ,κ ,κ )where τq c s f is the attenuation ratio of the photon along
the path and is given by:(T ,κ ,κ f )τq c s∫= exp(−Cκ(T (s), Tc )ρ(s)ds),(11)

where C is a set of points on the path of the photon. By
putting Eq. 2 into the above equation, we obtain the following equation.
(T ,κ ,κ f )τq c s= exp(−aoa (Tc ) − bob ),(12)

where,a = (κ f − κs )/2,b = (κ f + κs )/2,∫oa (Tc ) =C∫

ob =Cf (T (s) − Tc )ρ(s)ds,
ρ(s)ds.

Our method computes the weighted optical depths, oa (Tc )and ob , during the photon tracing process and stores thesetogether with the initial temperature Tq in our photon map.
Note that, as we described in Section 4, Tc is sampled at
Ti (i = 0, 1, · · · , n − 1) and thus oa is computed for each sampled temperature.
Once the photon map is constructed, our method(T ,κ ,κ )computes Bi c s f (p) for different sampled values of(Tc , κs , κ f ). A viewing ray is cast through each pixel andEq. 9 is evaluated numerically by generating a set of sample
points on the ray. For sample point x on the viewing ray, we(T ,κ ,κ )estimate the radiance Li c s f (x) by using the photon map
with the traditional density estimation method [JC98]. Since
the storage size for the basis images becomes very large ( >several gigabytes), we compress them using Singular Value
Decomposition (SVD).
Using the precomputed basis images, the images are rendered efficiently according to the parameters Tc , κs , κ f , andci . In addition to the image of the volume itself, we render
the effect of lens flare at runtime.
6. RESULTS
The examples shown in this section were computed on adesktop PC with an Intel Core i7 4770K (CPU) and NVIDIA
GeForce GTX TITAN 6GD5 (GPU). All of the computation
was accelerated by using the GPU. In addition to the emission of the volume, we used a single parallel light source
as an external light source. Videos demonstrating the editing
process and the animation of the fire and the explosion are
also included in the supplemental material.
We apply our system to the editing of the appearance ofan animated explosion as shown in Fig. 1. We chose threeframes from the animated data and separately adjusted theparameters for rendering them. The final animation is created by linearly interpolating the three sets of parameters,
as shown in the figure. In this example, the precomputation
took 1.6 hours and the size of the precomputed data was 1.4
GB but it is reduced to 165 MB by our compression method
using SVD.
7. CONCLUSIONS
We have proposed an interactive system for designing the visual appearance of volumetric fire and explosions. Our system allows the user to adjust the amount of smoke or flame
regions. The emissivity of each voxel is also determinedby the user. When the user modifies these parameters, ourmethod can render the image in real-time while taking into
account multiple scattering. We have demonstrated that thevisual appearances of volumetric fire and explosions can beinteractively designed by using our method.
Although we have demonstrated that our system canproduce various visual appearances, we have not justify
our choice of the manipulatable parameters. In the future,
we would like to verify if our parameter set covers thewhole space of the appearances that can be produced withcommonly-used parameters. We are also interested in solving an inverse rendering problem for fire and explosions, thatis, to determine all of the parameters inversely from a userspecified image.
References[CM11] C ORREA C. D., M A K.-L.: Visibility histograms andvisibility-driven transfer functions. IEEE Transaction on Visualization and Computer Graphics 17, 2 (2011), 192–204.
[GY13] G UO H., Y UAN X.: Local wysiwyg volume visualization. In IEEE Pacific Visualization Symposium (2013), pp. 65–72.
[HR13] H AŠAN M., R AMAMOORTHI R.: Interactive albedo editing in path-traced volumetric materials. ACM Trans. on Graphics
32, 2 (2013), Article No. 11.
[JC98] J ENSEN H. W., C HRISTENSEN P. H.: Efficient simulationof light transport in scenes with participating media using photonmaps. In Proceedings of SIGGRAPH’98 (1998), pp. 311–320.
[Kin02] K INDLEMANN G.: Transfer functions in direct volumerendering: Design, interface, interaction. In ACM SIGGRAPH
2002 Course Notes (2002).
[KISE13] K LEHM O., I HRKE I., S EIDEL H.-P., E ISEMANN E.:
Volume stylizer: Tomography-based volume painting. In Symposium on Interactive 3D Graphics and Games (2013), pp. 161–167.
[STPP09] S ONG Y., T ONG X., P ELLACINI F., P EERS P.: Subedit: a representation for editing measured heterogeneous subsurface scattering. ACM Transactions on Graphics (Proc. SIGGRAPH 2009) 28, 3 (2009), Article 31.
[WQ07] W U Y., Q U H.: Interactive transfer function design
based on editing direct volume rendered images. IEEE Transactions on Visualization and Computer Graphics 13, 5 (2007),1027–1040.
c The Eurographics Association 2015.
⃝