Friday, November 19, 2010

SPH fluid particles, oh my!

It seems that the SPH fluids had a quite big problem in the way the algorithm was implemented. The problem in the implementation led to things like this:

Oh my indeed! Not very physically correct looking! The fluid particles drop straight down to a horizontal collision surface, so how can there be big sideways motion in just one direction? Oh well.. after a day of furious coding the algorithm is now much better implemented and here is the result with the exact same settings:

The fluid doesn't really look the same because the calculations are done differently, but at least it seems much more physically correct as the fluid spreads evenly in all directions and not just one. After some parameter tweaking here's the final result:

Ahh, much better! For technical information see the commit message.

But there's more! As a result of this new correct implementation I hear Stephen's viscoelastic springs addition to SPH paticles is more stable than ever. He was also kind enough to upload some quick teasers of what's to come:


  1. Wow, really cool! Remember that show with rabbits and cows and breaking materials (like some breaking paper or a candy floss)? I wonder will it be implemented too? :)
    Thanks for sharing these promising videos and good luck with your decent work, Jahka!