FFT Ocean Waves

Started by
2 comments, last by FreneticPonE 11 years, 3 months ago

I'm researching the theory behind the NVIDIA SDK sample "FFT Ocean" which is based on this paper:

http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

It gives an explicit formula for evaluating the surface heights at a given time t. As the NVIDIA demo shows, you can do FFT in real-time and animate the ocean, and the performance is pretty good. However, I am wondering if it still takes too much GPU resources, as ocean is only part of a 3d game scene like a crysis level. So in practice, do people just use the FFT method to build several heightmaps, and then scroll the heightmaps at different speeds to animate the waves? The NVIDIA SDK also has an "Island" demo, and I looked at the water shader, and it appears they are just scrolling heightmaps and not doing the FFT ocean in real-time.

-----Quat
Advertisement

You could probably get away with a very coarse, tiled FFT (realtime) heightmap, and filling in the details using cheap procedural noise, or something like that.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

On a decent GPU (let's say Nvidia GTX 570) you can do a 512x512 inverse FFT in a fraction of a millisecond. So for that sort of hardware, it's definitely very practical.

On a decent GPU (let's say Nvidia GTX 570) you can do a 512x512 inverse FFT in a fraction of a millisecond. So for that sort of hardware, it's definitely very practical.

Yah, this for a coarse approximation and then perlin noise or something for normal mapped details plus a big one to remove visible patterns. Here's what Nvidia did: https://developer.nvidia.com/sites/default/files/akamai/gamedev/files/sdk/11/OceanCS_Slides.pdf

Though frankly the perlin noise blending at large scales kind of dampens the nice FFT effect out to something that doesn't look as good (in my opinion). But heck, it looks a lot better than the tiling does.

This topic is closed to new replies.

Advertisement