3 ms·
I slogged through implementing this for a game earlier this year. Man oh man, I bit off way more than I could chew comfortably.. I know this is well known amo
by VRay 8y ago
I slogged through implementing this for a game earlier this year. Man oh man, I bit off way more than I could chew comfortably..
I know this is well known among scientists and a lot of software engineers, and I should have remembered it from my math classes in college, but: It was new to me that just because you have a set of differential equations, a computer, and (relatively) unlimited time to evaluate them doesn't mean you can get a useful or stable solution
I eventually got it working thanks to the book by Bridson and Müller-Fischer and a few other papers I read through, but it took about 5 times as long to implement as I expected. Also I couldn't use it in my game, since I couldn't figure out how to handle my special boundary conditions and ran out of time, so there were a lot of situations where the water in the game would explode and fly everywhere. Hoo whee
- lasagnaphil 8y agoYep, Eulerian fluid simulations are pretty hard to control. I’ve also tried implementing a fluid sim for my undergraduate thesis (mainly looking at the Bridson book), but you have to play around with the parameters a lot to get a smooth result. Fiddling with timestep size, handling numerical instability, etc... I think that is why games use particle-based methods a lot more, because it is less finicky and works better in extreme conditions (well, the players seem to really love doing extreme things in the game...)