WEBVTT

00:00.840 --> 00:04.080
Welcome to how light interacts with a surface.

00:04.320 --> 00:10.320
So in this video you'll gain a better understanding of how word light works in the real world and how

00:10.320 --> 00:13.830
it transfers across into the cycles rendering engine.

00:13.860 --> 00:18.070
Now we've already got a rough idea when it comes to plain surfaces.

00:18.070 --> 00:25.350
And we started building that up by mixing shaders together and we starting to change how light interacts

00:25.350 --> 00:32.120
with the surfaces depending on the angle of which is viewed from or even just with a texture applied.

00:32.120 --> 00:38.940
So we're starting to control how that light actually is being reflected and seen by the cycles rendering

00:38.940 --> 00:39.470
engine.

00:39.570 --> 00:43.520
And that's how we can start building up more and more realistic materials.

00:43.800 --> 00:48.390
Now we're going to look at six ways that light and surfaces can interact.

00:48.450 --> 00:54.390
And of course in real life they don't just act him one way they act in multiple ways.

00:54.480 --> 01:01.020
Also going to gain some understanding about the physics behind how our materials are working and don't

01:01.020 --> 01:05.060
worry we're not going to get too deep into the maths behind it.

01:05.070 --> 01:11.370
So in order to start this we're going to grab a pen and pencil or in this case a digital version of

01:11.370 --> 01:15.690
it and start having a look at how light interacts with the surface.

01:15.810 --> 01:21.800
Okay so in front of us here we have six different setups in front of us.

01:21.960 --> 01:31.440
And these are suppose are analogous to the having a just a a a rectangle there with one individual shader

01:31.440 --> 01:32.600
attached to it.

01:32.760 --> 01:38.880
So for instance reflection now when reflection happens and we've covered this right earlier on in the

01:38.880 --> 01:45.370
course when we started talking about shaders we have the angle of incidence where the light comes in.

01:45.420 --> 01:46.690
So the angle here.

01:47.750 --> 01:51.070
Is it called the angle of reflection.

01:52.020 --> 01:56.030
Of course nothing is a perfect reflector in the real world.

01:56.220 --> 02:00.340
So this is a perfect example.

02:00.360 --> 02:03.860
In reality you would end up mixing it with something else.

02:03.870 --> 02:08.160
And in fact that's what we're aiming to do here to get a little bit of a deeper understanding what's

02:08.190 --> 02:14.280
actually happening to light when it hits the surface so we can set up more realistic material so we

02:14.280 --> 02:17.060
can think more in-depth about what is happening.

02:17.430 --> 02:18.300
So scattering.

02:18.300 --> 02:19.970
So for instance here diffuse.

02:20.160 --> 02:24.690
So we have again the light ray coming in but instead was a bit of a wobbly light ray.

02:24.780 --> 02:30.870
We would have it scattering off in different directions at different magnitudes depending on the surface

02:30.870 --> 02:31.800
itself.

02:31.920 --> 02:35.850
And that is very useful when we combine the two.

02:35.850 --> 02:41.580
Of course if we did combine the two you may end up with a big reflection coming out if it was quite

02:41.580 --> 02:48.890
a glossy surface and some diffuses well and that would be a mix of these two put together.

02:49.530 --> 02:54.210
Of course then we can add other things into control how that mix happens and that's what we've been

02:54.210 --> 02:56.350
doing very recently.

02:56.400 --> 03:04.050
Now what happens with absorption well as it sounds as light hits a surface some of it will be absorbed.

03:04.140 --> 03:06.250
It's just the way the world works.

03:06.360 --> 03:09.820
So it'll go into the material and be lost forever.

03:09.960 --> 03:14.610
Now it won't be everything that gets lost because that's impossible.

03:14.610 --> 03:19.510
Mass is a black hole which case this would be an entirely black material.

03:19.530 --> 03:25.350
No we're talking earlier about not having materials that was zero on anything.

03:25.350 --> 03:31.400
So let's say green or white light hits the surface and some green is absorbed.

03:31.830 --> 03:35.240
That means we've got the blue and the yellow.

03:35.240 --> 03:37.870
So we have a little bit of the blue and the red.

03:37.920 --> 03:40.130
We have a little bits reflecting here.

03:40.290 --> 03:48.740
Red might come in and get absorbed a little bit but be reflected off much more or bounced off or whatever

03:48.750 --> 03:50.230
it happens to be.

03:50.310 --> 03:56.340
And then of course the blue light itself if that also struck the surface that may be the biggest one

03:56.340 --> 03:56.780
of all.

03:56.790 --> 03:59.610
And that would be a kind of a a pinky colour.

03:59.640 --> 04:07.500
Overall it would be somewhere around here probably would get that type of shade or this particular material

04:07.530 --> 04:11.460
would look a kind of magenta in colour.

04:11.970 --> 04:18.630
Now refracted that is an interesting one you can do this at home when you stick a pencil or a straw

04:18.660 --> 04:20.300
into a cup of water.

04:20.430 --> 04:26.570
You'll see light comes in and then it will bend towards or away from the normal.

04:26.700 --> 04:33.240
So we've got our normal running through here either burn burn turn towards it or away from it depending

04:33.240 --> 04:38.350
whether it's entering a less dense material or a denser material.

04:38.580 --> 04:44.490
So if it's more dense it will tend towards the north of it's less dense it will tend away from that

04:44.490 --> 04:45.220
normal.

04:45.450 --> 04:49.590
So if it was going from glass into air we would find that out.

04:49.620 --> 04:50.820
Well let's do that.

04:51.030 --> 04:53.820
So in from air into glass would do this.

04:53.880 --> 04:59.510
And then as it struck the other side it would carry on roughly at the same angle it was before.

04:59.760 --> 05:02.390
So it slows down and then picks up speed again.

05:02.610 --> 05:09.690
And now this here that we've just drawn is an example of transmission where light doesn't have to be

05:09.690 --> 05:10.770
refracted.

05:10.770 --> 05:17.700
The majority of the light that enters an object goes through that surface and comes out the other side.

05:17.700 --> 05:19.790
Now of course it could be transmitted.

05:19.950 --> 05:24.400
And instead of coming out in a straight line it might be scattered on the surface.

05:25.450 --> 05:31.650
Incidentally when things go inside a model you can end up with subsurface scattering.

05:31.660 --> 05:33.730
So we go back to scattering up here.

05:33.790 --> 05:39.700
If this was a subsurface scattering node we'd find that light would enter the material and then bounce

05:39.730 --> 05:43.110
around and some of that light would find its way out.

05:43.180 --> 05:47.090
And some of it would be absorbed as well.

05:47.110 --> 05:50.350
So there's a lot that joins all of these things together.

05:50.470 --> 05:55.680
Now some of the particular shader nodes that we have are to make our lives easier.

05:55.860 --> 06:00.990
Before a while not that long ago actually the subsurface scattering node didn't exist.

06:01.210 --> 06:08.920
And before we had to do a mixture of all of these things blending them together to try and get a subsurface

06:08.920 --> 06:12.020
scattering or something that at least emulates it.

06:12.130 --> 06:18.190
The final one here there's no direct shade before but it happens in real life and it's worthwhile knowing

06:18.190 --> 06:18.970
about it.

06:19.000 --> 06:25.570
So when light or energy would hit piece surface and let's say it gets absorbed and it gets absorbed

06:25.600 --> 06:30.450
almost fully with very little reflections so we get most of the energy coming in.

06:30.820 --> 06:37.030
Now this particular object would have absorbed energy so it will start emitting energy as well.

06:37.030 --> 06:40.260
Now usually that would be infra-red energy or something along those lines.

06:40.270 --> 06:43.760
But it could also be visible light if it was energetic enough.

06:44.080 --> 06:48.530
So we can't really do the radiated by a shader.

06:48.640 --> 06:53.050
But I think the closest thing to that if you were to emulate something that was hot perhaps something

06:53.050 --> 06:59.710
that was glowing because a lot of energy had been put into it it would be radiating to be emitting so

06:59.710 --> 07:03.190
an emission shader would be quite a useful one here.

07:03.230 --> 07:08.620
I'm sure you could set up a couple of maths nodes and other things to calculate a certain amount of

07:08.620 --> 07:12.920
radiation depending on light hitting the surface as well.

07:13.180 --> 07:18.950
So let's go have a closer look at some shaders now and hop on over into blender.

07:19.950 --> 07:22.520
Okay so we're on a default blender file here.

07:22.620 --> 07:28.380
And one of the things we can do to try out these different Shaila types and then turn snapping on an

07:28.420 --> 07:35.520
With lift this object up by one and move it across a couple are now going to go to the 3-d cursor where

07:35.520 --> 07:39.410
are we 3D Curson just set it plus one on the z axis.

07:39.410 --> 07:48.590
So when I add a couple of more basic objects like a cone and Suzanne let's stop at Suzanne the monkey.

07:48.600 --> 07:49.240
There we go.

07:49.380 --> 07:55.500
And we rotate Suzanne around 90 so she's facing us although that is down the camera.

07:55.500 --> 07:56.920
She was rightly added.

07:56.950 --> 08:03.570
I want to set smooth shading on this cone so smooth shading there will get some odd effects around the

08:03.570 --> 08:09.120
base here because well it's trying to smooth around a great of a 90 degree angle so that's going to

08:09.120 --> 08:15.330
look interesting and I'm going to smooth Suzanne here now with Suzanne one of the things to bear in

08:15.330 --> 08:22.260
mind is she's going to be quite jagged So I'm going to add in a couple of subsurface divisions just

08:22.260 --> 08:24.510
to make her look that much smoother.

08:24.840 --> 08:32.940
Okay let's go to the camera view and well let's move that camera around so we've got a much better view

08:33.660 --> 08:35.590
case of all three of our objects.

08:35.620 --> 08:42.690
Now finally to play with this I'm going to add in one final meche So I've got a surface to work with.

08:42.690 --> 08:46.010
Going to move that down and scale it up.

08:46.020 --> 08:52.770
So we've got a surface and I'm going to set all three of these objects to have the same material.

08:52.770 --> 08:59.140
So let's go to the materials tab new and let's change the colour so we can see what's going on.

08:59.160 --> 09:05.090
Ullman could apply that material to all these other ones as well.

09:05.310 --> 09:07.090
Okay so we've got our material set up.

09:07.170 --> 09:12.870
Lighting is not great at the moment so when I go to my lamp maybe it universal using the sunlamp and

09:12.870 --> 09:14.180
use nodes.

09:14.220 --> 09:14.850
Okay.

09:14.850 --> 09:21.330
And I'm going to make the outputs of the strength about four so it's nice and bright when I get rid

09:21.390 --> 09:26.660
of my propertys panel and my tool shelf and just zoom into the area we're looking at.

09:26.790 --> 09:32.790
Now we've got this set up we can actually play with the material and I'm going to call this test material

09:32.800 --> 09:38.160
so we know what's going on and we can actually change this to all different types so we can make it

09:38.190 --> 09:43.980
glossy You can see this reflecting Incidentally you see this really jagged stuff happening around here.

09:44.070 --> 09:49.350
That's simply because there's there's not enough polygons to interpolate between them all so you end

09:49.350 --> 09:51.200
up with a very jagged surface.

09:51.210 --> 09:56.880
If we wanted to improve that again we'd have to add some subsurface divisions but of course with that

09:56.880 --> 10:04.080
comes a few problems in itself because that cone no longer looks like a cone but kind of cool it now

10:04.080 --> 10:08.120
looks like a teardrop which I didn't know that would happen.

10:08.130 --> 10:09.120
First time I've tried that.

10:09.120 --> 10:09.810
There we go.

10:09.810 --> 10:10.900
How cool is that.

10:10.920 --> 10:14.520
If I'm going to move that across on the y axis so it's a little.

10:14.580 --> 10:20.520
I've moved the wrong thing move across on the y axis it's a little closer to our models.

10:20.700 --> 10:24.810
Okay I'll leave it like that just because I can and because I quite like it.

10:25.040 --> 10:29.260
Okay Somehow I've got these three objects that we can play with.

10:29.340 --> 10:36.000
We can play with the materials and I'll get to that in a few moments after I've just explained a couple

10:36.000 --> 10:37.340
of items here.

10:37.470 --> 10:47.400
So I want to explain that why volume absorption and volume scattering will come out black and anything

10:47.400 --> 10:48.800
else to do with volume.

10:48.810 --> 10:56.470
And the reason for that is because we're changing the volume properties and not the surface properties.

10:56.760 --> 11:03.300
So we see the word surface here and volume here so we can swap these round or essentially click on the

11:03.300 --> 11:10.240
little darton remove and then go to volume and add it in to volume absorption for instance.

11:10.530 --> 11:14.810
And if I make this density something like 15 we'll be able to see what's going on there.

11:14.820 --> 11:20.050
The thicker your object is the more light it's actually absorbs.

11:20.160 --> 11:22.640
So we give this a colour let's make it a blue.

11:22.710 --> 11:28.620
We can see that's we end up with a very dark blue or essentially black if all the light is absorbed

11:28.860 --> 11:32.070
by the time it reaches the middle of a thick object.

11:32.070 --> 11:35.910
And these is a quite thin so it lets a lot of light through.

11:36.030 --> 11:41.850
Now volume scatter is very similar but it's kind of opposite in a way.

11:41.880 --> 11:45.450
So you're telling it which colours are being absorbed.

11:45.450 --> 11:50.340
So in this case the blue you can see opposite is the yellow surface absorbing a lot of blue and the

11:50.340 --> 11:51.780
output is mainly yellow.

11:51.780 --> 11:57.690
If I tell it to absorb all the green and of course don't go all the way because otherwise you'd get

11:57.690 --> 12:01.930
a complete zero on something and which is something we don't want.

12:01.950 --> 12:09.720
If we go let's say to here we can see that the pink light is being scattered etc etc etc. says the opposite

12:09.720 --> 12:11.340
side of that colour wheel.

12:11.800 --> 12:16.150
Now when we look at the nodes set up we get something.

12:16.230 --> 12:19.050
Well it really highlights what's going on in the background here.

12:19.310 --> 12:25.670
So if we're playing with the volume scatter it needs to be plugged into the material outputs in these

12:25.670 --> 12:31.760
to be plugged into the volume inputs of that material outputs otherwise it won't work and it actually

12:31.760 --> 12:35.240
says here volume and we've got a green shader outputs.

12:35.360 --> 12:38.360
So it's looking for a shader input that's also a volume.

12:38.400 --> 12:42.950
If we plug it into a surface it doesn't work because it's not set up to do that.

12:42.950 --> 12:49.890
The other thing to show you guys is the anisotropic filter.

12:50.060 --> 12:52.780
Where is that anisotropic in this tropic.

12:52.850 --> 12:54.810
I'm being complete we go.

12:55.020 --> 13:01.490
So anisotropic basically means it changes depending on the direction at which the camera and slash lighting

13:01.790 --> 13:03.500
is hitting the object.

13:03.500 --> 13:10.060
So in this case an anisotropic is used as a control here and a stroppy amateur tropica I don't know

13:10.060 --> 13:13.820
how mispronouncing that amateur trophy up anyway.

13:13.910 --> 13:16.810
It depends on the handler which the light is.

13:16.850 --> 13:21.290
And we end up with a very good looking saucepan lid.

13:21.320 --> 13:24.080
If we get the settings quite right there.

13:24.290 --> 13:29.150
Perhaps not on a cube but we get the effect there if you look on the bottom of a metallic saucepan of

13:29.150 --> 13:30.240
what's going on.

13:30.260 --> 13:37.720
So it's very very good for metallic objects it's basically directional reflections in that case rotation.

13:37.730 --> 13:42.720
Well that kind of skews that and makes it look a bit odd in places.

13:42.740 --> 13:48.340
But it will have its its time and place depending on the model that you're working on.

13:48.860 --> 13:51.740
So that's only a couple of these shaders gone over.

13:51.770 --> 13:54.700
And of course it's time for a challenge.

13:56.130 --> 14:03.600
I would like to go and play with shaders so set up a series of basic objects just use primitives to

14:03.600 --> 14:10.200
get the hang of this and obviously watch for facets as well so if you are going to use anything that's

14:10.230 --> 14:15.520
basically smooth you want it to be as smooth as possible in the first place.

14:15.540 --> 14:23.130
So bear in mind if you're making a sphere or you're making a cone etc. just to make sure you don't have

14:23.190 --> 14:29.730
artefacts when your rendering apply the same shader to each one of these objects you can see how it

14:29.730 --> 14:33.970
affects different objects at the same time.

14:34.020 --> 14:38.790
Remember you can use a render board has to speed up rendering so you have to render the entire scene

14:38.790 --> 14:44.010
you can draw that render border around your work so you don't have to wait for your computer if you've

14:44.010 --> 14:46.920
not got a particularly quick one to render the scene.

14:47.060 --> 14:52.050
Remember you can lower your samples as well just in case you've turned them up at some point in the

14:52.050 --> 14:52.740
past.

14:52.770 --> 14:56.330
I wouldn't recommend any more than 10 wash to do in this testing.

14:57.470 --> 15:03.680
Try out all of the shaders one by one to see their effect on those primitives on those objects and you'll

15:03.680 --> 15:07.020
get an idea and a feeling about how they're going to work.

15:07.100 --> 15:14.660
When you start using them on other objects as well remember volume shaders need to be plugged in to

15:14.660 --> 15:17.860
the volume input of the material output node.

15:17.930 --> 15:23.440
They're designed to work on the volume of the shape not just its surface.

15:23.620 --> 15:26.430
So a video now and give that a go.

15:28.870 --> 15:29.540
Okay guys.

15:29.560 --> 15:30.550
Welcome back.

15:30.550 --> 15:32.490
Let's go play with some shaders.

15:33.540 --> 15:37.530
Okay so we're back over in blender and I'm going to go and open up a file.

15:37.530 --> 15:41.070
I was working on earlier just a few extra primitives in it.

15:41.190 --> 15:41.960
And here we go.

15:41.970 --> 15:47.630
We've got smooth shading applied to four of the objects here and the others are flat.

15:47.760 --> 15:51.360
So let's hop into rended mode so we can see what's going on.

15:51.360 --> 15:56.900
And I have got the man lights a peachy creamy colour at the moment.

15:57.090 --> 16:01.110
So with diffuse we know what that looks like we'll play with that.

16:01.120 --> 16:03.450
Lots hair does look very odd.

16:03.450 --> 16:08.000
Did you notice that when you played with hair he heads up faceted all over the place.

16:08.040 --> 16:13.460
Of course this shader is in fact designed for hair not thick objects.

16:13.530 --> 16:14.550
But there we go.

16:14.700 --> 16:18.050
If that's a pattern you're looking for and something.

16:18.160 --> 16:21.470
Well it's there and ready for you if you want to use it.

16:21.510 --> 16:22.930
So let's see what else we got here.

16:22.930 --> 16:24.160
Volume absorption.

16:24.180 --> 16:27.970
Of course we can't use that on the surface we need to use that on volume.

16:27.980 --> 16:30.020
That was great fun to play with glossy.

16:30.030 --> 16:32.370
I always love glossy I like shiny things.

16:32.370 --> 16:33.770
Call me a magpie.

16:33.900 --> 16:38.910
I can make things reflective and we've already played with making this roughness just a little bit more

16:38.910 --> 16:45.380
sensitive before I quite like the tune shade whereas it bit the further downtown.

16:45.530 --> 16:47.310
Now I thought this is quite cool.

16:47.310 --> 16:50.550
Give us a more cartoony appearance to your models.

16:50.740 --> 16:53.080
And there were two options here.

16:53.180 --> 17:01.650
Diffusive glossy glossy had a much harsher reflection to non reflective area I suppose that's right

17:01.680 --> 17:09.540
with it being glossy size I quite liked having that quite high up because it gave more of that comic

17:09.540 --> 17:17.290
book type feel to its core smoothing just made those those boundaries a little less harsh.

17:17.370 --> 17:23.460
Although when he wakes up a size so high it didn't really make sense raising the smoothness because

17:23.460 --> 17:29.390
it made it quite bland by quite like the the output that this gives a very cartoony very.

17:29.430 --> 17:35.950
That's basically what it is it's a toon shader it's supposed to look more cartoony velvet's now.

17:36.050 --> 17:39.860
It was an interesting one for me that kind of looked more like.

17:40.290 --> 17:42.860
Well obviously it's supposed to be velvet so why.

17:42.930 --> 17:46.680
Let's make it a luscious deep red or gorgeous.

17:46.800 --> 17:54.220
But it reminded me more of the diffuse shader with the black splodge facing the camera than about you.

17:54.240 --> 17:57.170
But that's how I felt about it when I first saw it.

17:57.330 --> 18:04.560
Now I do know that it's useful for doing surfaces that have a house slightly hairy like fine the hair

18:04.560 --> 18:06.500
on a face or something along those lines.

18:06.600 --> 18:13.890
So it can be used much more subtly than this extreme example translucent that's always fun to have.

18:13.890 --> 18:16.520
Of course these are designed to.

18:16.530 --> 18:23.160
Some of these are designed to be used with other shaders so translucent as the main sounds is just letting

18:23.160 --> 18:30.240
light through our model which is great but of course it would be better if it was mixed with something

18:30.270 --> 18:36.160
else to make it semi transparent glass is a good one to play with.

18:36.180 --> 18:43.980
Now there are shader itself has got some spec clarity to it so it's glossy and refraction down in the

18:43.980 --> 18:50.360
bottom is basically the glass shader without reform without the gloss added to it.

18:50.460 --> 18:58.350
So very similar but this is more of a I suppose a plastic sort of feel to it rather than a glass.

18:58.350 --> 19:05.880
Now the one that will get most people is hold out because you're very unlikely to use it unless you

19:05.880 --> 19:09.320
are trying to separate something out later on in the compositor.

19:09.480 --> 19:16.650
Essentially hold out adds a value of zero for any object that actually has that material applied to

19:16.650 --> 19:17.110
it.

19:17.220 --> 19:24.060
And when that happens it means that later on you can fill it in in a render in the compositor.

19:24.060 --> 19:28.430
But we're not going to use that in this particular section at all.

19:28.470 --> 19:30.540
So lots of different ones to play with.

19:30.540 --> 19:32.870
Did you have any particular favourites.

19:32.960 --> 19:38.830
Say I quite liked to know that was one of my favourites because it had that high contrast to it.

19:38.880 --> 19:42.440
Did you end up mixing or adding any of the shaders together.

19:42.440 --> 19:44.750
Did you get some effects that you really liked.

19:44.880 --> 19:50.400
I quite like mixing emission with certain shaders because it makes the objects glow as I said I like

19:50.400 --> 19:52.170
shiny things.

19:52.290 --> 19:57.190
Anyway if you've come up with some great shader combinations I'd love to see them in the discussions

19:57.510 --> 20:00.140
and I will see you guys in the next lecture.
