Welcome to baking a normal map in blender.
In this video you will create a normal map you'll understand when to create a normal map we'll be using
a process called baking and see that baking is the fundamental process for creating other map types.
In blender I will understand about cages and why they are used mapping textures to a model Well when
ever they are being used.
It is a form of optimization So you still always be asking yourself does this need optimizing.
If you already have a low polygon model and it suffices then you dont need to do any more.
However if you want to keep it a low polygon model but you want to have the illusion of a lot of surface
detail whether that be a bit of clothing with the weaving in and out or whether it be a wooden box with
the slats and the gaps in between the slats.
Then we can start optimizing and not having to use geometry to create that.
It allows high detail to be baked onto a lower polygon model and have almost the same appearance.
In some cases you can't tell the difference decreases render times especially if exporting to a game
engine.
Now one of the things you've got to consider if you're making assets for a game engine is that the people
demand 60 frames per second or something along those lines.
And we want to make sure that they get that and by using normal maps and other type of mapping techniques
we can increase render speed when it comes to blender itself of course a render of one scene may take
5 10 15 minutes.
Who knows.
By using normal maps we might be able to cut that down by 10 20 30 percent in time.
In terms of its rendering time now for the one off scene that probably doesn't matter so much.
But if you're doing an animation.
This is where suddenly that saving really starts to compound and saves you a a shed load of time when
it comes to sitting there and waiting of course when you're rendering your computer is going full tilt
so it's also a mess save on your electricity bill and wear and tear on your computer.
Poor thing we do pull it through lots with Blender So let's go ahead and create a little shopping list
of what we going to need.
We're going to need a Harley poly gone source model in order to get the detail.
We're going to need a low polygon model same model of course just a lower polygon version in order to
put that detail on.
If we're just going to stick with a high polygon model then a normal map once again won't be necessary.
Possibly a cage.
Now that would depend on the model that you're doing and I'll give you a demonstration of when you will
need a cage.
We're going to need a yuva unwrap of the low polygon model so that we can have an image ready to receive
than normal data.
So now that we've got a shopping list ready Let's hop on over in a blender.
Okay so we're over on our default scene here and we need a high polygon source and of course a cube
isn't particularly high polygon So I'm going to make this really quick and I'm going to use a subsurface
division modifier and crank that up all the way to six and apply it.
And that's going to give us lots and lots of geometry.
While still in object mode I'm going to create a nother cube and I'm going to apply another subsurface
division and well let's go to sarees subdivisions and apply that.
So now if we check how many triangles we got 768 on the low poly and the high poly has 50000 Okay that's
a great extreme example between the two.
Now I'm going to want my Both mine to be smooth shadings There we go let's smooth shade and we can see
a bit of occlusion it's a little bit jacquette around the edge.
I think that is okay for the purposes that we're doing.
Of course we need to name these so let's go ahead and name this high poly ball and low poly ball.
Otherwise I won't know which ones which one I'm looking at the outline.
In fact I'm going to use the outliner in order to do this particular work with selecting because these
two need to be on top of one another Cause we are going to be projecting from one on to another we're
going to be projecting from the high poly on to the low poly so in order to do this we're also going
to have to unwrap the low poly bowls.
I'm going to hop into edit mode and unwrap.
I'm just going to use smart unique projects because during this demonstration I don't really mind how
it actually unwraps it in fact it may even highlight some problems.
If we don't take control over that unwrap.
So now I have done that I just need to make sure that that has worked and I'm going to open up a UV
image editor and quickly check it.
Okay so you've got a you've Emap there but we don't.
That's going to control the mapping of the normal map that we're about to create so it's telling lend
out where to place the information.
But there's nothing to place it to.
So we're just going to have to create a new texture and I'm going to call it normal map because that
is what it's going to be.
I'm not going to click okay now before we do anything else here.
There may be the occasion where perhaps you've used one you've mapped a certain scale on a diffuse texture
and that's worked wonderfully.
But now you want to use a different nuveen map with a different scale because we're projecting all of
the U.S. map has to be with in that one image.
Otherwise it will tile and look horrible.
So if we do want to create an extra you v map or more than one we can go to the data properties of the
low poly ball.
Scroll down and we can see we've done virtex groups before.
Below that we've got shape keys and below that we have you v maps so we can create a new UV map and
call it normal map or whatever you want to call it.
It's a different type of map.
So now we've done that.
We can go ahead and then click the little camera there so that's the one that we as active for rendering
that's the one we want because baking is a form of rendering.
So now we have that we can see that we're looking at the normal map as well because the U.S. image editor
has changed the active U.S. map is the normal map.
So let's go ahead now and go to the render tab and have a look at our baking option so I'm going to
have to scroll them all the way down to the bottom and I'm going to open up.
OK.
Now what I'm going to do here in case I need to flick backwards and forwards between other settings.
I'm just going to split this window here so I can see take all the time so it's not disappearing.
Hopefully I won't need to dash about left right and centre but that if I do I can get back to bake really
quickly.
Now we've got a bake button and if we click that is not going to do anything because we've not really
told it what we want to do.
Now here we go no active image found at a material or bake to an external file.
So in this case has our low poly ball got a material.
No.
So let's go assign material to it and I'm going to call this normal map just so I don't get confused
with any type of other type of material that we set up.
And I'm also going to scroll down here and set the surface colour to an image texture and I'm going
to change it to a normal map.
Now this isn't how you apply a normal map we'll go to that in a moment.
This is just so I can see real time on the model.
What is going on.
I was going to hop out of edit mode there into object mode and change it to material.
So there we go we can see both are black.
So what we need to do is take from selected to active.
So from Behi poly to the low poly.
So let's go ahead and click on high poly hold down Shift and click on blow polin you can see why I'm
using the outline it's a Select rather than the meshes that are on top of one another.
I'm going to change my bake type here to normal.
There it is and make sure selected to active is ticked.
Now I'm going to hit the back button and let's see what happens.
Okay.
So that's not surprising.
And that is exactly what I was expecting to get because both of them are pretty smooth.
So let's go ahead and add some detail to the high poly ball and I'll use the sculpting tool to do that
just so we can see what's going on and I'll create some highs and some lows.
I'm going to use add and subtract.
When it comes to that somebody is going to hide are low poly ball.
I'm going to going to sculpt mode.
That's good.
That's a solid.
I've obviously not could it's selected.
There we go sculped mode and I can't see much of what's going on so let me rearrange my screen really
quickly and I'm going to draw a smiley face.
Who wouldn't draw a smiley face.
There we go.
So we've got ourselves some oh oh I've got symmetry turned on.
Oh it's two smiley faces.
Excellent.
Now let's do a subtract as well.
And let's say there we want to is.
And there we go.
It looks more like a love heart there but never mind Kate So we've got some detail now on the surface
of our model.
Let's see what happens if we go and bake that.
So selected.
Hi Polly shiff low poly too active.
And I'm going to click Oh cant see it.
So that's enable it and then bake if it's not there we can't bake it.
Okay so we can see that the indents that we've made are appearing on the normal map.
But these raised areas seem to be cut outs.
In fact if we changed to material we can see the normal map actually being applied to our model as as
a diffuse texture in this case and we can see that the raised areas are just ignored all together and
that is no good.
We want to include them.
Now there are two ways of including them.
Number three actually three ways of including them we can make the low poly ball bigger so we can go
in here scale the low poly ball up so let's go to object mode select the low poly ball.
Scale it up.
Okay.
Now go to a high poly low poly and make.
And there we go.
So that's one way of doing it.
But now we have a problem.
Essentially the the low or poly models are bigger and we don't really want to do that so let's undo
that step.
But that is one way you could go about it the other way you can go about it is to add a cage.
Now a cage has to match the low poly model in terms of its triangle count so if we duplicated that and
then made it match as close as possible to have a high poly ball that would enable us to use a cage
to make that.
Now the race distance is kind of similar to scaling up the model.
And if we go and scale this up well that's not really scaling but it kind of gives the impression it
moves the projection a bit further away from the surface.
If we now try and do that let's see what results we get.
So at Point two we seem to get a relatively good result.
Now bearing in mind this can cause distortion on more complicated shapes you have to use that with caution
and if you've got something that's massively different that juts out from the surface.
These are not really that exaggerated they're not that extreme in terms of how far they stretch away
but if they were to do that you may want to use a cage rather than just adjusting the race distance
but it seems that point to in this case results in a relatively good normal map.
That looks pretty impressive.
So now that we've got a normal map made what we need to do is apply it.
So in order to do that we're going to need to go over to our node editor.
And this is the material that's currently set up and this is another great thing about applying it to
the diffuse texture straightaway because the image text is already loaded and ready for us to use.
So once again I'm going to hide the low are of high poly ball from our scene all together and I'm going
to make sure the low poly ball has it's applied.
So let's go ahead and let's go down here.
Yes it's got the.
It's got the normal map apply to it.
That's absolutely fine.
Now it may be tempting a course to Let's unplug that so we can see what's going on.
It may be tempting to plug the colour straight into normal.
Well that didn't work and there's no surprise in that that hasn't worked.
We haven't told it anything at the moment so let's be explicit let's tell blender that the input the
textured coordinates i.e. you v based.
So let's join in to there.
Now we don't want the colour be mapped to the normal we need it to go through some sort of filter.
Now we could plug it into the bump mapping that we used earlier.
We can also put it into a normal mapping So if we go ahead and add a vector normal map and pop it in
between those two areas there we see that the colour is controlling the colour.
We have not selected a u v map here but we can select normal map in this case and looking down here
we should now see that this is starting to change.
Our model Lets go into rended mode and have a look.
There we go.
That is looking pretty good but it does have some problems we can see its jerking around these edges
and this is one of the art effects that can happen if you dont take control of your seams.
Let's make the light a bit more exaggerated.
I'm going to go for a sunlamp and what we should be able to see here is if I just line this up when
we go ahead and move the sun lamps I'm just going to rotate that sunlamp or on the y axis or something
along those lines.
What we should find is that the shadows change is as if there is real geometry there and that's the
whole point of using these normal maps.
That looks pretty.
That's a good example there.
You can see that it's light on one side.
And if we rotate it all the way round it'll become light on the other and then dark.
Now you can see here some artefacts that are being caused by having such a low poly model here.
Let's just check that we do have smooth shading turned on.
Yes we do.
It's just unable to interpret the model.
And of course the normal map has been is causing this horrible jaggedness.
Oh no no wait I see what is going on here and I have forgotten to actually change the type of image
that this thing is.
Let's change the image texture itself.
We haven't said this is non colour data.
So it's interpreting the rgv values as colour.
When we don't we want the r.g. values to be treated as individual values.
There are three channels there from a value of zero to 100 percent and each one of those we need it
to be interpreted completely individually in a blend between the two.
So we can do that by changing it's a non colour data.
There we go.
That is the look we're looking for.
And now if we go ahead and grab the lamp rotate it around and access and we can see here that it changes
is as if the geometry were real.
Now the question is of course if I have that there and I put the other one there go have Turn the lamp
off instead.
Can you tell the difference between the two.
I'm going to render these out now side by side and I'll show you how great this is WOWO case are blown
up to full screen and tried to fit them on as best I can.
And I want you guys to guess which ones which.
Okay.
I'll give you a clue here.
We look for reclusion.
So even though the outside is relatively smooth we can see the eyeball on the other side on the right
hand side in the shadowed area at the top left.
We can see a bump of the eye.
Let's head round the back of this particular smiley face.
Now the great thing about this is the one on the left is less than 1000 polygons I think it's something
like seven.
The one on the right is nearly 49000 polygons.
There's a huge difference in him there.
But there's very little image quality difference at this point.
So you can see how a normal map can really help you out.
And of course if we combine that with the displacement map as well we can get some really impressive
results.
So bearing that in mind it's time for a challenge.
I would like you guys to create a normal map similar to how we've just done.
So take one of your models up to at least an L O D C or D level of detail.
So we going to take a duplicate of the elodie B or A that you've currently worked on and really add
some detail to that model then go ahead and create a normal map based upon that and apply it to a lower
polygon model so apply it back to the level of detail.
A or B.
And finally of course share it in the discussions.
The two side by side and see if people can guess which is which.
If you do it really well it would be very very difficult to tell.
I'm going to not pause a video at this point because we've almost run out of time for this particular
lecture and we'll go through the solution in the next lecture.
See you soon.