DirectX Water Tech Demo

The aim for this demo was to create a 3D scene using the Direct3D API.  The application design allows the user dynamic control over numerous variables, such as the wave’s height, speed, size and texture scale. The code uses the concepts talked about in Frank Luna’s book ‘Programming in DirectX 9.0c’.

The application starts with a flat vertex grid and uses displacement mapping to offset each vertex over time. Displacement mapping itself is accomplished by associating each vertex with a displacement vector, these displacement vectors specify a direction for the Vertex Shader to offset (i.e displace) the vertices based on a defined length stored in the displacement map. The result is what you see below.

My original idea behind this project was to create numerous ‘types’ of water by using different rendering methods to show various styles and levels of realism. However this was out of reach considering the time frame we had available, so I eventually settled on using displacement mapping as my method for this project. Other techniques I investigated were noise-based water simulations, and I am working on implementing these along with added reflection/distortion effects within the demo.

All source code for the project can be found here. You will need Visual Studio and DirectX installed to run the project. Most modern gaming PCs should be capable of running the application at a smooth frame rate.

Posted on 20/06/2011, in 3D, Academic, Demo, Graphics. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s