How are Gerstner wave normals derived?

659 Views Asked by At

I'm looking at this GPU gems article on water rendering. It gives the following tangent space vectors.

enter image description here

I understand the normals N are calculated as the cross product B x T, but I can only seem to derive the solution for the singular wave case (no summations).

The problem is I end up with extra terms that I can't cancel when there are summations. e.g. For calculating the x component of the normal vector.

N.x = B.y T.z - B.z T.y
= (ΣQi Di.x Di.y WA S()) (ΣDi.y WA C()) - (ΣDi.x WA C()) (1 - ΣQi Di.y2 WA S())

Without the summation (single wave case), this cancels to the correct solution. However, with the summations we end up with additional terms which I can't seem to cancel.

Is the equation for N in this article wrong? Are we unable to simply sums the individual normals for each Gerstner wave as the equation suggests?

Update I think the problem as I see it is because the derivation appears to rely on ΣxyΣy = Σxy2

1

There are 1 best solutions below

0
On

I contacted the author of the GPU gems article to confirm, and he kindly responded (even though the article is 16 years old). There are in fact additional terms that were dropped in equation 12, and therefore it is only an approximation. He suggested that equation 12 would not likely be used today, but instead the normal should be calculated as the cross product of the tangent and binormal.