Saturday, March 26, 2011

Fluid simulations are hard

I would think this post might be sarcastic like CG is hard :'( but no. This post is to explain why fundamentally fluid simulations are hard to control.

Real World Example: I give you a bucket of water and a variable speed fan. For a 3 second shot I need you to get the water swirling at just the right speed, not too fast not too slow. You have 1 second of "run up" time. Go. You take the fan, turn it to a setting try it the water splashes all over you and the floor. Nope too fast. Slower, water splashes all over you again. You feel like an idiot. Slower, The water splashes all over you again. Now you're mad, REAAADLLLY SLOW!!! the water doesn't move. ok little faster, water doesn't move. Ok little faster, water moves right for 1 of the 3 seconds. turn it on and off. 2 of the 3 seconds.... Ok that was a 40x40x40 now you get the titanic sized engine, and a small lake. Turn on the engines! 3 seconds! This should be easier b/c remember all your experience from the bucket? Huh, that's not really helping now is it? no. Not really. In fact its so different the titanic sized engine isn't really the best thing for this. Maybe you should find another way, 1000 motorboat engines! Its expensive but its fast to turn on and off! 2 weeks of trying and it doesn't move much water even tho there are so many. Well that was an expensive test. how much does it cost to bring the titanic engine back in here?
Here's the kicker. That's just 1 setting, magnitude. there are hundreds of settings. Think you are tweaking the right one?

Morpheus, "and that's air you're breathing? huh... AGAIN."