Welcome to the geometry node in this video.
We're going to use this note.
Take control of an object's Normal's you'll see that the vector coordinates or the direction the normals
are facing in we will observe are represented as a world space normals.
So before we've been dealing with tangential or even objects space these are going to be represented
in world space although looks similar but slightly different to what we've seen in the past.
And we shall use this node to control the amount of four.
Now based upon the amount of roughness that surface has.
So before we go and hop on over into blender let's just go through a quick reminder of normals I'm sure
you've all got this by now.
Here we have a very simple ice sphere with the face Normal's projected out.
And let's just see what we're aiming to do with the node itself.
And I'm gonna to grab a pen and digital bits of paper to show you what's going to go on.
Okay so we're going to have the camera in the scene itself.
That's in here and here we have a circle for instance with its Normal's coming out and a money going
to draw a few of them.
Obviously there's a lot of Normal's when it comes out of the circle.
And this is a true representation of course.
We're going to really deal with a sphere now these normals here are not going to be seen by the camera
itself.
So we can ignore those completely in this example.
But what we can do with the geometry node is tell blender instead of the normal going out in its normal
direction.
Every single normal faces the camera obviously they're going to look odd but we can use that to our
advantage when using it to control other nodes.
And we'll do that now as we hop on over into a blender.
So let's go play about with our node now and or our with our nodes and see what we can come up with.
And again I'm going to construct a simple scene or in this case I'm actually going to go to my scene
at the very back and we use control to turn everything on.
And I'm going to once again use a simple sphere to work with some and I open up my scene here and turn
everything off apart from fireball.
Parve fireballs he turns everything else off.
They're there and they're okay.
So we've got a very interesting shade a setup here a bit bely before we've got a bump node and the other
bits running around it with the wave texture.
Our believe I've applied the part of this to an admission shader So actually glows and lights up his
surroundings as well.
Hence its name fireball.
Anyway enough of this particular texture or this particular material wasn't going to do is actually
apply a PBR plastic to it.
So we can work with simple material.
Okay so what we need to do is first of all Add in a geometry node so we can work with that and then
go through and see how that actually affects the rest of our model.
So let's go into the node set up here and just have a look.
Okay so we need to add a geometry.
So go ahead and find that it's under input geometry and it gives us a series of options are run through
them really quickly but not in great detail.
The position is it's position in the world.
So if I literally move that about's you can see it changes colour depending on it's X Y Z location okay
are not moving up and down.
It's just easier not to do that's normal.
Well unsurprisingly that is the world Normal's and that is the standard normal coming off of this particular
object.
This sphere itself has hundreds of normal spread out across its surface in the direction or the vector
coordinates of those normals relate directly to the colour mix in between all the shades.
Tangent is it's tangential coordinates based upon the real world True normal.
Now we're going to have a little bit of a hard time seeing this on this particular object.
Yeah.
There we go.
This is how it looks without the smoothing applied.
So even if your model is smooth you can use the true Normal's rather than the interpolated ones between
when you've got smooth shading turned on incoming.
Now that has made all.
Obviously if we zoom in really closely on that submit this bigger it will change the normal slightly
depending on the angle to the camera.
But as we zoom out we end up with all the normals pretty much facing the same direction towards the
camera or in this case the viewport parametric is interesting.
It's generally used to make lattices or grids if you want to go round that way back facing.
Now this is one that you can use to your advantage if you want one material on one side and one material
on another.
Because if the normals are facing outwards is coloured black and if they're facing inwards it's coloured
white.
The only way of doing that is to go inside and there we go.
That's the inside of our sphere going white pointy ness is something that's hard to show on this particular
model but it basically goes from black to white depending on convex or conté or how concave something
is.
Now the surface of this sphere is continuously convex as it's uniform convexity.
I don't know if that's a word but it's great.
Unger's Stick with it it's uniform convect So is all one colour as it goes round.
Now if we were to make it a dimple or have a sharp ridge you could then see the effect.
So if it's incredibly sharp coming out.
Out of your model being concave.
It will be almost white and if it's going into your model and is equally as sharp had deep groove that
will be coloured close to black and you can use a figure like a colour ramp or a brightness and contrast
node in order to exaggerate that.
And then perhaps set up a mic shader with two different outputs and depending on those outputs you can
use the pointedness to basically colour anything that has a sharp output or perhaps a rust material
or a more worn material.
You often find that painted surfaces that have sharp edges.
The paint wears off of the sharp edges rather than the flat face.
So you can use that type of control.
Now we need to basically see what's the effect of this on our friend nele node.
Now the issue with having a node group like this is I can't just see what the French l.a. looks like.
I can't pull it like I can normally.
So in this particular case there's a couple of options we could rearrange the group in order to work
out what's going on a move the fanelle outside and that's a bit a faff.
So in this particular case I'm going to tab out and I'm going to go to the node menu and ungroup or
Altern G and then I'll just break everything out of that group again.
Okay so let's now have a look at what's going on and leave enough space here and zoom in.
So we've got our standard set up that we've played with plenty of times.
Okay I'm happy with everything here.
So what we want here are we don't have a value node coming in here to control it so let's add a value
node.
So here we go.
Value node then we can control this top value by the power of 2.5.
And that's going to control our roughness.
Let's just make sure everything's working.
So obviously a value of one is going to be totally rough.
Valid point five is going to be slightly shiny.
And point one has some gloss.
We can see the area around it.
Now I'm going to colour in the surface a darker colour just so we can see the reflections a little more
clearly.
There we go.
Perfect.
I can actually see the reflections really well.
So let's have a look at the final l.a. and see what's going on here.
The case of this is the fanelle fall off as standard now as standard.
Is this normal here.
So let's go ahead and plug that in and make sure it's still working.
Excellent.
Now what happens if we try some of these off of once.
That's not giving us the desired results.
That's not given a desired result true normal.
Well that's going to be the same as normal just a bit more faceted incoming.
Ah okay.
That's just unplug that.
If we look at the very centre of this particular for a nail.
If we plug in incoming The normals are all facing us.
So there's no more for an l effect.
So if we were to mix between these two we should be able to control the an l.a. Based upon this value
down here.
So this is one of the ways we can actually change this for an L around.
And that leads me onto a challenge.
Okay I'd like to go ahead and set up your notes.
So finish off the set up of our own notes so that as the roughness increases you'll want the friend
nail effect to decrease.
Give it some thought.
Pause the video now and give that a go.
Okay guys welcome back.
Let's go finish off the set up of our notes and control the roughness.
And for now with only one slider.
Okay so we are almost here at the moment.
Now we've got a geometry node here and we need to blend between.
I think we need to blend between normal and incoming.
Now there are a couple of ways of blending but because these values here are vector values we can actually
use the karbalaa mix.
RG B node we were using in the last section.
So let's just add these two together.
Incoming on the bottom and normal on the top of a pole the output here see what happens as we go from
one at the other.
Okay.
Let's plug the colour output here into the normal input here.
Now hopefully that won't need any anything else doing to it because obviously where we've got normal
values coming in and normal values coming out now obviously we can change the ratio of mixes through
here because the mix node here will be assuming is a colour going through.
So it may actually change the well colour correct it basically.
So if you have to be a little bit careful when we use the r.g. node like this but let's let's move this
down and hopefully we see the fanelle effect come back into full effect.
Perfect.
So now let's just make sure we've got vs the right way around.
I think we have the best thing to do is plug this in.
So when it's glossy or a value of zero here we want it to be fully normal so the top one.
Excellent.
And as we move across as we increase the roughness we want the frontal effect to go down.
Now it's only ever going to go up to one.
So one should be completely uniformly not black but it's going to be about 20 percent grey or something
on those lines.
Okay that looks like it's working really well.
So let's go out and poll the mix shader And let's see what happens so I'm going to hold down Shift so
I can wear my scanner click this and go between them.
Okay so this is almost 100 percent reflective in this case and we've got a nice reflection going around
our model and let's make it slightly rougher.
And as it's getting rougher the frontal effects should start falling off.
And of course we can add other things in here to change the fall off rate.
Perfect.
So this is getting quite rough now and there's still a little bit of reflection is not very clear anymore
but it's starting to work really really well.
This is very close to how the real world works.
So we've got a value node here that's controlling all of this.
Now what we can do is pop this all back in.
To our mix or sorry into our group says Go ahead here and you'd make a group.
Okay so we've got a group impot What do we want to control.
Well we want to control the this value here now.
There's no input to this value.
So what we can do here is literally drag a value across to the input here and then link it up.
Individually there we get through it it's called value here that a value is no good it doesn't explain
what is going to be roughness.
Okay perfect.
What else do we need to make sure we've got on this input so we can control it well if it's got texture
we're going to want to control the Normal's of everything here.
So let's go ahead and do that now.
So I'm just literally going to link them one by one in here.
So normal.
I just pulled that out saw some wound going to have to plug it back in a moment.
So what makes the colour coming out of here.
This was the rough nurse.
The facts of the colour comes out into that normal sense that normal there needs to be controlled by
here.
So here we've got an issue where if we want the normal to affect the free now we can't have it coming
in so we'll have to mix those or even add them together if we want to control the for now with a normal
map as well.
I don't think that's necessary in this particular case.
I'm going to leave it out.
Now I do want the base colour coming out so I'm going to plug this in and I'm not leave as colour.
I'm going to call it diffuse or bass or whatever you're working with.
How bideau Map is another name it's used to diffuse colour.
Of course that could be a texture.
There could be no end of things.
Is anything else that I want to expose to the outside of this node.
I don't think there is colour.
No the colour of the reflections.
I'm going to leave as they are.
The power.
Do I want to be able to control that rate.
No that's fine.
So I got this loose end entity here I'm going to get rid of that.
Okay.
And Tab outside I've now got this noad group that has a roughness slider that I can control.
Obviously it only controls it between 0 and 1 anything greater than that is just a 100 percent smoother
100 percent rough.
Now most things in the real world are not rough.
Of course it can go up.
Sorry not the entirely rough or entirely smooth slightly polished in certain places.
So again going back to using textures to control things I could put in a wave texture here and plug
it into roughness and you can see here.
Well it almost has a ripple effect in this case.
But if I scale that down just a little perhaps to 1 so we have got so much we can see as glossy and
places and matine Others as if it's been slightly polished somewhere and not in other places.
And again when we link this together we can see that the black band itself as to go back to our node
group black band is indicating where it's going to be most glossy and the white band is where it's going
to be most Matt and we can use that to our advantage obviously wheezing a texture here so it's not going
to have quite the effect that I'd like to demonstrate.
But if you had if you had mapped your particular sphere here that we were working on.
There was a particular area of it that was handled often so hed naturally polished.
Again that can help with the realism of your models were some bits are going to be naturally more polished
or glossy than others so I'm just going to clear that out there.
The final thing that I haven't done here I am going to change that back to a red because I do like that
read and I'm going to make it a little bit lighter again is actually save this particular material.
Otherwise it's going to get lost so I've only played with my default settings here so all I need to
do is literally save the start-up file but before I do that I do want to make sure I'm back in a kind
of a default position so I usually look from this angle.
It doesn't matter whether you are in rendered mode or not automatically will open like this.
So you got a stage there and a good flip back round to lael one about open this back up again so that's
how I want it.
Next time I start.
And of course you can adjust yours to how ever you like.
I'm going to hide the rest of my examples.
Close down the hierarchy here.
I like that that all looks good.
So I'm going to save my start-up file and that's now save that new PBR plastic material we've improved
upon it because now we're able to change the roughness and the final effect on the same time.
How did you guys get on.
Are you starting to get the hang of modifying your original blend files every time you open it up.
You're not having to start afresh anymore.
It's incredibly useful being able to do that.
As always make sure you show your work in the discussions and I will see you guys in the next lecture.