Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Water, water, everywhere.

This topic is 5576 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

There are currently two ways to implement water that I am looking into, FFT and Perlin Noise. I was wondering what methods out of these two people have used and which (to them) gave the most pleasing result.

Share this post


Link to post
Share on other sites
Advertisement
...And all the boats did sink.

Perlin noise is not bad, though somehow I don''t think it will look that good when animated. I mainly answered to finish the line in your subject.

------------
- outRider -

Share this post


Link to post
Share on other sites
Perlin noise looks OK for very large water bodies, like oceans. You have to keep in mind, that it is not controllable. If you want, eg, a calm lake, where the wind creates some flowing ripple patterns, then FFT is much better suited for that task.

There is, of course, an even better method: using an NSE solver. It approximates the Navier Stokes equations (they describe the reaction of a non-compressible fluid such as water) over the surface of a water body. The result is a very realistic surface behaviour, you''ll get the typical circular ripples, if something touches the surface. You''ll also get wave interferences, and ripples will reflect from objects, just as in reality. Drawback is that an NSE solver is pretty performance hungry, and not that easy to implement.

You can also combine FFT or Perlin noise with an NSE solver.

Share this post


Link to post
Share on other sites
FFT is fairly easy and realistic. There are some recent papers that I also recommend reading.

You can also go way back to the originals -- Fournier & Reeves, Peachey -- and use trochoids (which do LOD well, for example):

Hinsinger et al, "Interactive animation of ocean waves," 2002

For ripples and wakes, the following paper will give a good understanding of what''s going on, although it''s probably too slow for real time:

Loviscach, "A convolution-based algorithm for animated water waves," 2002

Finally, another recent paper discussed choosing the waves spectrum based on real-world information, either an aerial photograph or National Weather Service buoy data. This is an interesting alternative to tweaking with some of the oceanographic spectrum functions:

Thon & Ghazanfarpour, "Ocean waves synthesis and animation using real world information," 2002

Share this post


Link to post
Share on other sites
All those papers are on animating water, not rendering it.

I''m curious, Yann, do you have glittering waves near the horizon? The Hinsinger paper mentions implementing a shader following [Fournier 92: Normal distribution functions and multiple surfaces] but I haven''t gotten around to looking up what they''re talking about.

Share this post


Link to post
Share on other sites
Rendering is a whole different matter.

quote:

I''m curious, Yann, do you have glittering waves near the horizon? The Hinsinger paper mentions implementing a shader following [Fournier 92: Normal distribution functions and multiple surfaces] but I haven''t gotten around to looking up what they''re talking about.


Me neither, haven''t read the paper yet. My waves kind of glitters when the sun strikes them, but that''s the standard perpixel specular shader effect (you know, the typical viewdependent long cone of glittering water, going from the view to the horizon when the sun is low). Other than that, there is a slight glitter from the reflected environment (sky + atmos), which gets stronger towards the horizon due to the smaller Fresnel viewangle.

I don''t know if that is what the Hinsinger paper is talking about, though. Hmm, do you have a screenshot of that effect ? (or is there one in the paper ?)

Share this post


Link to post
Share on other sites
I had a go at the FFT version of ocean waves (from a paper that i can''t remember, but I''d say it is well known). Lets just say it didn''t work . But I think I will have another go at it, I''m not ready for Navier Stokes yet.

Share this post


Link to post
Share on other sites
RobertC, there are two FFT implementations out there that I know of. Here and here. The paper by Jos Stam "A simple fluid solver based on the FFT" has some useful sample code as well.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!