Water & Fire


Homepage for AIS/PBA-Project  SS06

(programming: Michael Gubser, Lukas Novosad)
(artwork(external): Denny Compagnino, Lydia Novosad)
(CVS provided by Andreas Schmidt)



The goal is to create a showroom for various graphical rendering techniques and physicaly-based animations. It should be possible to toggle them on/off as desired.




Advanced Image Synthesis components:

Physically-based Animation components:

HDRR - High Dynamic Range Rendering.

Particle effects such as dust, fire, fog or smoke.
(Lukas Novosad)

Bump Mapping using a Cg shader based on normal maps.
(Michael Gubser, Lukas Novosad)

Simulation of water using wave equations.
(Michael Gubser)

Caustics - Such as they appear on the ground of a pool at daylight.

Implementation of Collision Detection techniques.

Simulation of refraction and reflection on the water's surface

Simulation of fire behaviour like tangling flames



  • mouse look
  • arrow key movement (shift to strafe)
  • take screenshot (s or S)
  • bump mapping
  • volumetric and procedural fire effect
  • physically based simulation of waves


Technology used for the project:

First, we had to decide upon which shader technology to use and we decided to pick Cg since it provides a high level language for shader programming. The fire effect is made out of several slices which are blended toghether; perlin noise is used to create turbulence in a procedural way; unfortunately this did not work, e.g the frame rate was way too low. So for now, it is just a volumetric flame. Textures were created using photoshop with its large collection of brushes and effects. The walls are bumped using normal maps which were created from the standard textures using Photoshop and NVIDIA's plugin. Finally, the wave simulation is based on a superposition of several sine-waves and the water bump effects are created using a normal map applied on each water fragment in tangent space and a specular light computation.


Requirements to run the project:

Besides the below mentioned libraries one also needs an up to date OpenGL installation and the GL utility kit (GLUT) in order to compile the project. For running the executable a decent graphics card is needed which supports shader technology from the year 2007; although Cg is supposed to compile compatible shader programs for almost any installed graphics hardware, we have experienced some issues with this and had to search for the problem manually.



Executable & Sources:

executable -> water_fire.zip (16 Mb)
(alternative fire fragment shader for NVIDIA cards: cg_firefp.cg)
sources -> water_firesrc.zip (60 Kb)



Resources we used for the project:


Development & Tutorials


Papers & Projects



corona -> http://corona.sourceforge.net
Cg & arrays.h -> http://developer.nvidia.com/page/home.html
glh_* -> http://www.koders.com/

Wikipedia on HDR and HDI