Saturday, July 12, 2014

Jos Stam's Stable Fluids

Finally, omg, after many years of wanting to implement this algo, I finally did it! The last few days were really good, I learnt lots, as well as figuring out what I don't understand, and where to focus my efforts.

For example, the advection of the density field it was quite eye opening to see how the reverse lookup worked, and then how the sampling is done by bi-linear filtering. On the flip side, the pressure projection I really have no idea what's going on. That, was utterly a black box for me. It has _something_ do do with the gradient of the velocity field, or so it seems, so maybe another look through the code would help.

It's been fun, perhaps I can find a simple sph simulation I could cobble together.

No comments: