Gerstner Wave Normal Map


#1

Hi,

I wasn’t sure if this is a VFX or Tech art thing. I’m looking at the Nvidia GPU Gems book https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html and I’m trying to create normal maps for the Gerstner waves. I’m strugglling with one thing. I dont know what the P is for the C() and the S() equations.

Here is the Normal map equation:
png

Here is the actual material setup without the P: https://blueprintue.com/blueprint/7o0vzok0/

I wasn’t sure if Its important to have it in or not and I wanted to confirm with you guys if this is ok? My math isn’t as good as it used to be and I’m looking into doing a refresher course soon but in the meantime I could use some help.


#2

Isn’t P defined at equation 9?


#3

Yeah I did use equation 9 but i ended up with some weird result. I’m not sure if that is whats supposed to happen.


#4

P is the derived 3d position for a given x, y location at time t, if I’m reading it correctly


#5

If i properly remember, P is the displaced position of a point from the sea plane.
With Gerstner waves you only use (x,y) for each plane’s point to calculate new (x’,y’,z’) position.
Then you need this position (a.k.a. P) to compute normals.
I have on studio’s pc some materials for gerstners: in the past I worked on it but in the end I abandoned gpu gems formulas and used theory basics ones.