Awesome SHADER CREATION for Unity! Getting Started with Amplify Shader Editor!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys justin here with the realtimeessentials.com back with another unity asset tutorial for you so in today's video we're going to check out the amplify shader editor so this is basically a tool designed to help you create new shaders inside a unity and it's doing it using a node-based material creation system so let's go ahead and jump into it all right so i will link to amplify shader editor in the unity asset store note that for the next couple weeks i believe amplify shader editor is on sale for 50 off i'm not 100 sure how long this sale is lasting so if this is something you've been interested in this is a great chance to get it at a discount if you're watching this after that that doesn't mean it's not a great tool just that the discount is over and so first things first you can find this on the asset store and there's a ton of different resources that come along with this and they're really staying on top of keeping things up to date so there's a number of different updates in here for new things that they've added other things like that so they've got templates for universal rendering pipeline as well as the hd render pipeline so in addition they've also got samples as well as a unity forum thread and a detailed manual slash wiki that kind of walks you through the way everything works so i'm not going to be able to hit everything in this video but there's a number of resources available designed to help you get started with this asset so the first thing we're going to do is let's go ahead and let's get it enabled you can see how i already have it enabled here with a couple of the samples that are contained inside of this but you just want to go to window package manager you want to make sure that you've downloaded the amplify shader editor and so there's also a shader pack that you can download it's listed as 25 but if you own the amplify shader editor then you can download those for free i'd recommend downloading those because they give you kind of a great place to start kind of looking at the way the different materials work but so once you've downloaded this you want to make sure that you've imported it into your scene and then there's going to be a few things that you're going to want to pay attention to so first off you can access the getting started page by going to window amplify shader editor and you want to go to start screen and so what start screen is going to do is it's going to give you access to universal under pipeline samples built-in samples or hd if you're using that one as well as links to their manual some basic tutorials lots of different things like that so there's a lot of information in here as well as links to both the unity forum post and the discord so lots of places you can go if you do get stuck but i would recommend you start with the manual and the basic use tutorials and so in fact let's go ahead and let's create a new scene kind of start from the beginning so i'm going to create a basic built-in scene right here and what we want to do is we want to start by inside the amplify shader editor in the start screen importing the samples for so we want to start by importing the samples for whatever render version you're using in this case we want to download the urp samples so we're going to click in here we're going to say yes and it's going to bring those samples in and so once you do that you're going to be able to find those inside of the amplify shader editor folder under examples you want to go in the urp folder right here and so first off let's drag in a couple of the prefabs and so sometimes when you bring these in like this you just need to make sure that you've upgraded the materials so you want to go to edit render pipeline universal pipeline you want to click on upgrade project materials to universal rp materials that'll upgrade those and then this should work if it doesn't work then you're probably going to need to go in the wiki or something like that but we're going to go ahead and we're going to bring in the rounded cube and the shader ball from the prefabs those are going to give us something that we can kind of play around with inside of our scene all right so let's create our first material inside of the shader editor so the way you're going to have to do this is you're going to have to start by going into assets create and you want to select the option for amplify shader we're going to select the option for surface in this case we'll just call this test for right now and so notice how when we call this test and we label this this pops up the amplify shader node editor and so within the node editor you're going to be able to make changes in here two different things about your shader so notice how for example the name of the shader can be found over here so let's say that we wanted to call this something simple like red you'll notice that when i change this over here to red then it's going to change over here on the right hand side what that means is that means that all of this is kind of linked together when you make changes so you can use this to adjust things about your shader and so what we're going to do to start off is if you've worked with the textures or materials a lot in 3d software you may recognize some of this stuff like the normal like the albedo other things like that but what we want to do is we want to start just by adding another node and so you can right click in this space in order to add a node you can also click the button right here in order to pop out this window that's going to give you a list of the different nodes that you can use in here and so in this case just to make this simple we're just going to add a constants and properties color node so you can just drag this into this space right here in order to start setting this up and so if you've ever worked with node based software before basically what this is is you have to start linking these together to provide the information from your color into the overall information of your shader right here for your output and so let's say that we wanted to make this like a blue color right so let's say we wanted to drag this onto this object and make it blue so what we can do is we want to start by setting up the rgba so basically the output of the color node i'm going to drag that into our albedo right here and so then we can click on this we can use this to select a color like a red like this so now this is a very simple shader and so if we were to take this and we were to drag the shader onto our box though it's not going to work remember because our shader isn't actually a material our shader is just the it's just the information behind the material so what we want to do is we want to right click in here and we want to create a material like this right and we'll just call this test as well so now we've got a test material and we've got a test shader and so we can drag the test material on top of this but notice how nothing's happening because they're not linked yet so what you need to do is you need to select the test material and you just want to select the drop down right here you're going to notice that this red that we created this shader right here is now going to show up on this list so we're basically telling this material we want you you to use the shader that we created for your colors so now if i was to take this drag it on top of here we've got an error message and so the reason we have an error message is because we have the shader type set to surface over here we don't want this set to surface we want to click the drop down we want to go into the universal option we want to select the option for pbr and so if we select the option for pbr and then we click in here and we click on the button for refresh notice how now our material is working so we had this in here as the wrong kind of shader but now we have it in here as the right kind of shader so what we want to do now is let's add some smoothness to this property and so the way that we're going to do that is we need to add a different kind of node in here in this case we need to add a node that gives a numerical value to our smoothness so and i think this is where a lot of people get lost is there's some kind of like technical terms that are used in here you just need to learn them and practice with them so for now just follow along with the tutorial and then the next time you do it you'll know okay if i need to put a value in here this is how i do it but basically we want to do is we want to click on this button right here and we want to go find the under constants and properties we want to add a value for float so float is basically just going to be a numerical value that we feed to this right so we're going to tell it okay we want our smoothness to be whatever so whatever this number is right and so let's say for example we want this to be really smooth because this is going to be a value between 0 and 1. let's say we're going to type in a value of 0.8 like this well notice how nothing happened over here so the reason why nothing happened over here is because we've adjusted the shader but we haven't actually saved our changes and so there's a button right here that you need to click to save changes when you make a change so notice how when you do that that shader recompiles and now we're getting more reflection off of this surface now notice that there's also an option over here for automatically save shader when canvas is changed you can click on this and then any changes you make so if i was to change this to like point two and hit the enter key those will automatically be saved and this will recompile the shader now you can definitely do that notice how the reflection is coming off of here but everything is going to slow down a little bit if you do so just be aware that you may or may not want this automatic changes on depending on how fast your computer is what kind of performance you want other things like that but now let's say that we wanted this instead of just being a value that we type in let's say we wanted this to be a slider so we wanted this to have a slide in here well what we could do is inside of our parameters which are over here on the left hand side of the page if you don't see them make sure you click on this button right here but we want to give this a minimum and maximum value so minimum is still going to stay zero but we want to set our maximum value to 1. well notice how as soon as we set this to 1 now we have a slider in here that we can adjust and notice how when we adjust this that value that's being applied to our smoothness gets updated with the new value so you can use this in order to create sliders in order to put values in here all right and so up until this point what we've been doing and i'm going to go ahead and turn this off for a second but up to this point what we've been doing is we've been applying colors and numbers right but let's say that we had a texture material that we wanted to bring in so instead of using numbers in here let's say that we had a texture with a different map in it or something like that what we want to do is we want to bring in a texture and plug it into one of these nodes and so now because up till now we've just kind of played around with colors right so we can make this red we can make this yellow whatever we want this to be and those are all going to adjust in here but let's say we wanted something more complex like a actual texture so what you can do is you can actually take textures that are inside of your assets folder and drag them directly into this node setup so if we go into the textures folder under scene textures there should be a brushed metal normal map in here if there isn't you're just going to have to go find one or try this with something else alright so what we want to do is we want to take this brushed metal normal map we want to drag it in here and place it right here and then we want to take our xyz and drag it into our normals and click on the button for refresh and so notice how when you click on the button for refresh we're now getting the normal map applied to this making the surface look rougher and so i did have an issue in here where it wasn't doing that for whatever reason i'm not really sure what it was if if it doesn't work if it doesn't apply that you can try applying a texture coordinate node right here so just to texture coordinates and dragging the uv into the uv so if it doesn't work for you for whatever reason try doing that and that's probably going to work so some other things you could do really quick is let's say you wanted to adjust the scale of this map you could just right click in here and add a float value and drag it into your scale just type in a value of like 0.25 or something like that then if you refresh this notice how this is going to get smaller so that's going to just apply the map in a smaller fashion to this surface and so i feel like we've gone through a lot in this in the node editor we can talk more about this in the future but real quick i just wanted to take a look at some of the materials that are added or included in the amplify shader pack so the amplify shader pack is the one i talked about that you can download for free and so let's go ahead and let's take a look at some of the urp samples notice if the urp samples don't show up then what you can do is under amplify shader pack start screen just import the urp samples if you're using the universal render pipeline or the hdrip the hdrp if you're using the high definition render pipeline but um so if we take a look at some of these like for example there's an animated fire material that's in here and notice how and you have to hold the right mouse button for this to animate but notice how this is an actual animated fire material it's applying like a wood burnt material and then the shader is actually moving like actual fire across here and i don't want to get too far into this right now but you can double click on this and take a look at what it's doing so there's an actual burn effect in here that's being applied that's really cool so you can kind of take a look at how they've built this and then you can kind of reverse engineer that to build something like this yourself so there's some other cool ones in there as well so the dissolve is a fun one so where's the dissolve app here we go community dissolve so if you drag the community dissolve in here you hold your right mouse button for a second and watch this and it takes a second on this one it's kind of slower but what it's going to do is it's going to dissolve your object into basically nothing cell you can see how what this does is actually dissolves the exterior of your object right here so again just some really interesting animated stuff that you can do with this tool so remember the amplify shader editor is on sale right now for 50 off you can check that out at the realtimeessentials.com slash amplify shader but leave a comment below let me know if you've used this if there's something you'd like to learn it's love having that conversation with you guys as always thank you so much for taking the time to watch this and i will catch you in the next video thanks guys
Info
Channel: The RealTime Essentials
Views: 12,055
Rating: undefined out of 5
Keywords: unity, unity software, unity 3d, unity 2020, unity 2021, unity shader editor, unity amplify, unity amplify shader editor, unity amplify shader, unity amplify asset
Id: Z5eXm4g0VmI
Channel Id: undefined
Length: 14min 36sec (876 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.