Final Project

 

Real-time Water Simulation

 

By Adam Westgate

CSc 471

 

Overview:

            The goal of this project is to realistically simulate water motion and light reflection off of water in real time.  In this program the user can navigate around a small world with a reflection pond in the center to see how the reflections change.

 

Users Guide:

 

Must be in 1280x1024 screen resolution!!!

 

Camera Movement:

            Left-click and drag to change the camera angle.

            w’ / ‘s’ – move forwards and backwards

            a’ / ‘d’ – move left and right

            q’ / ‘e’  - move up and down

 

Other commands:

            Right-click to access the menu that allows you to change the scene.

            f’ – pauses the animation

            j’ – hold to simulate rain (Not very visible anymore)

 

Technical overview:

            The water movement is simulated using depth buffers.  The large waves are overlapping sin functions, and the ripples caused by the rain are created by averaging the surrounding values on the old depth buffer and subtracting the value from the buffer that is two cycles old.

            The reflection is simulated by creating a texture with the camera positioned under the ground and mapping that texture onto the surface of the water.

 

Screen shots:

Las Vegas

 

 

The desert

 

 

Proving that there is water on Mars.

 

Resources:

 

http://www.vterrain.org/Water/  - Contains links to many different sites and programs on water simulation

 

 

Known Issues:

 

            Resizing messes up the reflection.

            The reflection looks off near the edges of the box.

            The program does not simulate the refraction of light bouncing off the bottom.