Ice lake visual shader with Parallax mapping! Godot 4 tutorial #Godot #godottutorial #howto

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to the channel today we are going to create a Shader for ice Lake using visual Shader in the end we will have a ice leg similar to this for the tutorial I will be using gdo 4.2 but you could also use 4.1 it will work just fine and I'm also using an add-on called Shader lib and make sure you get the latest version 1.2.0 and now let's get shading right after the intro okay so for the effect we will use a technique called Parallax mapping and before we can understand what is Parallax mapping we need to learn about The Parallax effect so what is Parallax effect standard definition is on the screen which seems a bit convoluted so I will give you an example let's say you are sitting in a car and you look out the window you will get the feeling that the objects that are further away are moving slower than the closer ones that feeling or Illusion is called Parallax and a technique to recreate that feeling in computer Graphics is called Parallax mapping obviously we will not write our custom algorithm for that but we should know about Parallax mapping okay now I have a plane and I will create a visual Shader and a material for our Shader as well now we will assign our material to the plane and for our Shader I will be using these three textures for our ice leg for albo normal map and height map respectively and I will link them down in the description in our Shader first we want to assign our albo from the inspector so let's create a texture 2D parameter node I will call it main texture in the type dropdown select color because we want to use our texture as color for our geometry now we need to sample the texture for that let's create a texture 2D node select sampler Port from the first drop down and assign our main textures output in sampler 2D then take our texture 2D nodes color and feed it into the albo let me assign our albo in the main texture okay now to make ice look wet we will set metallic to one and roughness to zero pretty cool but our i l kind of look like a flat paper to fix this let's use a normal map and we want to assign it from the inspector so I will duplicate the texture 2D parameter node call it normal map then in the type dropdown select normal map to tell GD that the texture is a normal map we will sample it using texture 2D node then take its output and feed it into the normal map let me assign our normal map in the normal map slot you can also adjust this normal map depth to control little bumps and now our Lake no longer looks like flat paper Now to create an illusion of depth we will use parallax mapping node this node will do the heavy lifting for us and to be honest this node proved to be a challenge to create but more of that in the devlog video now this node is is asking for a height map and amplitude we will provide them both from the inspector so first let's create another texture 2D parameter node I will call it height map then in the type dropdown select data because height map is neither color nor normal map then take its output and feed it into the height map then create a float parameter node I will call it depth and feed it into the amplitude then take our Parallax mapping noes output to both our main texture and normal Maps UV slots that's it for our Shader it will look like this at the end now let's assign our height map and adjust the depth in the inspector and we have this this nice illusion of depth in our ice Lake pretty cool and that's pretty much the video If you find the video helpful consider like share and subscribe wish list Cosmic roads on Steam if you have any questions post them in the comments hope you are enjoying the holiday season that's it from me and I will see you guys in the next one [Music]
Info
Channel: Digvijaysinh Gohil
Views: 761
Rating: undefined out of 5
Keywords: Godot, Godot engine, Godot 4, Shader, Visual shader, Ice lake, Parallax, Parallax mapping, how to, tutorial, Godot tutorial
Id: rJ3SLRs35wg
Channel Id: undefined
Length: 5min 38sec (338 seconds)
Published: Wed Dec 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.