Mini Bio

My PhD research was in computer science and complexity science, although I also published in web-technologies (and even paleontology!) I have founded, run and sold a high-tech business based on my research and written two technical text-books published by Elsevier.

More »

Real-Time Fluid Dynamics

April 2008

I developed a system of fluid simulation based on the Navier-Stokes differential equations and using adaptive cell-sizes for real-time simulation.

The Navier-Stokes equations model the change in the velocities of a fluid over time. This applies to movement of air and could be useful for smoke effects, but is primarily useful for water simulation.

Current water-surface simulations use an approximation applied to a height-field but don't simulate what is going on underneath. They therefore produce results that look odd. In particular they produce results that appear to have unnaturally high surface-tension.

On the other hand, doing it 'right' with Navier-Stokes isn't very practical on current hardware. Solving the differential equations, even numerically is time-consuming. Other developers have suggested ways to make this simpler for real-time applications, where typically we want visual effectiveness, rather than physical accuracy. Still, for reasonable sized bodies of 3d water (in a game level, for example) it is impractical.

I developed a system that used extant approaches to approximately solving the differential equations, along with a novel adaptive division scheme that is capable of simulating water in 3D over the whole level. As water is introduced to an area, that area will be split into cells for simulation. There are more cells near the borders of the water object, and no simulation cells where the water is absent.

This will allow the client to bring Navier-Stokes water simulation into their game engine without having to specifically create simulation areas for the water. Level designers should be able to place water sources, sinks, and fluid-affecting forces, just as they would any other game entity.