Introduction to Position Based Fluids
physxinfo.com
physxinfo.com
Remember when we were promised we'd someday have supercomputers in our pockets? We do.
Well, ok, fairly big pockets in the case of the iPad, but still, you get my point.
My netbook is probably half the speed of an iPad.
It would be fun to put together a custom OS-less AMI to raytrace partial frames in realtime on EC2. 20 instances spun up in a few hundred milliseconds could do pretty substantial real-time raytracing.
EDIT: Having said that, water simulation is HARD.
You can see it especially in the last demo in the video. When the water spreads across the floor, it looks a little like a puddle of blue dye is diffusing into the water, and it's hard to tell how it would look if the water were more realistically transparent.
I work in a group with scientists whose sole job is to solve the Navier-Stokes equations. Now that's realistic.
:)
Non-trivial closed-form solutions are hopeless. Existence of solutions is a little less hopeless. Existence of solutions over small time horizons has been proven. This is all in three space dimensions.
There is a theorem stating that if global-time solutions exist and are unique, then computationally computed approximate solutions are 'good'. Moreover, they get better as you refine the computational domain.
Finite element methods are a special case of Galerkin methods. Finite element methods are good enough.
Primarily because of the distortion of the visuals through the water. This simulation fakes it somewhat, which you can see with the distortion being somewhat blocky.
I think the reason you see that is that they don't really simulate surface tension, but use a rather crude trick [0]. My uneducated guess is that in oder to achieve water that looks ok at small scales they would have to increase the size of the particles to the point it doesn't look smooth anymore.
[0] equation (14) of http://mmacklin.com/pbf_sig_preprint.pdf
You completely blew my mind there! I'd never noticed that before.
Does the size of a dew drop relate to the size of the particles? i.e. can we estimate the size of water molecules just by looking at the maximum dew drop size?
Surface tension is _not_ a function of the size of water molecules. In fact you can change it quite easily just by adding a little soap.
This is great for real time though. It's using a form of SPH which is far easier to adapt for GPUs, and can crunch through those particle-particle interactions.
High end offline water sims would use a different algorithm (usually FLIP), maybe run for several days to sim a few seconds and occupy 10's of Gb of memory.
If anyone's interested, download a copy of Houdini Apprentice for free and have a play.
Here are slides from a presentation about Uncharted 3's water:
http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/1_Visual...
I believe they've talked elsewhere about the complexity of the water sims they did for areas that involved boats and an ocean you could swim through, but I don't have a link handy.
If this technique worked equally well in both domains it would go from "impressive" to "miracle". In the meantime, we can certainly applaud it for the things it does do well!
Of course, you do have the problem of what to do when the water sim uses up all the available GPU compute power and bandwidth - not much left to render, in that case...
The difference here is that it's showing interaction between the water particles and things that they impact on: characters, boundaries, piers, and behave in a more realistic way than games have previously had.