Flui°D°emo is an interactive 2D physically based fluid simulation using a Smoothed Particle Hydrodynamics (SPH) approach as described in the paper "Particle-Based Fluid Simulation for Interactive Applications" by M. Müller et al., which utilizes the Navier-Stokes equation and SPH to simulate the behaviour of the fluid. The resulting differential equation is solved with a numerical integration (basic verlet).
The whole project is written in C# 3.0 against the .Net Runtime 2.0.
The visualization and input handling is done with OpenTK - what else. ;-) (GameWindow)
As a by product a little framework for a flexible 2D particle systems, including emitters, consumers and a renderer for Meta-Balls (Blobs) was developed. The Meta-Balls are drawn with a Render-To-Texture (RTT) technique using the framebuffer extension (FBO), if available, a procedural generated gaussian distribution texture and alpha-testing.
The collision handling is done with the Separating-Axis-Theorem (SAT) and Object Bounded Boxes (OBBs).
I released the project as open-source under the GPLv3 license.
By the way, most of the people know Lutz Roeders Reflector, so a .Net binary innately comes with the sources. ;-)
You can also watch a video at YouTube.
Download the Zip here (1594 KB)
The download includes the binaries and the source code (including Visual C# Express 2008 solution).
See "bin\Readme.txt" for further instructions and requirements.
There are a lot of enhancements, which could be implemented.
Currently the whole geometry is drawn in intermediate mode, because it's simple and the framerate for this version is OK. But for sure it would be better to use VBOs.
Another point is the Meta-Ball renderer and the RTT with alpa-test, which would be nicer implemented with a shader.
My first goal was to build a game using the fluid simulation. And I already have some ideas for a game, but I didn't find an idea that took off.
So, when you have some ideas for a game or other suggestions, reviews, comments, questions, ... don't hesitate to post a comment.