10

How would I go about implementing fluid dynamics in a game, such as can be seen in this video?

Trevor Powell
  • 21,382
  • 1
  • 59
  • 94
Edgar Miranda
  • 401
  • 4
  • 9

3 Answers3

18

It looks like the game is just using a fairly simple particle fluid simulation. Basically, the "water" consists of little balls that move according to Newtonian mechanics, fall under gravity and repel each other over short distances. The blobs of water are then drawn around the particles using something like metaballs to smooth the surface.

Ilmari Karonen
  • 8,347
  • 1
  • 29
  • 39
4

Looks very similar to the water in PixelJunk shooter. There is a PDF on how the water was done:

http://www.maisonikkoku.com/yonder/SIGGRAPH2011/SlidesForADBAD.pdf ^^link has gone dead... you can get the cached version from google search, but if you're very very lazy, then you may view this copy if you need to: http://dl.dropbox.com/u/203979/SlidesForADBAD.pdf

Richard Fabian
  • 3,567
  • 1
  • 23
  • 32
0

Try to read great serious of articles from Intel about fluid simulation for video games http://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1/

And also try this, fluid simulation in Alice game http://developer.nvidia.com/content/fluid-simulation-alice-madness-returns

iodiot
  • 137
  • 6