This project has completed a successful implementation of a water wave simulation using the DirectX 11 framework. The simulation calculates 8 simultaneous Gerstner waves on the Graphics Processing Unit (GPU), with performance at above real-time framerates. The Gerstner wave model, a heightfield model, was selected and implemented due to its low performance impact as well as its ability to integrate into a large-scale water environment. Although the selected approach lacks object interaction, the investigation discovered a majority of modern games do not require interactivity within water simulation.
Investigation into key requirements for water simulations within games discovered computational efficiency to be the most important requirement, with realism, scale and interactivity of secondary importance. Performing wave equation calculations on the GPU provided significant performance increases and suggests that using the GPU for water simulation within a game environment is a necessity. Beyond performing GPU calculations, other techniques were implemented to improve performance. Multiple meshes, with reducing vertex densities from the viewport were used to reduce overall vertex counts, while having minimal impact on simulation quality.
The water wave simulation is completely parameterised, allowing for complete control over each wave’s properties. This provides non-programmers with the ability to control and manipulate the simulation.
Various graphical techniques were utilised to produce a realistic final render for the water simulation. Water foam is generated by blending a foam texture with the base water texture based upon the change in height of a vertex each frame. Two normal maps are translated against each other and blended together to create a dynamic feel to the simulation, whilst simultaneously reducing visual normal map texture repetition. Specular lighting is modelled to replicate water shininess. The water simulation is locked to the camera’s X and Z position, consequently modifying texture coordinates during camera movement, to create the illusion of an infinite ocean.
The completed simulation with a few modifications and additional features would be suitable for implementation within professional practice. Creation of a static library, reflection, refraction and occluding geometry foam generation are the suggested improvements for a game industry ready simulation.