Jump to content

  • Log In with Google      Sign In   
  • Create Account


FFT Ocean Waves


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Quat   Members   -  Reputation: 402

Like
0Likes
Like

Posted 02 January 2013 - 07:16 PM

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

Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 8188

Like
0Likes
Like

Posted 02 January 2013 - 07:31 PM

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.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 MJP   Moderators   -  Reputation: 10277

Like
1Likes
Like

Posted 02 January 2013 - 07:32 PM

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.



#4 Frenetic Pony   Members   -  Reputation: 1192

Like
0Likes
Like

Posted 04 January 2013 - 08:17 PM

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.


Edited by Frenetic Pony, 04 January 2013 - 08:20 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS