Unity Shader Graph - Toxic Waterfall Effect Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

pretty cool seeing you here gabriel i never followed your tutorials but you were the reason i started using vfx and shader graph when i started game dev 2 years ago

👍︎︎ 2 👤︎︎ u/daviddawn1 📅︎︎ Nov 24 2021 🗫︎ replies

This post appears to be a direct link to a video.

As a reminder, please note that posting footage of a game in a standalone thread to request feedback or show off your work is against the rules of /r/gamedev. That content would be more appropriate as a comment in the next Screenshot Saturday (or a more fitting weekly thread), where you'll have the opportunity to share 2-way feedback with others.

/r/gamedev puts an emphasis on knowledge sharing. If you want to make a standalone post about your game, make sure it's informative and geared specifically towards other developers.

Please check out the following resources for more information:

Weekly Threads 101: Making Good Use of /r/gamedev

Posting about your projects on /r/gamedev (Guide)

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

👍︎︎ 1 👤︎︎ u/AutoModerator 📅︎︎ Nov 23 2021 🗫︎ replies
Captions
so quick shout out to unity for sponsoring this video more about them in a moment because today we got something crazy once again my patrons voted and today we are going to see how to create a toxic waterfall some radioactive wastes from the wastelands of okay and i think it's really nice not gonna lie this is some advanced stuff and i'm gonna try my best to guide you through i hope you enjoy it by the way if you wanna get your hands on this project and many many other assets that you can use in your games you can do it in my patreon page there's a link in description and unity today is sponsoring this video they actually have some pretty neat sales in the asset store and at this time of the year the black friday event is going on and there's definitely some very interesting assets with a huge discount that will definitely propel your game development abilities so make sure to check that out i left some links below in the comments and in the description and with that being said let's see how we can create the toxic waterfall so for this project i used unity 2021.2 with the universal render pipeline and in package manager i have also installed telegraph and visual effect graph and in preference in visual effects i have experimental operator slash blocks turned on so this is what we are going to do and for this workout we are going to need a mesh so let's jump to blender so i can show you how you can create these objects i'm going to try my best to guide you through but it's best if you have some experience with blender and i'm using blender 2.93 let me just remove everything from the scene and paste the pipe it's quite useful to have the object where you are going to apply the effect in blender so you can properly shape the waterfall so the idea is to start with shift a so we can create a cylinder down here you can control the amount of vertices by the way first thing i'm going to do is press space bar and search for shade smooth you can do it up here as well in the object drop down menu with this nice and smooth cylinder i'm going to take care of the uvs i'm going to drag a new window down here up here i'm going to select uv editor and the ideas that we enter in edit mode we tab and we want to erase these two faces i'm going to press ctrl tab to select faces and select the top and the bottom face while holding shift and press delete to remove these faces we simply want this rectangle as a matter of fact we want to correct the uvs we want to push this down but let's first turn on constraints to image bounds with b we can select this press g and lock it in white to push it all the way down and now we can start modeling the waterfall i'm going to put it in place which basically means i'm going to rotate it 90 degrees move it with g until it's more or less around here as you can see and with s i'm going to squeeze this down into z and once again adjust the position i'm going to stretch this a little bit more what we want to do first let's turn on live and wrap and click on this icon so we can see the vertices we are selecting in the uv editor as well and the idea is to select this front vertices and with g push them in the x to more or less around here and now with ctrl r we are going to divide this around five times and i'm sure there's other ways to do this probably with the busy curve but the way i come up with this now push them all the way down in z until it touches the ground and rotate it 90 degrees in the y scale this up and pretty much do the same for the other edge loops scale this one a little bit up and it's a matter of adjusting this i'm going to push this all the way back because i'm focusing on the curve that this waterfall is doing more or less like this now we can scale these other edge loops a little bit more and down here with ctrl r we can add more edge loops because we want to scale this up with proportional editing o for shortcut or you can go up here and turn it on if you scroll up and down you can control the influence of the proportional editing and it's very useful to influence the other edge loops as you can see after adjusting the size down here i'm going to add another edge loop with ctrl r up here so the curve is a little bit more smooth but that's basically it as you can see we already have a nice waterfall mesh that's another trick we can do is select these edge loops all of them and scale this up only in the y a little bit edge loop by edge loop so it gets thicker towards the end all right but once you got this nice shape we want to go ahead and in modifiers add a subdivision modifier one for the levels viewport is enough if you press z and disable optimal display you can see the subdivision in action it has become much more smooth looking good now the idea is to rename this to toxic waterfall and we can already create another mesh for the puddle toxic puddle i'm going to enter in edit mode of the waterfall first and while holding shift and alt i'm going to select this bottom edge loop press shift s to say cursor to selected and i'm going to go to object mode by pressing tab and with shift a i'm going to add a cylinder another process is pretty much the same we want to smooth this with shade smooth we want to enter the edit mode and remove these two faces fix the uvs basically push this down yeah and now the idea is to select the top vertice press s and then zero and then you want to press g lock it in the z and push it two values down so it becomes a flat circle as you can see select everything and we push it one value up so it aligns perfectly with the waterfall base and now you can scale this up quite a bit and with ctrl r you can add three edge loops and then add another one right here and then another one just right here because it's going to create a nice effect with the shader we are going to create the uvs are super important when working with shaders and with this type of effects right so let's rename this to toxic puddle and now you can save this with control s directly to your unity project since it's blender unity will impart it as an fbx cool right so let's move on to unity now i'm going to drag and drop the mesh we created remove the other pipe i'm simply going to rename it and create a prefab out of this but what really matters is that we create the shader with right click we are going to start with a blank shader graph rename it to toxic waterfall and double click to open it up dock the window whatever you want for the target it's going to be universal we want this to be lit so it's influenced by lights but we want the surface type to be transparent alpha is okay and we are going to adjust this along the way so we are going to need a texture for this and to make things simple we are going to use the voronoi node which is a procedurally generated noise if we connect this to a power node we are able to control the voronoi amount of var and i dissolve basically let's just add some color to these actually we are going to need two color properties one for the voronoi color and the other one for the base color both are going to be in hdr and we can select white and set the alpha to 100 as default the voronoi we can connect to this multiply node and this is going to be connected to the emission which means the base color is going to be connected to the base color of the fragment function before we could see how this is looking let's create a few more properties one to control the voronoi power a float default value of two and the other to control the scale the voronoi scale default value of 5. and as you can see we have this angle of set which is quite useful if we animate this we kind of create entropy in our voronoi it's very simple to animate we need a time node multiplied with something in this case that something is going to be a float for the voronoi agitation or the voronoi angle of set actually default value of 1 and another thing that is going to be useful is to scroll this voronoi as well as control the tiling so let's use the tiling on off set node we are going to need two vectors vector 2 is enough one for the various speed and the other one for the voronoi tiling which must be with a default value of one by one but the speed we also need to multiply it with the time node and connect it to the offset and here we go it's scrolling so we already have a few things let's test this out let's press the save asset button and with right click in the shader let's create a material which we can drag and drop to our toxic waterfall oh yes super bright it's scrolling the opposite direction minus 0.5 in the voronoi speed and we can choose a green color for the varana a little bit of intensity as well and we cannot see much but i'm going to set the varano italian to 1.2 for the x and 0.6 for the y let's increase the variance scale as well to 10 and yeah it started to look like something i know it's super bright but we'll fix it in a moment mostly because of this directional light since it is elite shader it's influenced by lights in this unity version we are able now to create categories inside the shader so i'm going to create one for the pbr settings in here i'm going to drag the base color and then create another category for the emission voronoi and drag the remaining properties for the pbr settings we can create a float to control the smoothness and another one to control the metallic and another float for the normal strength the smoothness property we can multiply it with the voronoi but let's first connect it to a power node so it doesn't become too intense we just want a few of these bright spots connected to this bonus down here set the default value to 0.5 for example and let's also save the metallic 0.1 and connect it to its respective input oh yeah by the way you can create groups and it's quite useful since this is going to be a little bit big yeah so for the normals we are going to use the gradient noise which is another personally generated noise this gridded noise must be clamped between 0 and 1 otherwise we get some artifacts and we can actually connect this to a power node 2 is enough and then connected to a normal from eighth that's very important because that's how it's going to interact with the light in some ways let's connect the normal strength with a default value of 0.01 oh and by the way we can make this scroll we must make it scroll otherwise this will be a little bit static and as usual we use the tiling and offset node and then we can multiply vector 2 with the time and connect to offset just like this i'm going to drag this to this group and convert this vector to to the normal speed property finally we can connect this to the normal input of the fragment function and if we save this and go to the inspector now we can say the metallic 0.4 for example and the smooth is around 1.4 so it becomes really glossy and the normal strength around 0.12 they are scrolling in opposite direction so minus 0.75 actually and finally let's get rid of this brightness and white values let's set the base color to a darkish green something along these values most importantly a color that you enjoy and that you think it looks good all right so lastly i'm going to increase the voronoi power to around four or five yeah that looks much better increase a little bit the speed to minus 0.6 now what happens if we assign this shadow to the toxic puddle well let's find out let's duplicate the toxic waterfall material drag and drop it and yeah by the way if you guys know how to get rid of this seam right here this hard edge make sure to leave a comment so in this case we want this to scroll in the opposite direction 0.2 for the normal speed and 0.1 for the voronoi speed for example are good values it's a little bit slow maybe but it's up to you to adjust them as you wish now what we are missing here is transparency so down here we can use a uv and if we split this if we use the g channel we get a nice mask in this case the dark values means it's transparent so that's exactly what we want we can connect this to a power it's useful to control this power value so let's add a float up here and call it a transparency mask because this is basically a mask that we are creating and connect it to the alpha appear and save and press save assets if you go to the inspector with the pedal selected and increase the transparency mask here we go we get a nice fade out towards the end of this geometry that looks very awesome it's much more polished but it's also useful to control the world transparency of the object so what we can do is very simple up here let's first add the float for the transparency and this we can multiply it with the power node oh and by the way this transparency must be inverted otherwise one means it's visible we can do it with a one minus node replace connection to the alpha save and in the and in the toxic waterfall as you can see transparency now it kind of adds a nice touch if it's just a small value like 0.1 yeah and as you may notice if you move around the camera you may get this glitch which is a little bit disturbing and it's very simple to solve if you go to the shader in graph settings we have this depth right instead of auto we can say it's forced and while we are here let's also the render face is both it's basically the two-sided it will render the front and the back face and now if you save this if you move around that glitch is gone and if you look closely you can see the other side of the mesh which adds a really nice touch and this next part is a little bit complicated so i highly recommend you to check out this tutorial that i made a while back about vertex animation where we animate a fish thanks to vertex displacement that's what i use it here this is from the tutorial i even created a new category for the bubble effect and this is connected to the position and it really adds a nice motion these are my values by the way in case you want to inspire yourself another thing that i use it is very simple and it's a point light make sure you create one and you place it inside the pipe with a good intensity and the color of your preference oh and make sure to turn on soft shadows look at this it's really awesome very well and for the next part i added a particle on the ground very simple a green particle but this problem may happen to you if it happens go back to the shader turn on allow material override select the pedal and in the material of the puddle in the advanced options set the cue control to user override and set the radio queue to 3001 and that's it boys look at this it's awesome right so for the next part i used another tutorial that i made recently which is the blood effect and it's awesome for this i have even used it for some radioactive waste and it fits perfectly so make sure to check out that tutorial it will help you a lot to improve this effect i have added some particles down here some of them are in the pipe as well i added even more particles where the waterfall hits the ground and then i added some mist which by the way you can use this to reel the wipe and effects we use smoke there and you can use it here as well with a green color and then i added two more lights on the ground and that's it just look at this this is awesome i also increased the paddle ties and i think it's a great effect i hope you have enjoyed it you can get this project in my patreon page by supporting me you keep the channel alive and i'm going to take this moment to thank each patron for supporting me it really means a lot and here's a quick shout out to the top tier patrons which are elac frost bradford aaron crooby doobiedoo daniellathcock david duck david group david my lars derek benson donald thompson edward chai eric hudson ft92 goblin black jules clayne karsten mccoolcock radioactive bullfrog revenant games roger power stefan zarkov unknown enigma verizuta sonan chin and ingo das your sport has been truly amazing and it's so much appreciated it keeps me going so i can keep on making free tutorials so i hope you have enjoyed if you did please like subscribe you know the usual and i hope to see you in the next video thanks bye [Music] [Music] you
Info
Channel: Gabriel Aguiar Prod.
Views: 18,104
Rating: undefined out of 5
Keywords: Unity tutorial, vfx, vfx graph, vfx graph tutorial, unity, visual effect graph, unity visual effect graph, unity vfx graph, unity visual effect, tutorial, shader graph tutorial, shader, tornado, fire tornado, shader graph, toxic, waterfall tutorial, unity toxic, unity radioactive, unity toxic shader, unity water shader, unity poison, unity shader graph, unity toxic waterfall, unity waterfall, radioactive shader, toxic shader, waterfall shader, waste, radioactive, unity shader, fx
Id: uOhWT6TxZgE
Channel Id: undefined
Length: 19min 27sec (1167 seconds)
Published: Tue Nov 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.