Posts

Showing posts from March, 2019

Gerstner Wave Normal map

Image
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 ther

Its GDC!

Image
Its GDC and Ryan Brucks mentioned on Twitter he will be doing a talk on how he made his amazing water at the Tech Art Bootcamp. I just hope it becomes available on the UE4 Youtube channel and not on GDC Vault. I'd have to either pay for GDC pass or wait a year for it to become available. 😥 Here is the tweet: Hey GDC goers! I will be giving a talk at the Tech Art Bootcamp. This will go into everything about that one ocean scene everybody is always asking for a tutorial of, plus general methods for using shaders and distancefields for FX. Stop by! Mar19 10am. https://t.co/YfZKQs3LMQ — Ryan Brucks (@ShaderBits) March 4, 2019  Here is the shader I'm hoping to learn about:

Gerstner Wave Livestream

Image
I was watching the Gerstner Wave Livestream but there a few things that are worth noting down but I forgot what they were. So I went through it again and at the same time I created the material and made Notes. Here are the notes made: Mentions that Wavelength (L) and Speed (S) could be related to each other based on physics/gravity? livestream vaguely mentions this. Might be worth looking into. Time: 41:50 Some people divide the Gerstner Waves by the number of Gerstner Waves used for a nicer result. Time:51:30 Uses Screen Space Normals which is expensive. Requires turning off tangent space in details panel of the material to set it to world space. Time:52:20 Says there is a way to do Tangent Space Normal (Cheaper) but does not cover this using Cosine but he sticks to Screen Space Normal. Time:53:40 This is not related to the Gerstner Wave but mentions "Texture Bombing" to break up tiling. Might be still worth learning about for general purposes. Time1:05:1

Camera facing Texture

Image
I forgot to post this earlier, I was approached by someone and asked how to make a camera facing texture. I recalled a similar thing from a UE4 live stream of a material based on the Palantir from Lord of the Rings made by Alan Willard:  https://youtu.be/mig6EF17mR8 Camera facing Texture with some distortion effect - The texture is the logo from Ghost Recon Wildlands (It looks ghostly that's why I used this texture. 😄) Here is the material set up I learned and implemented: Material setup for Camera Aligned Texture  There are a few problems with the material where if you zoom out it somehow gets bigger on cubes or flat geometry. I will need to find some way to cancel out the scaling problem so it stays the same no matter the distance between the camera and the object. As for now, I am calling this done as I need to continue working on the water shader. Another issue is that there is this weird stretching for cylindrical/flat facing objects but I feel that is some

Gerstner Wave

Image
I remember a Water Shader that Ryan Bruck's made using 'Gerstner Wave'. Initially, I didn't know what Gerstner Wave was but then I looked at Nvidia's GPU Gems book:  https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html . It tells you exactly what it does and why it is important. It gives convincing and procedural looking Waves for water that is being used in the Games and Films industry. The equations/formula's for creating this looked scary and very confusing. It made me question if Ryan Bruck's used the material editor or HLSL to make the water. Ryan Bruck's Water Shader: I later found that there is a Livestream/tutorial by Dokipen that helps with figuring out how the Gerstner wave is made in the Material Editor. I will go through and see what I come up with. UE4 Gerstner Wave Livestream/tutorial by Dokipen: