Archived

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

Grizwald

fast Noise generation for water

Recommended Posts

What is a good algorithm for generating noise to use as a water wave? It will be implemented in a pixel shader. Would perlin word for this? I need it to be animated, but smoothly

Share this post


Link to post
Share on other sites
You don''t want to use noise to make water waves, you should look into using FFT. FFT has several distinct advantages (1) it can tile, making its implementation rather speedy (2) it is EXTREMELY real (3) It can still be a bit random because of the Gaussian Random in the phillips spectrum. I implemented mine a while back based on a paper. There are a couple papers readily available, but the best one to find is titled "Deep Water Animation and Rendering". It not only explains FFT, but also will tell you how to do the caustics and lighting for the water. A very nice thorough paper.

--===LITHIC===--
--===WWW.Decimation.TK===--

Share this post


Link to post
Share on other sites
Perlin noise can look pretty good, from what i''ve seen it looks even better than the FFT based implementations, but that''s quite subjective. It''s not as fast though.

I''m working on a water-rendering algorithm and I''m using a derivative of perlin noise and it currently looks like this:


Share this post


Link to post
Share on other sites
That does look pretty good. However, it doesn''t look much like an ocean imo, which is what FFT is supposed to be good at generating...

Share this post


Link to post
Share on other sites
FFT can be adapted to any kind of water because of several parameters like wind speed, water current, wave height, and even choppiness with an additional part that updates X,Z values as well as Y. It also updates realisticly as well that it looks like wind patterns. It can be saved in a lookup table if you want to get rid of the gaussian random factor as well for a small speed gain.

--===LITHIC===--
--===WWW.Decimation.TK===--

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There are any number of FFT water implementations out there. It is very easy to program. Search these forums for some links. Here are two:

<a href="http://www.unet.univie.ac.at/~a9104678/Chengine/Pages/Screenshots.htm">here</a>
<a href="http://www.people.fas.harvard.edu/~reichard/water/">here</a>

Share this post


Link to post
Share on other sites