Welcome to subsurface scattering.
Now what is subsurface scattering.
Well it's a node that was recently introduced into a blender that allows us to mimic a certain affect
of indirect lighting.
So long it would penetrate a surface of an object in real life.
So whether it's a wax candle a glass of milk or even the human skin light doesn't just hit the surface
and bounce off it as she goes into the surface and that scatters within the surface before leaving the
skin again.
So the light enters them arterial and then it is scattered in the material by a certain amount depending
on certain parameters.
Some light leaves the surface at different points in which it entered.
Now the more the distance that the light travels before exiting the more it will be absorbed so you
will have less of an effect when it's thick vs. when it's thin.
So thicker areas will absorb more than thinner ones.
Now most shade as we have used so far are an example of direct surface scattering.
So a diffuse shader is how the surface reacts to light a gloss shade or again is how the surface reacts
to light subsurface scattering is a form of indirect surface scattering where the light enters the material
and to give you a real world example of this.
And I'm sure you might have played with the lights before.
I'll just show you a small clip now of what happens when a simple hand goes over the top of a lightsource.
So here we have a simple light.
I'm using my phone lights here and I've got a piece of cardboard.
As we approach the actual light itself this is an example of subsurface scattering.
The light is entering that cardboard and actually being bounced about.
And if we go and grab my hand as we start to move toward you can now see with the fingertip itself is
starting to scatter red light.
And if I move my finger down across the light you can see that the light is coming through the finger.
In fact down this gap in between the fingers it is in fact subsurface scattering again the light is
not getting through directly rather than indirectly through the finger.
So before we go ahead and start playing about with the subsurface scattering though.
I'll just want to show you these two scenes.
The only difference between these two scenes is the lighting itself.
They're just spheres with a subsurface scatting material applied to them.
The first one has a three point lighting set up.
The second one you can see is very much extreme.
The light is to the slightly to the right and behind.
And it is just a single Sprite spotlight and that produces a dramatically different effect.
So is important here when we compare the two images that you realize that lighting can make a big impact
to your scene.
So it's quite useful to get that right first before you start tweaking your materials because you could
be tweaking your materials based upon the lighting rather than basing it upon what the actual material
should be resembling.
So now we've explored these particular topics let's go play with the subsurface scattering node a rim
blender.
So I have gone ahead and opened up a brand new blender file.
Now there's one important thing that you should know before we get going is that subsurface scattering
is only supported on GP use from the latest version of Blender which is currently two point seven seven.
Before that if each trying new subsurface scattering on your GP you you'll end up with it not rendering
you'll get an error.
And what will happen is the Rendell come out and it'll just be blank.
I just popped over to my P.S. In fact the balls that you've just seen I rendered on my p.c and I had
two point seventy six installed on that particular computer and I had made it on my Mac when over the
peasey for rendering and found that everything was black had confused me for a few moments until I realized
that I was just running an older version where the GP who was not supported for subsurface scattering
the cpq has always been so that's fine.
So if you are finding your having rendering problems do make sure you've got the latest version of Blender.
So without any further adieu let's go and delete this cube and add in the monkey.
Hello Suzanne.
We're going to then get a subsurface division modifier just to make her a little smoother and add in
a smooth shading.
Okay I'm happy with that.
Let's go ahead now and play with the materials.
Has a couple of ways that we can obviously get to the materials week.
We're going to need the node editor in a moment so let's go ahead and open up the node editor.
There we go.
And we can create new material on the node editor or in the materials properties over here it doesn't
matter.
And once we've created that let's zoom in so you guys can see what's going on and we can see at the
moment it's got a diffuse shader.
Now eventually when we build up the actual layers that exist for the skin we're going to use a monkey
as an example here.
A We will end up with a diffuse shade.
But for the moment we can just get rid of it.
If I had one to get rid of everything just the diffuse shade.
So just start with that one subsurface scattering shader.
So under shaders we got subsurface scattering.
Now sometimes abbreviated to just three S's as well so if you ever see s s s that means sub surface
scattering.
And let's turn my view port to rendered mode.
Now we can already see this compared to diffuse is already getting light coming through certain directions.
Now not quite sure where my lamp is in the scene so let's just set up the lighting first.
If I'm going to put the lights almost directly behind Suzanne so we can really see the light basically
come through the ears to get to the front view.
Pull that down can't really see much here.
There we go.
And I'm going to make that quite bright was going make it five thousand or something so let's just check
and see what that looks like Okay five thousand is going to be too much.
Again that's was around to the front.
Zoom in and see what's going on.
So we're losing all the detail in the years at five thousand So that is far too bright so we can play
this to our hearts content 2000 to hyatt's get down to five hundred k.
That's possibly there.
Let's drop it to 300 and we can see that light is coming through the chin as well Suzanne here as well
as the years.
I am happy with that so.
And then right click back on Suzanne so I can see the subsurface scattering.
And there are a series of options there's only one outputs.
But when it comes to subsurface scattering there's a lot of options.
So the first option at the top is the fall off.
Now this is how quickly the light falls off as it goes through.
And these are just different distributions cubic I believe falls off quick of an Gaussian and I would
have to look up that one on Wikipedia but approximate as we can see here it's an approximation to physically
based volumes scattering which is why it's the default setting the colour.
Well that's like you base colour.
And that you can get a texture being plugged into here as well if you want to.
So we say that to whatever colour that is like your base colour for the model itself.
So if I go ahead and make that slightly peachy we can see that colour of we go make vasseur a deeper
read it.
Well it turns red the scale we're going to come back to the scale.
It's basically a multiplier for these next three options under radius if we cast our eyes over certain
material properties you'll see it's not collapsed here at all.
It's literally just three options that you can get to.
So the radius will come back to in a few moments because the texture blur would only change things if
you've got a texture plugged in here.
And normal is for normal maps coming in as well.
The reason why this has a purple set there's because it has the three values here.
Now with a radius you'd usually think it was like X Y and Z.
In this case it isn't.
These are r.g. devalues something to set the colour back to white for the moment.
So you get a good representation going to make it pure white so value of one throughout.
So what we should find here is and I'm going adjust them over here so I don't have to keep having that
dropped down if I turn the blue channel and the green channel down to zero we should see that it only
scatters red only red light actually exits.
The model itself even though the light coming in is white.
And again if we go ahead make that zero the nothink will come through before we go in at this one because
it's R G B.
This should have green light coming through.
Now we can take a while to actually set these up.
And truth be told you're not just going to be using one node in order to get a realistic material.
Those balls we saw earlier were just a one node but our skin is more complex than just one node can
do.
Now you can certainly make this into a group and perhaps use it again and again if you wanted to.
But in general you've got to think of your skin as a series of layers.
Now with this subsurface scattering the way that I would tend to set this up and it varies from project
to project would be to duplicate the subsurface scattering.
Twice.
So then we've got three layers.
So I'm going to call this light deep.
This horn sort of medium and this one's near the surface.
Now with all shade as we're going to have the user mix shader to put them all together.
And if you think about the this it's the deepest will be dark ready colour whether the blood is there.
We've got so like the fatty layer so we'll make that slightly lighter.
And then we've got the surface of the skin and it well it will depend on the ethnicity of the character
you're doing but in this case I'm going to stick with myself so I'm going to make that quite light because
the surfaces of the skin in places can actually be quite light.
I need to build these up now using some Mc shaders and we also want to add in a diffuse shader along
with this being mixed and a gloss shade because the surface of the skin does have a bit of spec clarity
to it.
And of course that means it's time for a challenge.
Okay.
I'd like you to create your nodes set up so you're going to be linking three subsurface shaders representing
three layers beneath the skin.
Then link the final two surface layers a diffuse angle of shader.
So there we've got our indirect and direct scattering use the sand for practice or your own head.
It doesn't matter at this stage.
I'm going to be using susanne's if you want to follow along with Suzanne the monkey.
That's absolutely fine.
And play with your settings until you're happy.
Now don't worry about the cloche shader because that might make the model look a bit waxy as if it was
a are made out of a wax essentially.
But we'll be dealing with that shortly in Cape balls video and give that a go.
Okay guys.
Welcome back.
Let's go play with these notes.
Over in blender.
Okay so just before we start this I know that if we hop into rended mode we've only got one light from
the back and that's not going to be good to work out whether he's got the colour right.
So I am going to make this window a wee bit bigger for a moment and let's grab a top view and set some
duplicate lights just around here.
I'm not going to worry about setting them up any further than that just to create a a three point lighting
that's go so they can review and move that round render it out at the end to see what it looks like.
Kate almost there.
He fills the frame.
Oh that's cold back ever so slightly there we go.
Definitely fills the frame now.
Let's hop into rended mode and see what it looks like.
Okay there's much more light in there now.
I'm happy with that.
So let's go ahead and start playing with the notes sarve selected the monkey's head again because I
was still on a lamp.
So so currently we've only got this subsurface scattering no plug in.
So let's go ahead and add in a mix shade up pop that's in place there.
And I'm going to join it here.
So then we've got these two shaders next to one another.
Now what we have got here if I look at the radius is it's still a bit funny here.
And what you'll find is you'll end up with a very very noisy image with subsurface scattering.
If your settings here in the radius.
How far light is being scattered is completely different to what happens with the actual base colour.
So you got a base colour of near enough red here almost pure red looking at it's not quite.
But it's almost pure red.
Now we're only scattering.
Red.
Green.
Green light.
So that's not going to work very well.
It's going to end up very noisy.
You're basically confusing the system at that point.
So if we start scattering some more red and less green because there's no green to scatter.
We end up with a clean image and the same will have to be applied down here so the radius here are going
to lower these as we go.
This go for points to point to.
I think the other warms a little bit on the high side actually or lower side of number four point three
here.
Again these are all things that we can tweak over and over and over again.
We're going to need another mic shade.
I'm just going to simply duplicate it and plug in this.
Now this is going to be the top most layer.
And we don't want it scattering that much at all.
So I'm go on the very top but there one just spinning if I'm going to make these values very low so
still scattering but not very much because that's that represents the layer just under the skin.
Look at that that's coming together now really well and then zoom in on the head area specially those
is because they're the thinnest part on this particular model.
So we can see that coming through.
Now what you're not really getting at the moment.
It's it's there but not fully is the detail itself.
In fact the detail is mainly being shown up because of the three point lighting system rather than anything
else.
However we can help that by adding the first surface layer.
So it's go ahead and hand in a diffuse.
And we're going to need another MC shader and we'll worry about other things like the values of all
of this and we've got a colour white here that's going to be too bright.
I'm going to actually lower it down to roughly what I have on for my skin that's just a rough guess
there.
Of course depending on the air from this sea of whatever you're making you can pick any colour you want.
Hey you can have an alien one if you wanted and colour Him mean green.
Okay so I'm going to go back to that rough colour I've got here.
So now we start to see some more detail.
I whacked this all the way up here.
Then we've got off the full diffuse few shader and we can lower that back down and just have just the
sub scattering.
Of course we want a mix of everything as we go through this first layer here.
We definitely want more of the base layer coming through.
I think we do I'm going to play with it a bit.
There we go.
He is have gone just that little bit red up there.
The thinnest part not so much of this coming through.
We do want some of the diffuse and then take that to maybe around 40 percent or so and then we need
the final layer so we can then need yet another mix shader So I'm going to duplicate that and add in
a gloss.
Shake it up.
Now this will obviously add highlights to our model.
And if we go all the way we end up with a very shiny surface and we go all the way back.
It ends up fully well fully whatever this area is here.
So it's a mixture of the diffuse and the subsurface scattering notes.
So I'm going to bring that up to around 15 to 20 percent just so we start getting highlights.
Now this is what I mean by it starts to look a bit plasticky or a bit waxy.
We can certainly increase the roughness if the roughness is too low it's just going to look well very
very shiny if it's too high.
We're going to lose some of that detail in the highlights some more said it's about point three.
So we've got some subtle highlights there but we're going to deal with the positioning of those highlights
as there's plenty of ways of doing it but not in this particular setup.
So let's just hit the render key and see what this looks like when it's rendered out.
I've not got a set particularly high on samples.
I don't know what I've got it set to is set to 50 samples at the moment.
I'm quite happy with that.
It's a bit pink so I could go back or not here.
I want to get back to the node.
Ed it's probably this diffused colour here that's bringing that out so if I make that a bit lighter
and of course I'm going to really ramp the samples up now 300 too high.
That's just silly at this stage.
When I go to 200 just to get a temporary feel of how this is looking I wouldn't ever recommend rendering
it high samples just for a test renders I mean 200 is not particularly high but it's not low either.
You can see this as well.
It was at 50 it's now 200 it's going to take four times longer than it did before and we can check that
because our last render was just over eight seconds so I reckon this was going to be around 35 40 around
there anyway.
So it's just finishing off here.
There you go 30 52 Not bad.
We're eight times four is 32.
So there we go.
So that is looking pretty good.
I'm impressed with that.
How are you guys getting on did you do this with Suzanne or did you decide to make it start going on
straightaway with your head that you've been working on.
A suggestive you haven't done that.
You go and apply the knowledge you've just learned immediately by applying this sort of set up and play
with it to your particular head model that you're working on as a way share in the discussions.
And I will see you in the next lecture.