fast Noise generation for water

Started by
7 comments, last by Grizwald 20 years, 6 months ago
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
I love me and you love you.
Advertisement
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===--
God bless your little heart and soul
I love me and you love you.
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:


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...
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===--
(Any good document explaining how to do FFT water ?)

For a FFT implementation look at my engine at www.gameprog.it/typhoon
Regards,

Stefano Lanza
3d coder
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>

This topic is closed to new replies.

Advertisement