How to Use the COLOR RAMP Node in Blender! (Beginner Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys justin here with the cgessentials.com so in today's video we're going to talk about how to use the color ramp node to create different gradients and other effects inside a blender let's go ahead and just jump into it alright so the color ramp node is a shader node for blender designed to help you map values to colors using a gradient and so what does that really mean that really means that this is a node that's designed to help you use the transitions between different colors to create different effects and so let's go ahead and let's take a look in an example so let's start i've got a simple sphere in here i'm going to click on new in my shader tab and we're going to add a principal bsdf so right now for example we can set the color in the principle bsdf by selecting this option right here right you can select this to green whatever color you want however you can't really do anything with multiple different colors and make different things show up or anything like that so to do that what you want to do is you want to use a color ramp note so we're just going to do a shift a down here and we're just going to look for a color ramp node right here and what you're going to do is you're going to drag the color into your base color right here now notice that at the moment nothing really changed right you've got this kind of like grayish color in here but nothing else changing well let's take a look at this node and see what we can do with it so the first thing you're going to notice is you've got this bar right here that's got these little uh these little boxes on it and if i click and drag this notice how the color of the bar is changing and so basically what this is doing is this is allowing you to set like a like a linear and so this is basically allowing you to set like a range with colors and so you can use that range in order to dictate different colors that come out of this note so for example if i was to drag this to the left notice how this color is changing well the reason this color is changing is because right now i'm changing where the colors are on this spectrum right here and so what's happening is you've got your colors up here but then you've got your factor down below which is going to set how close to one of the colors the color on your screen actually is so notice how when i drag this to the left everything gets dark if i drag it to the right everything gets light if i drag it to the middle it's like a perfect mix between these two so now let's change the colors that are in here and so you can do that by clicking on one or the other of these or you can use this little one or zero right here to move between the different points but let's say that we wanted our first color to be like a blue so we're just going to click in this little bar right here and what that's going to do is that's going to allow me to adjust the color based on this color wheel right here and so first thing we're going to do is we're going to drag this up and then we're going to drag the point to the right you could also like type in an rgb value or something like that but notice how now we're getting a different effect in here notice how this is creating a gradient between this color right here and this color right here and so you can do this for both colors so let's say we wanted this to be more of like a green right here so now we've got a blue color and a green color and if i click and drag to the left and to the right in here notice how this is changing the color of my object in my scene and so there's a lot of interesting things we could do with this like for example if we wanted to we could keyframe this and animate the movement of the color or we could do some other things as well so what i want to do is i want to add a noise texture to the left hand side over here so i'm just going to do a shift a and i want to add a noise texture node right here and so what this is going to do is this is going to create a factor in here based on the settings you have down below well i'm going to drag the factor into the factor well now notice how what this is doing is with the noise it's actually giving me different colors based on where the noise is so let's just adjust these a little bit so we're going to change this like .75 we're going to change our scale to 10 we're going to leave the detail at 2 for right now but notice how what this has done is this has created a noise on our surface and now we're getting the two different colors in here and if we were to adjust the colors so for example if i was to adjust this to like a yellow or something like that notice how some of this turns yellow we've got a transition between our blue and our yellow and you can kind of mess around with these by dragging them left or right if you want to in order to get a stronger effect in here so notice how the position of these objects is going to affect the way that this looks and so we're going to change this back to a greenish color i think that gave me a better result and so then there's other things we could do with this as well so for example we could add a texture coordinate node over here so texture coordinate right here and then a mapping node right here so we're going to take our texture coordinates drag the generated into the vector then we're going to drag the vector into the vector right here all that's going to do is that's going to allow us to actually move this around by dictating the position so for example notice how if i adjust the x y or z it's going to adjust where this noise color is on your object so you could also adjust like rotations and other things like that as well so there's a lot of interesting applications for this and so notice how we've been using the color ramp in order to dictate the colors in the principled bsdf however let's say that we were to duplicate this so i'm going to do a shift d down here to duplicate it well what i want to do is i want to take that same factor and drag this into the factor right here but now i want to take this and i want to set this to be black and white so we're going to set this to black we're going to set this to white and so when we do that and i'm just going to set this to 1 1 1 like this that'll put me at a white value well what you can do is you can take that value because it's black and white and you can drag that color into like your roughness so if i drag my color into my roughness then notice how now i'm getting some reflection in some of the areas in here and specifically i think it's showing up more where like the blue areas are as opposed to the green areas but you can use this in order to dictate roughness values in here so notice how if i drag this to the left i'm getting a more pronounced reflection so you can use this in order to create like scuffs or other things like that on your surfaces as well so there's definitely a use case for this but let's take a look at another possibility for this so i've got a suzanne over here let's go ahead and create a new material and we're going to go ahead and add a color ramp node again in here again so we're going to do a color ramp right here and we'll drag this into our base color and so i want to do the same thing with my mapping but this time with my mapping i want to use this so that it creates a gradient vertically along this uh this monkey head so the way that i want to do that is i'm going to do the same thing or add a texture coordinate node right here we'll add a mapping node right here so same as we did before right but this time instead of adding a noise texture we want to add a separate xyz so we're going to do a separate xyz right here and we'll just click on here in order to place this and so what we want to do is we want to drag a node not from the x we want to drag it from the z so i'm going to click and drag in here like this well notice what that's going to allow me to do is that's going to allow me to adjust the gradient so that it shows up on my object based on the z value of the object so you can use this to set the up and down of the uh of the material right here and so what does that mean that means that now you can set this so the bottom of something is darker than the top of something which has some really interesting implications so let's say for example that we wanted this to be a color again so we'll have this be like an orange we'll have this one be more like a pink right here so notice how you can set this where this object has an orange color on the bottom and a pink on the top so you can use this in order to quickly create that color transition notice how if i move these sliders in here or because this is a z value then i can adjust kind of where those colors sit on this object and so one of the other things we haven't really talked about is you can also use the plus and minus in here to add additional points so if i click in here for example notice how i can add a new point in here and i could add a new color so i'm going to adjust this so that we've got kind of a bluish color right here then we can add another one right here and add another color so we could have a green right in here we're going to go ahead and set our z value back to 0 just so we can kind of take a look at this so notice how what you can do is you can have multiple different colors that are in here using this tool and then you can also click this little drop down in here to get some different options about how your stops are distributed so for example if i wanted these to be distributed evenly i could click on that drop down and click on the distribute stops evenly that's going to give me an even transition between each one of these i could also use it to distribute them from the left like this if you wanted to do that then notice how you can also adjust the interpolation between the different colors by clicking in here and it's not giving you a strong result because there's not a lot of space in here but you can use this in order to adjust how strongly this transition goes in here so the constant right is going to give you just like a straight across value like this where the ease or the linear is going to give you more of a smooth transition notice how the colors kind of blend together between these two different points all right so another application for the color ramp node is you can also use it to find adjust like mixed colors so let's say for example that we've got two colors in here that we've got running into a mix node right so we've got a material output we've got a mix shader and then we've got a white material and a blue material right here and right now all you can do is adjust the factor between the blue and the white material well let's say that we wanted to add some noise to that so we could do a shift a and add a noise texture to this and drag that factor into the factor like this and so what that's going to do is that's going to generate noise in here similar to what we saw when we used the color ramp node before for this right you can use this in order to adjust like detail levels and other things like that but the problem with this is even though you're getting a good result in here it's not very defined right well what you can do is you can use the color ramp node so i'm just going to drag this in here in order to strongly define this and so i'm going to go ahead and reset this really quick so we're going to drag this color ramp node in here and what we can do is we can use this from a black and white standpoint in order to adjust how strong this is so right now right we've just got black and white in here but if we were to drag these to the middle like this notice how what that's going to do is that's going to give me a much more pronounced texture on this surface right and then you can adjust things like your scale your detail other things like that but you're basically amplifying the effect that you were getting from this noise texture node in here so you can use this in order to do really interesting things like that you could also use this to um let's say instead of the noise texture we would add a wave texture so we'll just drag the factor in here well the wave texture is interesting because it allows you to add like stripes like this but then you can also add distortion to those stripes well when you start adding distortion to those stripes what that's going to do is that's going to allow you to create these really interesting kind of like random looking shapes in here so you could adjust the detail um so you get more or less detail in here but what's really making this is the way that we're using the color ramp node in order to make this more pronounced like this and then there's other things you could do with this as well so for example you could drag this into like an emission shader or something like that if we decided that we wanted to do that in order to make parts this emit light so you could also instead of a wave texture add like a voronoi or voronoi i'm not sure which one of those is right but you could also add that in here and then you can get some different results by dragging like the color into your factor right here so this is a great way if you want to scale it down like this to create like flecks of paint or other things like that you can adjust the randomness that's in here there's a bunch of different settings that you can adjust on the voronoi texture that we're not going to worry about too much for right now but just know that there's a lot of options in here for being able to do that so there are a ton of things you can do with the color ramp node inside a blender we can talk about it more if you're interested but for now leave a comment down below let me know what you thought was this interesting to you was it helpful i just love having that conversation with you guys if you like what i'm doing on this channel please consider supporting me on patreon every little bit helps so make sure you check out that link in the notes down below but 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 CG Essentials
Views: 42,456
Rating: undefined out of 5
Keywords: blender, blender 2.82, blender 2.8, blender modifier tutorials, blender tool tutorial, the blender essentials, the cg essentials, thecgessentials.com, justin geis, justin geis blender, blender 2.9, blender 2.91, blender nodes, blender material nodes, blender color ramp node, color ramp node tutorial, blender material node color ramp
Id: X3mNSPHbsB4
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Tue Feb 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.