| Submitted by , posted on 03 March 2002 |

Image Description, by Here is what I've been doing recently. After some research I've implemented some realtime water algorithms I found to be interesting. The top row shows two shallow water algorithms. On the left I use an algorithm that was used in an old SGI demo called Newave. On the right I've implemented the old 2D demo water (there is a description of it in "Game Programming Gems 1" and somewhere on gamedev).
The bottom row shows deep ocean water simulation described in Tessendorf's paper http://home1.gte.net/tssndrf/index.html and by Lasse Staff Jensen (http://www.gamasutra.com/gdce/jensen/jensen_01.htm). On the left is the basic statistical water method and on the right with the choppy waves displacement applied. The statistical water is tileable so you can generate bigger patches of water by tiling the geometry.
I've started my research after reading Jensen's paper and seeing screenshots of it, but being unable to find any running demo or source code implementing the deep ocean water, so I had to do it on my own to see it in motion.
A running demo of the water algorithms can be downloaded at www.chengine.com. (The demo also implements another method called "Gerstner Waves" but the results are rather unconvincing, further I've removed the dampening from the 2D water so it runs forever, but oscillates a bit heavily). I haven't put much effort into shading the water, it's just a water texture with an environment map blended on top of it. Further you can download the source code for the water surface simulation. (Just download the GameEngine source code and look into the Terrain library). I didn't post the source code for the demo itself because it is quite a mess and so I don't want it to become public :)

[prev] | Image of the Day Gallery www.flipcode.com | [next]

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.