CSE 557 Final Project - Winter 2002
Simulating Volcanic Eruptions

Kostub D. (kd@cs)


Project Description

Rendering realistic natural phenomenon is a challenging problem in computer animation. For this project, I implemented a particle system to simulate the eruption of a volcano.

Approach

I used the basic particle system model described in [1].  The two particles modeled are lava particles and smoke particles. Both these particles are similar in nature, the only difference being in how they are rendered and the initial conditions on the particle. Each particle is also associated with a voxel in a 3-d grid, which is used to calculate various forces acting on the particle. The volcano is represented as a 2-d grid with a height field.

The particles are created on top of the volcano and are assigned an initial temperature which cools as time proceeds. The particle motion is affected by some inter-particle forces (viscosity) and some external forces (gravity, drag and wind).

To calculate the wind and the viscosity forces on particles I initially tried to use computational fluid dynamics equations to model the flow of gasses as described in [2]. But I never got the system to render good looking pictures of the smoke, and hence I switched back to ad-hoc stochastic based modeling of the fluids.

After the lava particles cool to a certain temperature, they solidify and become part of the volcano. If they have already gone beyond the volcano then they just disappear. The temperature of a particle is calculated as the mean of the temperatures of the particles in a voxel.

Rendering

The particle simulator was built as an add-in to the animation program from the last project. The number of particles injected into the system can be controlled by the animation curves, to allow the animator to build a volcano eruption interspersing the smoke and the lava.

Rendering the particles to look reasonable/natural was probably the hardest part of the project, and I never got it to work as I wanted. The smoke particles are rendered as alpha-mapped spheres with a very tiny alpha. This allows the areas with thick smoke to look darker. To allow the blending to work the depth-buffer is made read-only while rendering the spheres. This allows for objects behind to be rendered even when the rendering is not done in reverse depth order. To allow the smoke to occlude the volcano,  the smoke particles are rendered last. To ensure that the smoke doesn't look like spheres floating in space, lighting is disabled while the smoke is rendered. I had initially wanted the smoke to form clouds as it is ejected from the volcano, but never got this aspect to look as intended.

The lava particles are rendered as solid spheres with a high degree of shininess. The particles are motion blurred in the direction of the velocity to get a blurry effect. This is done by drawing spheres with a smaller alpha values around the main sphere. To get the blending correct, the depth buffer is again marked read-only. The colors of the particle are chosen in a small range between red and yellow. Initially the particles were supposed to have a color based on the temperature, but the temperature to color conversion did not seem to give really bright colors. The volcano is rendered as composing of triangles at the corresponding heights in the 2-d grid.

Screen Shots

Some Movies

Movie 1 (Artifact)

Movie 2

Movie 3 (Building a new volcano)

Source Code

The executable of the program is downloadable here: Windows/Linux. The source code is available here in .tar.gz format. (Note this will not compile on VC++ unless you make some changes)

 


References:

  1. Particle Systems: A Technique for Modeling a Class of Fuzzy Objects,
    Reeves, W.,
    Proc. SIGGRAPH 83, 359-376 (1983).
  2. Modeling the Motion of Hot, Turbulent Gas 
    Nick Foster and Dimitri Metaxas,
    Proceedings of SigGraph '97.
  3. Animating Lava Flows.
    D. Stora, P.O. Agliati, M.P. Cani, F. Neyret & J.D. Gascuel.
    Graphics Interface'99, Kingston, Canada, June 1999.