Water Simulation Incorporating Erosion

Combining GPU-based water and erosion solvers for real-time terrain formation and fluid interaction. Built all in C++ using DirectX 11

A shallow water simulation

This project explores the combination of water simulation and terrain erosion to generate natural landscapes that evolve dynamically. While most real-time water simulations in games focus on surface visuals, this project integrates hydraulic erosion, a real-world process that shapes nearly all terrain on Earth.

The result is a GPU-driven simulation that models flowing water and terrain changes simultaneously, allowing for real-time, interactive terrain evolution. This approach can be applied to open-world games like Cities: Skylines 2 or as a terrain generation tool for artists to sculpt natural landscapes interactively.

Developed as my 4th Year Honours Project and Dissertation, the system compares the performance and visuals of five different shallow-water solvers and two erosion techniques (hydraulic and thermal), implemented entirely in C++ using a DirectX 11 framework.

Showcase of the Implementation

Water Realistically Interacting with the Terrain

Timelapse of hydraulic erosion in the form of rain on a complex terrain

Example of user controlled erosion where the user can place water, control the strength of hydraulic and thermal, or use evaporation or rain, all in real time

After eroding, the water follows the paths created by erosion in a natural way

Showcase of many examples

Results.

Every step of the simulation was tested using Nvidia Nsight profiling tools to gather accurate performance metric of each step. This allowed solid comparisons to be made between the steps, and evaluate where bottle necks where in the implementation. For the erosion techniques, the visual difference of various erosion parameters and starting terrain were tested, and it was found that the model is able to create realistic and accurate terrain features such as rivers and waterfalls, regardless of initial terrain which other methods could normally struggle with.

Placeholder

A 4k terrain created using Fractal Perlin noise.

Before Erosion.

A 4k terrain created using Fractal Perlin noise.

After Erosion.

A difference map of the terrain, highlighting where the terrain has changed. Red = Increase in height, Blue = Decrease in Height