Learn how to create Crystal Shader Graph in Unity engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone in today's video we will show you how to create crystal shader graph in unity 2020 during this process you will learn how to create also high quality caustic textures using the caustic generator tool moreover you will learn how to create the optical spectral effect in photoshop before we getting started i've noticed that only 10 percent of the people who watch our channel have subscribed to it so in order to support us more i ask kindly to subscribe to our channel so you don't miss any next videos this is ramis altaba from binary lunar and let's get started let's start by creating new unity project using the universal render pipeline template and let's name it crystal shader graph now let's delete the example assets and change the camera background type to solid color and make it something like purplish color or any color you like then i found a good crystal model on sketchfab website i'll provide you the link to download this crystal model down in the description then import the diamond model to your scene and place it in a good position to face the camera after that let's create new material and name it crystal mat apply it by dragging it to the model in the scene now let's create new shader graph by right-clicking create shader universal render pipeline and select a lit shader open the shader graph and change the surface to transparent also check the alpha clip additionally the two sided because we will render both sides of the crystal the back side and the front side to show the transparency of the crystal then we need a float to control the transparency of our diamond so let's create new float and name it transparency and make it slider between 0 and 1 and maybe set the default value to 0.6 then link that to the alpha set the alpha clips threshold to 0 save and let's see the results the crystal now should be transparent and we will able to control its transparency by changing the float of transparency to see the results of the shader graph we need to apply it to the material by dragging the shader graph into the material and now we can see that the crystal is transparent and we can control the transparency float then we need to create the caustic texture and to sample that we need a sample texture 2d node and let's create a new property texture 2d and name it diamond texture then to create a high resolution caustic texture we simply need the caustic generator tool you can download that by going to the link i provided down in the description with that tool you can create high resolution caustic texture by simply adjusting some parameters and adjusting the background to be black then clicking generate texture then to create the optical spectral effect we open the texture we generated in photoshop we duplicate that texture two times so we have three layers then we set each layer to represent one of the three lights so one is the red the other is blue and the third is green you can go to the filters others offset and move the red channel up right a bit by setting the horizontal and vertical values to plus two we can do the same for the blue channel and move it to a lower left a bit by setting or offsetting the horizontal and vertical axises by minus two depends on the size of your texture you might need a different value but to make sure that you get the perfect results once you zoom into the texture you should see the spectral optic effect which is like a rainbow between red and blue then simply you can select that texture you exported to this diamond texture then link it to the texture on the sample texture 2d i think you'll notice that this is the easiest shader graph i've ever created on my channel but also at the same time you will learn about new node which is the parallax occlusion mapping node with that node you can create a parallax effect that displaces the materials uvs and dabs to create the illusion of depths inside the material to that node you can connect the same texture we have created and also create two floats to control the amplitude and the steps of the parallax effect so create two new float the parallax amplitude and the steps set the steps value to 5 and the amplitude something to 20 that will create 5 copies of the texture and give them a depth based on the amplitude value after that link the parallax uv to the uv on the sample texture 2d then simply link the results to the emission channel on the fragment if you want to control the color of the emission we can create new property new color property and name it emission color then we simply multiply that with the sample texture 2d to change the color of our emission of course don't forget to change the color mode to hdr mode to be able to get the glow out of the emission then multiply the color with the results of the sample texture 2d to get the emission color change those were the basic nodes to create our shader but you can add more properties to be changed like the color of the material itself the color of the crystal or the diamond also you can control the softness and metallic by creating two new floats and naming them softness and metallic setting them as sliders between zero and one and set the values something like 0.6 or 0.8 save the shader graph and go back to the scene now you can create an eye catchy effect using the parameters we have created so keep experimenting and adjusting with the values that we have creating to reach something attractive and looks nice and that's it for today's video i hope you enjoyed watching and looking forward to see this technique in your video games if you found this video useful don't forget to hit like subscribe and the notification bell so you don't miss the next ones we really appreciate the generous continuous support on patreon which keep encouraging us to publish more quality contents so thanks for everyone who supported us on patreon till next time see you soon [Music]
Info
Channel: Binary Lunar
Views: 15,015
Rating: undefined out of 5
Keywords: binary lunar, unity shader graph 2020, crystal shader graph, diamond shader, gem shader graph, crystal visual effect, unity shader graph tutorial, easy unity 2021 tutorial, learn how to create, Learn how to create Crystal Shader Graph in Unity engine, gem effect, diamond visual effect in unity, easy to follow tutorial, step by step tutorial, unity tutorial for beginners
Id: Qri_fN01hMc
Channel Id: undefined
Length: 9min 13sec (553 seconds)
Published: Sat Sep 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.