Hi all.
I’m very new to Unity. Just evaluating it currently for possible use in a government visualization project I’m working on.
As a mac user for many years that never knew this product existed until a week ago: holy cow! This is like the best kept secret in the mac world (well, for us graphics types anyway)! Plus a very tight and responsive interface (reminds me of Houdini off the bat, with the obvious knods to Final Cut Pro).
To my question:
I am in need of the Fast Fourier Transform (FFT) algorithm implemented in Unity for work simulating ocean waves.
Does anyone know if this has been done?
Ideally as a C++ hook so it’s as fast as possible?
But if not, in script?
Is it even possible or are there limitations I’m not yet aware of that will make it very difficult?
Thanks for any thoughts.
-Len
Here is an article on doing FFT in C#.
Start with that, you can always move it into a C++ plugin later.
http://www.codeproject.com/cpp/howtofft.asp
On the other hand, why not do it on the GPU using pixel shaders and vertex shaders? Using vertex shaders you can deform the actual geometry. Thats what most games in this day and age do. That would run a LOT faster.
As a start:
http://forum.unity3d.com/viewtopic.php?t=4685&highlight=wave
Thanks for the quick response Joachim.
That C# reference is useful.
I have read a bit about implementing FFT on the GPU but I’m a newbie at all this realtime stuff so I want to start simple and see some success.
I’m stil collecting information about different approaches to realtime water.
The example you sent is nice.
It’s all very fascinating and a bit overwhelming if you’re just learning about realtime shaders for the first time.
Thanks again.