Although by no means the bleeding edge of SPH simulations, it does implement a tweaked Kd-Tree search for n nearest neighbours, the standard SPH functions (kernels, viscosity, and pressure), and runs at interactive rates.
Click on the image to try it out:
I’ve been playing around with SPH simulations, and in SPH as in any physics based simulation, the length of the time step in the integration process is critical. So, this video shows what happens right at the edge of numerical stability. With a fixed time step, the force calculation sometimes gives a force that’s too large to be reasonably dealt with – this then causes a little chain reaction and results in some pretty wild behaviour….I should say that not everything in the video is cause by numerical instability – I’ve implemented a basic user force input that acts on the particles when the user clicks the screen.
Simulations are used for predicating things (i.e. how a structure will deform, how a fluid will flow, etc…). However, their predictive qualities are always subject to conditions and restrictions – there is no perfect physics engine (yet), and we are certainly a long way away from human interaction simulation (another one of my favorite topics…). As a result, simulations are often used simply as a starting point, sometimes for more rigorous analysis, but also for purely aesthetic choices. From that perspective, perhaps studying very “unrealistic” applications of simulation engines will open some new geometrical directions….