


Each box has various properties, like velocity and density. Think of a fluid as a collection of boxes or cells.

To that end, I'm going to pretty much ignore them except to very briefly explain what they say.
#Fluid simulation how to
You can also read all about how to parallelize the simulation and render the output in 3D in my Master's thesis.įluid simulation is based on the Navier-Stokes equations, which are fundamental, interesting, and difficult to understand without a good background in physics and differential equations. If you want a more in-depth look at what's going on, that's the place to go. The simulation code and ideas that I'm going to present are based on Jos Stam's paper Real-Time Fluid Dynamics for Games. With that goal in mind, I'm going to show you how to do simple 3D fluid simulation, step-by-step, with as much emphasis on the actual programming as possible. Unable to find something geared towards somebody of my mindset, I'd like to write the page I wish I'd had a year ago. The available reference materials were all very good, but they were a bit too physics-y and math-y for me. The basics of the fluid simulation that I used are straightforward, but I had a very difficult time understanding it. In the spring and summer of 2005, I wrote my Master's thesis on high-performance real-time 3D fluid simulation and volumetric rendering.
