How do i achieve circular Gerstner waves?

Hi all,

I’ve recently put together a Gerstner shader interpreting the equations supplied on the nvidia GPU gems page found here Chapter 1. Effective Water Simulation from Physical Models

I was able to get directional waves woring perfectly fine however when implementing the circular waves equation i get undesired square shapes moving to the origin rather than a full circle

How do i achieve the circular pattern displayed in the diagram on nvidias page?

Hi

I think the formula on nvidias page is incomplete. In my opinion, what you see in the equation 11 is acutally supposed to what mathematicians call the 2-Norm and not the absolute. Instead of calculating the abs, square each component of the Vector, sum them up and then take the square root of that. Hope that solves your problem.

Remove division by absolute before normalizing direction vector.

Hi,

Thanks for the reply, I do however have a working Gerstner wave for my displacement using just equation 9 (i believe the equations afterwards are to calculate normals)

What im particularly interested in is how it provides the equation for circular waves slighty above equation 9 and instructs to replace “Di” with this new equation which is what i have done but am not achiving the desired result

I did not realize you had a normalizing function down there too. (See the comment below by Deathrey). You should be able to remove the division altogether, since it does nothing, it might even be the reason for the squares

Basically what might happen is: (x,y are positive)

abs((-x,y,0)) = x,y,0

And then your division maps:

(-x,y) → (-1,1), (x,y) → (1,1) etc

By dividing each component with its absolute value. This would explain where the issue comes from.

Hi
Did you get this up and running? I’m struggling with problems with circular Gerstner waves, just opened a new thread here, because my problems look different from yours. Are your waves concentric or did you find these strange movements as well after removing that division by absolute?