Skip to main content
GameDev.net gamedev.net
🔒 Locked

water fall simulation

Started by Majestik666 Dec 9, 2002 at 5:14 AM 2 replies 800+ views
Original Post
Majestik666
Majestik666
i''d like to create a water fall simulation in a level of our game, but i don''t really see how to make a good and low cost simulation. i was thinking of making a moving texture, could the results be good ? particles would be too much cpu consuming ... any other possibilities ? thanks
Yann L
Yann L
As always with natural effects, you have several possibilities. The most simple one is using multiple mesh layers with an animated texture. Surprisingly, this approach is also the best looking, if you add appropriate shader effects. But the waterfall is non-interactive, ie. it will have very limited interaction with external objects. If you want full interaction, you should use meta-particles. You won't need tons of particles, a few hundred are enough. After each particle update (taking into account collision and physics), you create an isosurface (eg. using marching cubes), and render it just like the mesh layer approach.

About the rendering: a simple vertically animated texture can already look nice, but a bit fake. If you want realism, you should use a Perlin noise procedural texture, animated as if it was falling down. Animate it at vertex level (displace vertices of the mesh layers to reflect coarse water movements) and pixel level (animated bumpmaps to simulate the water detail).

Use pixelshaders to simulate the perpixel refraction and reflection behaviour of the water. In addition to that, you can use blurring and an normal dependend decolouration to white (saturate it over the perlin texture, then blur in the direction of the waterfall). This will give the typical wild water spray motion blur effect a real waterfall exhibits.

Add a few spontaneous spray particle systems where to waterfall touches external objects, like rocks or the lake surface it falls into.

If you want to make it really perfect, add a volume fog effect around the whole waterfall, with an animated 3D turbulent noise function. This will simulate the 'aura' of a large waterfall, when tiny water particles diffuse and create a kind of water haze effect surrounding it.

/ Yann

[edited by - Yann L on December 9, 2002 1:32:56 PM]
Subotron
Subotron
quote:
Original post by Anonymous Poster
yann: your method sounds like it looks awesome. Wish I could see it (or make it myself).



I actually will give it a try in my almost-totally-procedurally generated terrain (but first I have to finish my Solar System demo)

I think I''ve got enough work for the next 2-3 years...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.