WEBVTT

00:00.210 --> 00:03.660
Welcome to the colour ramp node in this video.

00:03.660 --> 00:05.700
Well first of all what is the colour ramp node.

00:05.700 --> 00:14.760
Well the colour ramp node is generally used for mapping values to colours with the use of a gradient.

00:15.060 --> 00:17.690
Now become more apparent very shortly.

00:18.060 --> 00:22.320
It can be customized to produce very interesting results.

00:22.350 --> 00:25.250
We will be using it to control a single value.

00:25.260 --> 00:28.630
In the example coming up so we can just stick with the greyscale.

00:28.860 --> 00:31.850
But because colour is three separate channels.

00:31.860 --> 00:39.210
RG And B you can potentially control three separate values with this one node.

00:39.360 --> 00:45.540
And if you're a graphically minded person well its used to graphically control values so you can visually

00:45.540 --> 00:47.440
see what's going on.

00:48.150 --> 00:52.490
So let's go play with the colour ramp mode now and hop on over in a blender.

00:53.250 --> 00:56.580
Okay so we're back over in blender and to speed things along.

00:56.580 --> 00:59.480
I'm going to open up the save from The Last Lecture.

00:59.490 --> 01:02.380
So we've got something we can work with.

01:02.640 --> 01:05.200
So here we go this is what we were working on before.

01:05.340 --> 01:10.530
I'm asked to turn on the rendered view up and the top found one and make that whole area a little bit

01:10.530 --> 01:12.170
bigger so we can see what's going on.

01:12.360 --> 01:17.430
I'm going to get rid of this properties panel on the right hand side of the node editor.

01:17.570 --> 01:22.680
I want to keep value that's going to be useful and I'm going to get rid of power because that's what

01:22.680 --> 01:28.910
we're going to use instead of a map node we're going to use this colour RAM.

01:28.920 --> 01:31.340
So again it's a type of converter.

01:31.560 --> 01:35.040
And let's pop that in a bit wider than expected.

01:35.040 --> 01:35.430
There we go.

01:35.430 --> 01:38.990
Let's pop that in here and link these up.

01:40.110 --> 01:40.760
Okay.

01:41.010 --> 01:48.120
So what we've said she's done here oh let's plug into the right node input roughness.

01:48.540 --> 01:48.770
OK.

01:48.810 --> 01:53.580
So what we've essentially done here is nothing so far because of the value being passed through or that's

01:53.580 --> 01:55.110
just undo this for the moment.

01:55.110 --> 02:01.270
This value here is literally just moving along this gradient from one side to the other.

02:01.290 --> 02:06.420
And so looking at it it makes absolutely no difference.

02:06.420 --> 02:07.820
You plug this in here.

02:07.820 --> 02:09.700
Point two is going to be point two.

02:09.720 --> 02:15.410
And because of the gradient is linear across from one colour stop to another.

02:15.450 --> 02:21.900
These land soon in a little bit these little things that look like houses because it's uniform moving

02:21.900 --> 02:26.280
across then it will just be a one to one relationship.

02:26.280 --> 02:32.010
Now we can move these colour stops by left clicking on them and moving them to the left or right.

02:32.040 --> 02:38.100
Now what that will do is it will mean anything up and remember that black is zero black is always a

02:38.100 --> 02:43.740
value of zero anything up to position three because that's the selected one.

02:44.130 --> 02:47.570
Or point three will be Black.

02:47.570 --> 02:52.350
You'll be zero so any value that comes in will be made to be zero.

02:52.350 --> 02:56.090
Now this does help us move it along.

02:56.220 --> 03:00.240
But it's really just offset the beginning and squash the other side.

03:00.360 --> 03:07.380
So that means from this point here point three to 1 it's going to be a more exaggerated version of the

03:07.380 --> 03:08.680
problem we've already got.

03:08.760 --> 03:12.110
So that's not what we want to do in this case.

03:12.120 --> 03:19.500
Watts would be a particular solution here is to add another one of these colour stops and make this

03:19.500 --> 03:22.410
dark grey area last longer.

03:22.410 --> 03:27.780
Now there's a couple of ways you can do this which has hit the plus button here and that will put a

03:27.810 --> 03:30.140
colour stop smack bang in the middle.

03:30.210 --> 03:34.620
And we then can select that colour stopping is selective at the moment.

03:34.620 --> 03:39.960
We can tell that a number of ways who've got this dotted line coming out the top of it which shows its

03:39.960 --> 03:46.840
position and we can also see this number here is the active colour stop number one.

03:46.850 --> 03:50.110
And it goes 0 1 2.

03:50.190 --> 03:51.480
So it always starts at zero.

03:51.480 --> 03:52.940
It can be a bit confusing.

03:52.950 --> 03:57.230
Now this colour bar on the bottom enables us to change this.

03:57.270 --> 04:03.110
Now we're only going to deal with the grey scale at the moment so that means that's on huge saturation

04:03.110 --> 04:04.040
of value.

04:04.050 --> 04:07.150
The only thing we really need to move is the value controller.

04:07.220 --> 04:14.240
And if I lower that down to maybe point three we can see it stays darker for longer if it stays darker

04:14.250 --> 04:15.430
for longer.

04:15.450 --> 04:19.470
We should find that when we move the value along.

04:20.850 --> 04:26.490
It's much better than it was before and of course we can compare what it was before by just muting the

04:26.490 --> 04:32.040
colour ramps if I select that a Muta and come off again I can see that's made a difference.

04:32.070 --> 04:38.700
Now of course I can stretch that out further to make a have a more of an impact or indeed I can add

04:38.790 --> 04:44.950
another colour stop and make the gradient gradually change.

04:44.970 --> 04:50.490
So another way of adding a colour stop is to hold down control and left click and then you can place

04:50.490 --> 04:52.180
it where you want to place it.

04:52.200 --> 04:56.370
And again I can then go into here and change the value of that.

04:56.580 --> 05:03.500
Now this also gives us the ability to have black come back later on.

05:03.630 --> 05:07.480
So for instance at this wouldn't it be particularly used.

05:07.470 --> 05:12.960
Well I can't think of an application for it with the roughness input that we're trying to control at

05:12.960 --> 05:13.490
the moment.

05:13.590 --> 05:18.500
But it is kind of useful with other things if you wanted to take control of them.

05:18.530 --> 05:25.110
So sometimes it can be a little well tricky basically to select that ball going to pick this up and

05:25.110 --> 05:26.420
move it over here.

05:26.420 --> 05:32.080
So it's dark again and again to change it so it's a value of zero.

05:32.130 --> 05:38.130
And here we go we've now got black further along what we should find them I'm going to accurately position

05:38.130 --> 05:44.760
it by typing something in there or we should find is now it's shiny stars getting rougher and rougher

05:44.790 --> 05:47.840
and then suddenly gets shiny again before going completely Matt.

05:48.710 --> 05:53.990
So a value of point one all that some muter otherwise you don't see what's going on.

05:53.990 --> 05:56.040
Point to Point three point four.

05:56.050 --> 06:00.890
And we can see it's getting more and more blurring then as we approach point A.

06:00.990 --> 06:01.640
And there we go.

06:01.640 --> 06:06.590
It goes clear again of course if we were holden downshift and dragging it we'd see that a bit more gradual

06:06.860 --> 06:13.500
and then that final stage between point eight and a one just happens really really really quickly and

06:13.550 --> 06:18.420
that's it for probably only a couple of hundredths to move it along.

06:18.710 --> 06:22.700
So that is one of the ways we can use the colour ramp.

06:22.820 --> 06:28.280
Now one of the things to bear in mind with the colour ramp is in fact we've got four values we can play

06:28.280 --> 06:34.190
with so we can add another node in here to extract some of these values.

06:34.190 --> 06:36.720
So the colour there are three.

06:37.530 --> 06:40.710
Colours basically coming out of here red green and blue.

06:40.710 --> 06:46.050
So there are three values and there's a fourth value from the Alpha channel and we can use the hatz

06:46.050 --> 06:48.690
to control other things as well.

06:48.690 --> 06:56.880
So for instance if we go ahead and let's duplicate this glossy shader and then let's mix them together

06:56.940 --> 07:00.650
and I'm going to use that shortcut control in zero to do the mixing.

07:00.660 --> 07:09.150
I'm not going to worry about tidying it up and then I'm going to switch this out to a diffuse texture.

07:09.150 --> 07:14.010
And I get that error message I still haven't got to the bottom of it I think I just need to turn it

07:14.040 --> 07:16.710
on and off again but I'll look at that later.

07:16.740 --> 07:20.050
Doesn't seem to be breaking anything or may even be a bug in the program.

07:20.250 --> 07:22.930
OK so I've got all of this set up here.

07:22.950 --> 07:26.280
Now we've got the colour output coming out from this colour ramp.

07:26.460 --> 07:33.180
And what we can do is we can separate it into its individual channels and we can do that with another

07:33.180 --> 07:41.570
converter so we go an ad converter and we can see here separate R G B have we pop that in there.

07:41.670 --> 07:48.860
We can see that the image comes in so it doesn't have to be a plain old colour it is here.

07:48.860 --> 07:50.390
So every pixels the same.

07:50.520 --> 07:54.790
And I can say that with the red channel is going to control the colour over here.

07:54.900 --> 08:00.170
Now because it is a red channel controlling the colour.

08:00.330 --> 08:06.960
What we'll find is that everything that's one on the red obviously everything's just the same value

08:06.960 --> 08:12.840
at the moment but anything is cut coloured one on the red channel will be white because it'll bring

08:12.840 --> 08:17.560
across one one and one is single value here will be repeated three times.

08:17.790 --> 08:24.840
If we wanted it to break down basically to bring it back in to RG territory and control the colours

08:25.140 --> 08:30.990
we'd have to input all three of those into here.

08:31.020 --> 08:34.380
And as you can see you can't just drag and drop all three.

08:34.500 --> 08:37.010
So we have to combine them back together.

08:37.230 --> 08:38.070
And guess what.

08:38.160 --> 08:43.040
There is a node for that so we can go and add a converter and combine r.g. B.

08:43.050 --> 08:47.000
So then you've got red green and blue.

08:47.220 --> 08:49.080
So we can use that control colour.

08:49.350 --> 08:53.030
I can remove one of those we actually get a coloured ball.

08:53.430 --> 08:56.270
And here we can start playing with the values.

08:56.310 --> 09:01.430
So let's use blue to control the roughness setting.

09:01.800 --> 09:07.770
Let's use green and red to control so we're going to get a either a green red or yellow tinge coming

09:07.770 --> 09:08.680
out of here.

09:09.080 --> 09:13.620
Okay so now we've got this snow sets up we can play with the colours here.

09:13.620 --> 09:19.440
So what we don't want while I do want to whiz through it quickly and make sure that at no point does

09:19.440 --> 09:23.340
it go or horrible or it goes a bright yellow.

09:23.340 --> 09:25.020
That's the worst it gets.

09:25.020 --> 09:25.890
By the looks of things.

09:25.890 --> 09:27.980
By the time it reaches one.

09:28.110 --> 09:32.940
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

09:32.940 --> 09:33.390
read.

09:33.510 --> 09:37.620
We make sure that green is zero says go to this first.

09:37.830 --> 09:40.030
I need to zoom in a little on to here.

09:40.030 --> 09:42.240
Let's go to this first colour node.

09:42.240 --> 09:44.880
There we go and change this.

09:44.910 --> 09:48.010
So the RG be value of green.

09:48.260 --> 09:49.380
So let's go back there.

09:49.380 --> 09:54.010
Green is zero and red is one.

09:54.030 --> 09:57.650
So now it's slightly red at the beginning and it will turn.

09:58.560 --> 10:03.340
Well neutral here and slightly darker before going yellow.

10:03.360 --> 10:12.500
At the end because the value of one and one in red and green will produce that yellow.

10:12.510 --> 10:14.810
So there we go that's turning around.

10:14.820 --> 10:15.750
Perfect.

10:15.750 --> 10:19.630
Now there's another way of blending the colours this RG be input here.

10:19.680 --> 10:25.050
We'll do some mixing then you've got huge saturation in value and seat changes slightly how it mixes

10:25.050 --> 10:34.240
them together how we got HDL as well and they're all different types of how to blend those colours together.

10:34.380 --> 10:42.930
And incidentally you also get a different set of interpolations depending on which one you selected.

10:42.930 --> 10:52.800
So HSV and h s l they blend the colours first by converting it to those types of mixing and then combining

10:52.800 --> 10:57.450
them back together again and this has the advantage in maintaining the colour saturation between the

10:57.450 --> 10:59.580
different colours the difference hues.

10:59.580 --> 11:03.500
Whereas r.g. B itself would indeed saturate.

11:03.540 --> 11:05.880
And so for you you would lose.

11:05.970 --> 11:12.110
And we can see here you would lose the rich colour change as we go through now.

11:12.180 --> 11:16.900
RG just blends colours by mixing the colour channel and combining it all together.

11:17.130 --> 11:21.630
So we've got lots of different options here and of course you can play with them they give different

11:21.630 --> 11:24.470
results as we go near we can go clockwise.

11:24.540 --> 11:29.070
I don't think with this particular set up we are actually going to see much difference depending on

11:29.070 --> 11:31.680
which one here we select.

11:32.000 --> 11:38.250
Maybe as we move through we might be able to see at different rates of change between them.

11:38.250 --> 11:44.430
But you can see that we've got four channels to play with and we can actually control a lots of different

11:44.430 --> 11:44.880
things.

11:44.880 --> 11:51.480
Now this is a kind of a forced set up but you can see the power of the colour ramp over something like

11:51.810 --> 11:57.640
the MAF node is that you can be a bit where you can be graphical about a you can say when things are

11:57.640 --> 12:03.750
going to happen either have to be so linear about it so we can as demonstrated here have the gloss suddenly

12:03.750 --> 12:08.940
come back and disappear again later on as I say they're not sure of that's going to help us with this

12:08.940 --> 12:17.100
particular making the go or shade a roughness more accurate but it certainly can be applied in other

12:17.100 --> 12:18.380
methods as well.

12:19.450 --> 12:23.020
So one final thing to consider was the colour ramp is its inputs.

12:23.050 --> 12:31.330
So at the moment we have a value being imported which means that the whole object in one lump is just

12:31.330 --> 12:36.950
getting the one value wherever it happens to be on this gradient.

12:37.150 --> 12:43.960
Now what happens if we put in something else along here that can pick different points depending on

12:44.200 --> 12:45.660
what we what we want to do.

12:45.680 --> 12:49.280
So let's try this try that with a basic texture.

12:49.330 --> 12:55.420
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

12:55.420 --> 12:58.300
into texture and what have we got here.

12:58.300 --> 13:02.480
I do like the or annoy the grealy might be a bit let's try voron Oi.

13:03.260 --> 13:05.530
And here we've got areas now.

13:05.770 --> 13:06.220
Look at that.

13:06.230 --> 13:12.830
We've got areas where it's glossy well where it's red and somewhere it's yellow.

13:12.860 --> 13:14.130
This is quite cool.

13:14.120 --> 13:20.400
Of course we got intensity in cells that's changed four out in these discrete chunks.

13:20.450 --> 13:25.850
So let's go back to intensity and make these bigger which will make the value bigger which will make

13:25.850 --> 13:26.920
them smaller.

13:28.540 --> 13:33.260
And we started to get a slightly different texture across the surface of our Grobe.

13:33.400 --> 13:35.050
Let's try a different texture.

13:35.050 --> 13:37.360
Again I'm going to switch the outgoing texture.

13:37.360 --> 13:39.610
Let's try this gradient texture.

13:40.000 --> 13:46.360
Okay so look about we've got it what we on linnea so that's e is.

13:46.390 --> 13:51.850
Well it looks like it's gonna be red one side in yellow V over by the time we've mixed it with some

13:51.850 --> 13:53.680
glossiness in the middle.

13:53.870 --> 13:54.400
Yeah there we go.

13:54.400 --> 14:00.910
There's that rothesay bit in the middle that's this black band here so we can have different effects

14:00.910 --> 14:02.530
applied across our model.

14:02.590 --> 14:07.300
And of course we can actually just do colour ramp literally a colour ramp we could make it bread one

14:07.300 --> 14:12.160
side in yellow the other without having all this extra plumbed in.

14:12.160 --> 14:18.010
So you could apply with that with something like grass where grass tends to be a deep green by the roots

14:18.010 --> 14:24.370
and maybe a yellow a dirty sort of date yellow over time it gets to the tip and you control that with

14:24.400 --> 14:25.440
a colour ramp.

14:25.690 --> 14:30.640
Now do bear in mind if you do need a bit more control over your colour ramp you can make it wider.

14:30.640 --> 14:36.910
It only goes so wide of course but you can make it wider so you can see the gradient across it's a little

14:36.910 --> 14:38.150
bit more clearly.

14:39.300 --> 14:45.930
Something else that you could potentially do is let's get rid of this gradient texture and add in a

14:46.020 --> 14:47.990
layer weights.

14:48.780 --> 14:51.840
So now we can change this.

14:51.840 --> 14:56.510
The factor here depending on the angle of which we're viewing the object from.

14:56.670 --> 15:03.210
So there we are work we've got a very reflective band just round the very outside.

15:03.300 --> 15:10.350
So let's move this black finger move the reflection bit closer to the 90 degree if we call that here

15:10.680 --> 15:11.500
and there we go.

15:11.520 --> 15:13.390
Got reflection very close.

15:13.410 --> 15:14.910
And it gets more diffuse.

15:14.910 --> 15:16.630
But that's the wrong way round.

15:16.650 --> 15:19.810
So of course we can flip this and we can flip it very quickly.

15:19.830 --> 15:22.610
There's this double headed arrow so that will invert that.

15:22.770 --> 15:29.760
So now it's glossier around the very edge and I can push that very close together and actually have

15:29.760 --> 15:35.680
a very very glossy edge and a more or more rough centre.

15:35.970 --> 15:37.010
Perfect.

15:37.440 --> 15:42.930
And how about sums it up what you can do with the colour ampara Certainly an introduction to what you

15:42.930 --> 15:44.240
could do with the colour ramp.

15:44.250 --> 15:46.860
Bear in mind it's awesome for controlling things.

15:46.860 --> 15:56.190
We could plug in a in image texture in here which would map colours or controls depending on the actual

15:56.190 --> 15:57.030
map itself.

15:57.030 --> 16:04.290
So the possibilities with the kalorama are pretty much limitless and I will see you guys in the next

16:04.290 --> 16:04.990
lecture.
