Jump to content
Posted 15 October 2012 - 02:42 PM
Posted 15 October 2012 - 06:40 PM
“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
Posted 16 October 2012 - 04:16 AM
Heya, it's been forever since I worked with Tessendorf waves but I recommend this website, it shows how to generate the waves along with the normals using the FFT, code included. Note there are two parts! Or if you are not using the FFT method, there is a - admittedly rather arcane - description of the normal for Gerstner waves in this GPU Gems article, have you looked at it?
If everything fails, you can always use good old finite difference approximation to evaluate the normal, which is a bit more expensive since you have to sample the wave multiple times, but at least is general-purpose.
Edited by DavidM, 16 October 2012 - 04:17 AM.