Gerstner Wave Normal map

Its been a busy 3 weeks, I needed to prepare for the poster presentation and had great work experience opportunity. I was still able to squeeze in a bit of time to continue the work on the water. I've been looking into making the Tangent Space Normal Map that the Gerstner Wave tutorial didn't cover. There seems to be a Gap in this area that hasn't been fully been realised and I thought I'd try finding out.


Equation 12 for Tangent space Normal map for Gerstner Wave.
Nvidia GPU Gems book does not define what P is.
I've been looking at the Nvidia GPU Gems book that the Gerstner Wave Video was following: https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html. The video really explained what the confusing equations are doing and it made things easier for me to understand. I was able to go through equation 12 of the book without much problem.

There was one issue with the equation. When making S() and C(), I don't understand what P is. Normally there is usually something in there defining P, but there are 2-3 versions. There is P(x,y,t) in Equations 3 and 9. I tried using equation 9 but that produced weird results and equation 3 uses complex maths and partial derivatives. I went to the Unreal Engine Discord server to get some answers. I found out that P could be the position and thought that finding out fully what P is might not be worth the hassle as it uses complex math such as partial derivatives. So running with the advice of using the position, it turns out that I already had S() and C() in the Gerstner wave I just needed to complete the rest of the equation. I also found that other people also use the same method I am using to compute the Tangent Space Normal.

P(x,y,t) in equation 9 
P(x,y,t) in equation 3

Here is the final material setup for the Gerstner Wave with the Normal map:

Gerstner Wave material function final setup







Comments

Popular posts from this blog

Environment Showcase Concepts

Distance Field water foam

World alignment (Tri-planar mapping)