Hello everyone,
Similar to others who’ve had issues, I been working on converting the equations from [Nvidia’s GPU Gems Gerstner wave article][1] into a material function, specifically equations 9-11. I am confident that my displacement works (I had to switch around the x and y components for the direction though), however I’m not so sure that my normals are correct - at least, they don’t match UE’s standard lighting. For instance, here is how a singular wave looks (with a steepness of 0), with normals on vs normals off (I’m not sure why my normals are reversed - first image - but my greater concern is the sharp lines where there should be more of a blend):
Here’s my material function (I switched around D_x and D_y in order to fix an issue I had with the displacement - reverting them back only switches the direction of the normal):
Did I make a mistake in lining my nodes? How can I get better looking normals using these equations? Thank you for your help!
I also tried computing the normal via equation 12, but this gave me similar results. Here are the parameter values I use:
UV: TexCoords()
Direction: (1,0)
Rotation Center: (0.5,0.5)
Wavelength: 0.1
Steepness: 0
Amplitude: 50