Aline Normoyle
Home   Publications   Projects   About  
Fire

fire_blob_small.png  Physically based Fire Simulation
by Aline N & Travis Gorkin


For this project, we extended our physically-based smoke assignment for CIS563 to simulate fire following the techniques described in “Physically Based Modeling and Animation of Fire” by Nguyen, Fedkiw, and Jensen.  We used Renderman to create interesting, stylized images of the fire. If you are interested in making your own smoke simulation, check out my fluid tutorial and basecode which have been used in our physically based animation course.



Results

Below is a high resolution fire simulation rendered in openGL.

Below are the same high resolution fire simulations with stylized renderings using renderman (blobbies and particles respectively):

Some screenshots

hwfire_0041.png hwfire_0055.png hwfire_0103.png
OpenGL Render (60x60x30 grid) OpenGL Render (60x60x30 grid) OpenGL Render (60x60x30 grid)
screenshot_grey_lowres.png hwfire_heat.png hwfire_levelset.png
OpenGL Render (20x20x10 grid) Temperature Render Level Set Render
fire_blob_0015.png fire_blob_0039.png fire_blob_0046.png
Blob Render (HiRes) Blob Render (MedRes) Blob Render (LowRes)

Travis made a cool video highighting the major features of this project:



Implementation Notes

Nguyen et al. model fire by coupling the simulation of gaseous fuel with ignited gaseous products. Both simulations are modeled using the Navier-Stokes equations for incompressible flow using a Semi-Langrangian approach. Nguyen et al. integrate the two simulations together by carefully managing the dynamic boundary between the two fluid regions, also called the flame reaction front. Gas expansion at the reaction zone is modeled such that mass and momentum are conserved across the boundary. Vorticity confinement forces control the turbulence of the flames. Hot gaseous products, smoke, and soot rise due to buoyancy. The authors render the resulting fire as a participating medium with blackbody radiation.

We (but mostly Travis) implemented the level set method described in the paper for maintaining the boundary between the fuel and the hot gaseous products. In each grid cell, we store the signed distance from the grid center to the level set boundary, such that distances inside the level set region are negative and distances outside are positive. Before advection, we update the level set boundary based on a user-specified fuel speed and the fuel fluid velocities. For numerical stability, we use upwind differences, rather than central differences, to estimate gradients along the boundary for updating. We also recondition the level set each frame so that signed distances stored at each grid point remain valid.

We (but mostly me) used the ghost fluid method described in the paper to simulate our fire. The method maintains two separate fluids, one for the fuel and the other for the hot gaseous products. Each fluid consists of true velocities within its respective level set region, and ghost velocities elsewhere. During advection, we calculate ghost velocities whenever we trace a particle back across the fuel front. External forces are applied to each individual field with different parameters. During projection, we formulate separate systems of linear equations for each fluid such that pressures outside the fluid’s region include a term to account for the density discontinuity between the two regions. The solved pressure values are then added to the velocity field in the usual way, creating a stable field that is divergent across the flame front (by a constant value) and non-divergent elsewhere. We advect temperature and density in the hot gaseous products field only, using the fuel field as a source and then decaying each quantity non-linearly each time step.

Because we are rendering under fixed lighting conditions, we did not implement the black body spectrum calculation ourselves. Instead, we used a fixed spectrum calculated online. Implementing physically correct lighting would be a great enhancement to this project.

References