
|
Get the Flash Player to see this player.
|
Advected River Textures, my Master’s thesis research, aimed to realistically render and model a complex fluid volume as it moves over arbitrary terrain data, with the added constraint that any fluid sources or sinks for the fluid flow must be able to be created outside of simulation space. Essentially, the goal was to simulate a section of a river, in real-time, in as accurate a way as possible, while still maintaining fully interactive frame rates.
Simulating a large fluid body (such as a river) as it flows over terrain is problematic because in order to achieve realistic behavior in the fluid surface the interactions between both the fluid and itself, and the fluid and underlying terrain (river bed and banks), must be accounted for. Traditionally fluid systems that need to model the interactions between fluid and obstacles (such as terrain) are solved with a full 3D fluid solver, but in the case of large scale rivers it is currently not feasible to employ a fully 3D solver and still retain real-time operation of the simulation.
Our approach to the problem was to do as much work in 2D as possible (via a stable Navier-Stokes solver), and augment it with another highly efficient method for adding three dimensional flow to the fluid system (Hydrostatic Pressure Columns). We also use a procedural wave generation method to yield the highly detailed fluid surfaces that are frequently characteristic of real-life rivers. In order to convincingly move (or advect) the procedural waves throughout the fluid simulation we used a visualization technique known as texture advection which we achieved through the help of a method I dubbed Advection Particles that ties portions of procedurally generated data to an underlying fluid simulation.
We also used a technique I called Impulse Driven Navier-Stokes as a means for achieving a constant flow within the fluid simulation. Since our goal was to simulate large bodies of fluid, that themselves were only a small part of an even larger body of water, we needed a way to generate a moving fluid volume where the system’s source was somewhere far outside simulation space. We constantly apply velocity impulses to the fluid volume cells in a specific way (such that simulation stability is retained) so we can approximate how a fluid volume would act if it had the force and momentum built up behind it from a huge mass of fluid that originated somewhere far away and above the current altitude of the fluid volume being simulated.
The paper based on my thesis has been accepted to CASA 2009 and published in Computer Animation and Virtual Worlds Volume 20 Issue 2-3 (June 2009) by Wiley InterScience.
If you’d like to try implementing a similar fluid solver, or you’re brave (or in some way deranged), my Master’s thesis is available here for your viewing pleasure.
For the curious, my thesis took approximately 2 years to complete. The thesis itself was typeset in
, using Kile. The demonstration project was written in the D programming language, and compiles on Windows and Linux. The source code is roughly 30,000 lines of code long, and the resulting executable requires 3.7 GB of RAM at peak usage (for the scenarios seen in the above video). The aforementioned video capture was taken while the simulation was running at 1280×720 resolution, in real-time, at between 60 and 120 frames per second on a modest dual core Athlon X2 3800+ (the fluid simulator itself is not parallelized and maintains interactive rates on a single core).
