Caustics and Water Simulation

Caustics and Water Simulation

Donna Calhoun and Lillie Kittredge
CSE 557, Winter 2004

Intro

We simulated the movement of water and used photon mapping to simulate caustics as would be seen in such a simulation. Both of these goals are for the purpose of creating more realistic animation.

Process

Our project had two parts:
  • simulating movement of water
  • rendering caustics via photon mapping

Water simulation

[animated gif of raytraced water simulation]

Above is an animated gif of the water simulation in action. The charming fellow floating on the pond is our character from the animation project, Mr. Duck. The pond surface is floating in space so that the caustics in the photon-mapped images wouldn't be blocked by tank walls. The unfortunate coloring of the surface is explained below.

volumn column flow diagram The water simulation implements the algorithm from O'Brien and Hodgins, 1995. The main element of the water simulation is a collection of virtual vertical columns of water (see diagram), each of which keeps track of its current volume. There are virtual pipes between neighboring columns which allow water to flow from one to the other, dependant on the flow in that pipe at the last time step, and the difference between the pressures of the two columns. Pressure on a column is a function of its height, the density of the fluid, the force of gravity, and also of the force being exerted on the surface of the water by external objects and forces. In order to keep track of these forces, the surface of the water is kept as an array of control points, which are implemented as particles from our animator project's particle system. These control points are then interpreted as the vertices of a triangle mesh. Unfortunately, the mesh lacks information about normals at the vertices, and so the surface has not been rendered using the phong interpolation that would have made it appear smoother.

Making the simulation work required adding a damping factor to the flow integration. We also diverged from O'Brien & Hodgins' algorithm in a few places for the sake of speed. We kept only one copy of each virtual pipe, rather than a copy for each volume to which that pipe is incident. A quirk of the simulation algorithm is that the volumes of the columns run the risk of going negative. In order to correct this problem, O'Brien & Hodgins scaled back the size of all the pipes taking volume away from the unfortunate column and reran the flow integration step. We simplified this process by just stealing the missing volume equally from the surrounding columns.

Caustics

The process of rendering the caustics is described here.

Results

Though we had hoped to create an animation which demonstrated the water flowing and the caustics produced by the water changing along with it, time constraints unfortunately prevented us from doing so. In leiu of the whole animation, the following should give you an idea of what the animation would have looked like:

[image of the duck rendered with photons] [image of the duck's photon map] align=center>

<tr><td>
<p>
<p>
<h4>References</h4>
<ul>
<li><a href=O'Brien, J. F., Hodgins, J. K., 1995. Dynamic Simulation of Splashing Fluids. Proceedings of Computer Animation `95, Geneva Switzerland, April 19-21, pp 198-205.

  • H. W. Jensen. Realistic Image Synthesis Using Photon Mapping. A.K. Peters, 2001.