Welcome to the colour ramp node in this video.
Well first of all what is the colour ramp node.
Well the colour ramp node is generally used for mapping values to colours with the use of a gradient.
Now become more apparent very shortly.
It can be customized to produce very interesting results.
We will be using it to control a single value.
In the example coming up so we can just stick with the greyscale.
But because colour is three separate channels.
RG And B you can potentially control three separate values with this one node.
And if you're a graphically minded person well its used to graphically control values so you can visually
see what's going on.
So let's go play with the colour ramp mode now and hop on over in a blender.
Okay so we're back over in blender and to speed things along.
I'm going to open up the save from The Last Lecture.
So we've got something we can work with.
So here we go this is what we were working on before.
I'm asked to turn on the rendered view up and the top found one and make that whole area a little bit
bigger so we can see what's going on.
I'm going to get rid of this properties panel on the right hand side of the node editor.
I want to keep value that's going to be useful and I'm going to get rid of power because that's what
we're going to use instead of a map node we're going to use this colour RAM.
So again it's a type of converter.
And let's pop that in a bit wider than expected.
There we go.
Let's pop that in here and link these up.
Okay.
So what we've said she's done here oh let's plug into the right node input roughness.
OK.
So what we've essentially done here is nothing so far because of the value being passed through or that's
just undo this for the moment.
This value here is literally just moving along this gradient from one side to the other.
And so looking at it it makes absolutely no difference.
You plug this in here.
Point two is going to be point two.
And because of the gradient is linear across from one colour stop to another.
These land soon in a little bit these little things that look like houses because it's uniform moving
across then it will just be a one to one relationship.
Now we can move these colour stops by left clicking on them and moving them to the left or right.
Now what that will do is it will mean anything up and remember that black is zero black is always a
value of zero anything up to position three because that's the selected one.
Or point three will be Black.
You'll be zero so any value that comes in will be made to be zero.
Now this does help us move it along.
But it's really just offset the beginning and squash the other side.
So that means from this point here point three to 1 it's going to be a more exaggerated version of the
problem we've already got.
So that's not what we want to do in this case.
Watts would be a particular solution here is to add another one of these colour stops and make this
dark grey area last longer.
Now there's a couple of ways you can do this which has hit the plus button here and that will put a
colour stop smack bang in the middle.
And we then can select that colour stopping is selective at the moment.
We can tell that a number of ways who've got this dotted line coming out the top of it which shows its
position and we can also see this number here is the active colour stop number one.
And it goes 0 1 2.
So it always starts at zero.
It can be a bit confusing.
Now this colour bar on the bottom enables us to change this.
Now we're only going to deal with the grey scale at the moment so that means that's on huge saturation
of value.
The only thing we really need to move is the value controller.
And if I lower that down to maybe point three we can see it stays darker for longer if it stays darker
for longer.
We should find that when we move the value along.
It's much better than it was before and of course we can compare what it was before by just muting the
colour ramps if I select that a Muta and come off again I can see that's made a difference.
Now of course I can stretch that out further to make a have a more of an impact or indeed I can add
another colour stop and make the gradient gradually change.
So another way of adding a colour stop is to hold down control and left click and then you can place
it where you want to place it.
And again I can then go into here and change the value of that.
Now this also gives us the ability to have black come back later on.
So for instance at this wouldn't it be particularly used.
Well I can't think of an application for it with the roughness input that we're trying to control at
the moment.
But it is kind of useful with other things if you wanted to take control of them.
So sometimes it can be a little well tricky basically to select that ball going to pick this up and
move it over here.
So it's dark again and again to change it so it's a value of zero.
And here we go we've now got black further along what we should find them I'm going to accurately position
it by typing something in there or we should find is now it's shiny stars getting rougher and rougher
and then suddenly gets shiny again before going completely Matt.
So a value of point one all that some muter otherwise you don't see what's going on.
Point to Point three point four.
And we can see it's getting more and more blurring then as we approach point A.
And there we go.
It goes clear again of course if we were holden downshift and dragging it we'd see that a bit more gradual
and then that final stage between point eight and a one just happens really really really quickly and
that's it for probably only a couple of hundredths to move it along.
So that is one of the ways we can use the colour ramp.
Now one of the things to bear in mind with the colour ramp is in fact we've got four values we can play
with so we can add another node in here to extract some of these values.
So the colour there are three.
Colours basically coming out of here red green and blue.
So there are three values and there's a fourth value from the Alpha channel and we can use the hatz
to control other things as well.
So for instance if we go ahead and let's duplicate this glossy shader and then let's mix them together
and I'm going to use that shortcut control in zero to do the mixing.
I'm not going to worry about tidying it up and then I'm going to switch this out to a diffuse texture.
And I get that error message I still haven't got to the bottom of it I think I just need to turn it
on and off again but I'll look at that later.
Doesn't seem to be breaking anything or may even be a bug in the program.
OK so I've got all of this set up here.
Now we've got the colour output coming out from this colour ramp.
And what we can do is we can separate it into its individual channels and we can do that with another
converter so we go an ad converter and we can see here separate R G B have we pop that in there.
We can see that the image comes in so it doesn't have to be a plain old colour it is here.
So every pixels the same.
And I can say that with the red channel is going to control the colour over here.
Now because it is a red channel controlling the colour.
What we'll find is that everything that's one on the red obviously everything's just the same value
at the moment but anything is cut coloured one on the red channel will be white because it'll bring
across one one and one is single value here will be repeated three times.
If we wanted it to break down basically to bring it back in to RG territory and control the colours
we'd have to input all three of those into here.
And as you can see you can't just drag and drop all three.
So we have to combine them back together.
And guess what.
There is a node for that so we can go and add a converter and combine r.g. B.
So then you've got red green and blue.
So we can use that control colour.
I can remove one of those we actually get a coloured ball.
And here we can start playing with the values.
So let's use blue to control the roughness setting.
Let's use green and red to control so we're going to get a either a green red or yellow tinge coming
out of here.
Okay so now we've got this snow sets up we can play with the colours here.
So what we don't want while I do want to whiz through it quickly and make sure that at no point does
it go or horrible or it goes a bright yellow.
That's the worst it gets.
By the looks of things.
By the time it reaches one.
So what else can we do to control that so can we have it read at the beginning so how do we get it just
read.
We make sure that green is zero says go to this first.
I need to zoom in a little on to here.
Let's go to this first colour node.
There we go and change this.
So the RG be value of green.
So let's go back there.
Green is zero and red is one.
So now it's slightly red at the beginning and it will turn.
Well neutral here and slightly darker before going yellow.
At the end because the value of one and one in red and green will produce that yellow.
So there we go that's turning around.
Perfect.
Now there's another way of blending the colours this RG be input here.
We'll do some mixing then you've got huge saturation in value and seat changes slightly how it mixes
them together how we got HDL as well and they're all different types of how to blend those colours together.
And incidentally you also get a different set of interpolations depending on which one you selected.
So HSV and h s l they blend the colours first by converting it to those types of mixing and then combining
them back together again and this has the advantage in maintaining the colour saturation between the
different colours the difference hues.
Whereas r.g. B itself would indeed saturate.
And so for you you would lose.
And we can see here you would lose the rich colour change as we go through now.
RG just blends colours by mixing the colour channel and combining it all together.
So we've got lots of different options here and of course you can play with them they give different
results as we go near we can go clockwise.
I don't think with this particular set up we are actually going to see much difference depending on
which one here we select.
Maybe as we move through we might be able to see at different rates of change between them.
But you can see that we've got four channels to play with and we can actually control a lots of different
things.
Now this is a kind of a forced set up but you can see the power of the colour ramp over something like
the MAF node is that you can be a bit where you can be graphical about a you can say when things are
going to happen either have to be so linear about it so we can as demonstrated here have the gloss suddenly
come back and disappear again later on as I say they're not sure of that's going to help us with this
particular making the go or shade a roughness more accurate but it certainly can be applied in other
methods as well.
So one final thing to consider was the colour ramp is its inputs.
So at the moment we have a value being imported which means that the whole object in one lump is just
getting the one value wherever it happens to be on this gradient.
Now what happens if we put in something else along here that can pick different points depending on
what we what we want to do.
So let's try this try that with a basic texture.
So I'm going to go ahead and switch this out I'm going to you shift in S to do so and I'm going to go
into texture and what have we got here.
I do like the or annoy the grealy might be a bit let's try voron Oi.
And here we've got areas now.
Look at that.
We've got areas where it's glossy well where it's red and somewhere it's yellow.
This is quite cool.
Of course we got intensity in cells that's changed four out in these discrete chunks.
So let's go back to intensity and make these bigger which will make the value bigger which will make
them smaller.
And we started to get a slightly different texture across the surface of our Grobe.
Let's try a different texture.
Again I'm going to switch the outgoing texture.
Let's try this gradient texture.
Okay so look about we've got it what we on linnea so that's e is.
Well it looks like it's gonna be red one side in yellow V over by the time we've mixed it with some
glossiness in the middle.
Yeah there we go.
There's that rothesay bit in the middle that's this black band here so we can have different effects
applied across our model.
And of course we can actually just do colour ramp literally a colour ramp we could make it bread one
side in yellow the other without having all this extra plumbed in.
So you could apply with that with something like grass where grass tends to be a deep green by the roots
and maybe a yellow a dirty sort of date yellow over time it gets to the tip and you control that with
a colour ramp.
Now do bear in mind if you do need a bit more control over your colour ramp you can make it wider.
It only goes so wide of course but you can make it wider so you can see the gradient across it's a little
bit more clearly.
Something else that you could potentially do is let's get rid of this gradient texture and add in a
layer weights.
So now we can change this.
The factor here depending on the angle of which we're viewing the object from.
So there we are work we've got a very reflective band just round the very outside.
So let's move this black finger move the reflection bit closer to the 90 degree if we call that here
and there we go.
Got reflection very close.
And it gets more diffuse.
But that's the wrong way round.
So of course we can flip this and we can flip it very quickly.
There's this double headed arrow so that will invert that.
So now it's glossier around the very edge and I can push that very close together and actually have
a very very glossy edge and a more or more rough centre.
Perfect.
And how about sums it up what you can do with the colour ampara Certainly an introduction to what you
could do with the colour ramp.
Bear in mind it's awesome for controlling things.
We could plug in a in image texture in here which would map colours or controls depending on the actual
map itself.
So the possibilities with the kalorama are pretty much limitless and I will see you guys in the next
lecture.