Jump to content
  • Advertisement
Sign in to follow this  
Paul7

Water Simulation - FFT/ Perlin Noise

This topic is 5133 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

I`m trying to simulate the movement of water (a lake) by creating a heightmap using FFT as this appears to be the most suitable method for this situation. I have read "Deep-Water Animation and Rendering" by Jensen and "a simple fluid solver based on the FFT" by Jos Stam but have having great difficulties in understanding it. In particular in "Deep-Water Animation and Rendering" I am unsure of all the notation and which parameters I have to define to begin with. It also only seems to mention a horizontal position (X), how does this apply to making a 2D heightmap? Does anyone no any other useful links on this or are able to explain things to me in a simplified version? Thanks [Edited by - Paul7 on October 26, 2004 3:28:02 PM]

Share this post


Link to post
Share on other sites
Advertisement
I remember a demo with this method. its in nvidia's developer site. I cant find it now, but try to look for it. maybe its in their FX Composer or something. Anyway, maybe i can help you, if you have a more specific question, and if ill find some time.
In general, the FFT method just uses an inverse fourier transform to take a lot of random waves, and sum them up to create the height map. each position on the map has a height, and moves only vertically. It looks like water, because the amplitudes are calculated using an empirical equation, philips spectrum, if i recall curectly.
Just read a lot, again and again, and read a bit about fourier transforms, you should be fine. leave the navier-stokes equations aside for now.

Share this post


Link to post
Share on other sites
Thanks pickups, I`ll just have to keep going back to it and re-reading it, i`m sure i`ll get it eventually.

While I`m trying to figure that out I`ve decided to try animating the water using Perlin Noise.

Ive done this quite easily but am just unsure how to animate the perlin noise heightmap. Any insight into this would be much appreciated?

Also what dimension heightmap would you recommend using, should I do say 128x128 and tile it? if perlin noise is tileable?

Thanks.

Share this post


Link to post
Share on other sites
I animate perlin noise heightmap by using 3D perlin noise (x,y,t) with 3rd dimension being time to create a sequence of heightmaps that I cycle through and lerp between. I make the noise tileable in all dimensions (including time, so that the animation doesn't pop when you repeat the time cycle). To make perlin noise tileable you can wrap the integer grid coordinates used to lookup the gradient noise (ie, (ix & tileMask) instead of ix).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!