WEBVTT

00:00.270 --> 00:03.400
Welcome to baking a normal map in blender.

00:03.510 --> 00:10.260
In this video you will create a normal map you'll understand when to create a normal map we'll be using

00:10.260 --> 00:17.070
a process called baking and see that baking is the fundamental process for creating other map types.

00:17.570 --> 00:25.420
In blender I will understand about cages and why they are used mapping textures to a model Well when

00:25.440 --> 00:27.290
ever they are being used.

00:27.360 --> 00:32.910
It is a form of optimization So you still always be asking yourself does this need optimizing.

00:33.000 --> 00:39.270
If you already have a low polygon model and it suffices then you dont need to do any more.

00:39.390 --> 00:45.030
However if you want to keep it a low polygon model but you want to have the illusion of a lot of surface

00:45.030 --> 00:51.780
detail whether that be a bit of clothing with the weaving in and out or whether it be a wooden box with

00:51.780 --> 00:54.350
the slats and the gaps in between the slats.

00:54.420 --> 00:59.720
Then we can start optimizing and not having to use geometry to create that.

00:59.800 --> 01:05.990
It allows high detail to be baked onto a lower polygon model and have almost the same appearance.

01:06.000 --> 01:12.060
In some cases you can't tell the difference decreases render times especially if exporting to a game

01:12.060 --> 01:12.620
engine.

01:12.630 --> 01:18.060
Now one of the things you've got to consider if you're making assets for a game engine is that the people

01:18.060 --> 01:21.520
demand 60 frames per second or something along those lines.

01:21.630 --> 01:27.780
And we want to make sure that they get that and by using normal maps and other type of mapping techniques

01:27.780 --> 01:35.310
we can increase render speed when it comes to blender itself of course a render of one scene may take

01:35.430 --> 01:37.350
5 10 15 minutes.

01:37.350 --> 01:38.280
Who knows.

01:38.280 --> 01:44.160
By using normal maps we might be able to cut that down by 10 20 30 percent in time.

01:44.160 --> 01:50.660
In terms of its rendering time now for the one off scene that probably doesn't matter so much.

01:50.660 --> 01:52.980
But if you're doing an animation.

01:53.100 --> 02:00.540
This is where suddenly that saving really starts to compound and saves you a a shed load of time when

02:00.540 --> 02:06.510
it comes to sitting there and waiting of course when you're rendering your computer is going full tilt

02:06.510 --> 02:11.970
so it's also a mess save on your electricity bill and wear and tear on your computer.

02:11.970 --> 02:17.850
Poor thing we do pull it through lots with Blender So let's go ahead and create a little shopping list

02:17.850 --> 02:20.000
of what we going to need.

02:20.070 --> 02:25.400
We're going to need a Harley poly gone source model in order to get the detail.

02:25.740 --> 02:32.190
We're going to need a low polygon model same model of course just a lower polygon version in order to

02:32.190 --> 02:33.770
put that detail on.

02:33.760 --> 02:39.380
If we're just going to stick with a high polygon model then a normal map once again won't be necessary.

02:39.540 --> 02:40.670
Possibly a cage.

02:40.680 --> 02:45.240
Now that would depend on the model that you're doing and I'll give you a demonstration of when you will

02:45.240 --> 02:46.320
need a cage.

02:46.560 --> 02:53.850
We're going to need a yuva unwrap of the low polygon model so that we can have an image ready to receive

02:53.850 --> 02:55.240
than normal data.

02:56.100 --> 03:00.190
So now that we've got a shopping list ready Let's hop on over in a blender.

03:03.400 --> 03:10.350
Okay so we're over on our default scene here and we need a high polygon source and of course a cube

03:10.360 --> 03:15.700
isn't particularly high polygon So I'm going to make this really quick and I'm going to use a subsurface

03:15.700 --> 03:19.720
division modifier and crank that up all the way to six and apply it.

03:19.750 --> 03:22.620
And that's going to give us lots and lots of geometry.

03:22.900 --> 03:30.370
While still in object mode I'm going to create a nother cube and I'm going to apply another subsurface

03:30.370 --> 03:36.200
division and well let's go to sarees subdivisions and apply that.

03:36.490 --> 03:47.830
So now if we check how many triangles we got 768 on the low poly and the high poly has 50000 Okay that's

03:47.830 --> 03:50.550
a great extreme example between the two.

03:50.740 --> 03:57.970
Now I'm going to want my Both mine to be smooth shadings There we go let's smooth shade and we can see

03:57.970 --> 04:00.660
a bit of occlusion it's a little bit jacquette around the edge.

04:00.670 --> 04:03.610
I think that is okay for the purposes that we're doing.

04:03.670 --> 04:10.700
Of course we need to name these so let's go ahead and name this high poly ball and low poly ball.

04:11.230 --> 04:13.750
Otherwise I won't know which ones which one I'm looking at the outline.

04:13.750 --> 04:20.530
In fact I'm going to use the outliner in order to do this particular work with selecting because these

04:20.530 --> 04:26.050
two need to be on top of one another Cause we are going to be projecting from one on to another we're

04:26.050 --> 04:32.320
going to be projecting from the high poly on to the low poly so in order to do this we're also going

04:32.320 --> 04:34.150
to have to unwrap the low poly bowls.

04:34.150 --> 04:36.460
I'm going to hop into edit mode and unwrap.

04:36.580 --> 04:41.980
I'm just going to use smart unique projects because during this demonstration I don't really mind how

04:41.980 --> 04:45.610
it actually unwraps it in fact it may even highlight some problems.

04:45.670 --> 04:48.690
If we don't take control over that unwrap.

04:48.880 --> 04:53.260
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

04:53.350 --> 04:55.650
image editor and quickly check it.

04:56.020 --> 04:58.810
Okay so you've got a you've Emap there but we don't.

04:58.960 --> 05:05.380
That's going to control the mapping of the normal map that we're about to create so it's telling lend

05:05.380 --> 05:07.690
out where to place the information.

05:07.690 --> 05:09.000
But there's nothing to place it to.

05:09.010 --> 05:16.150
So we're just going to have to create a new texture and I'm going to call it normal map because that

05:16.150 --> 05:17.690
is what it's going to be.

05:17.720 --> 05:21.260
I'm not going to click okay now before we do anything else here.

05:21.260 --> 05:27.660
There may be the occasion where perhaps you've used one you've mapped a certain scale on a diffuse texture

05:27.670 --> 05:29.140
and that's worked wonderfully.

05:29.140 --> 05:34.900
But now you want to use a different nuveen map with a different scale because we're projecting all of

05:34.900 --> 05:37.810
the U.S. map has to be with in that one image.

05:37.810 --> 05:40.360
Otherwise it will tile and look horrible.

05:40.570 --> 05:47.440
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

05:47.440 --> 05:48.670
low poly ball.

05:49.030 --> 05:52.690
Scroll down and we can see we've done virtex groups before.

05:52.690 --> 05:58.660
Below that we've got shape keys and below that we have you v maps so we can create a new UV map and

05:58.660 --> 06:02.460
call it normal map or whatever you want to call it.

06:02.500 --> 06:03.760
It's a different type of map.

06:03.790 --> 06:05.010
So now we've done that.

06:05.020 --> 06:10.990
We can go ahead and then click the little camera there so that's the one that we as active for rendering

06:10.990 --> 06:14.690
that's the one we want because baking is a form of rendering.

06:14.770 --> 06:18.790
So now we have that we can see that we're looking at the normal map as well because the U.S. image editor

06:18.790 --> 06:22.550
has changed the active U.S. map is the normal map.

06:22.930 --> 06:28.100
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

06:28.100 --> 06:31.780
have to scroll them all the way down to the bottom and I'm going to open up.

06:31.870 --> 06:32.310
OK.

06:32.380 --> 06:37.620
Now what I'm going to do here in case I need to flick backwards and forwards between other settings.

06:37.690 --> 06:43.970
I'm just going to split this window here so I can see take all the time so it's not disappearing.

06:44.050 --> 06:49.690
Hopefully I won't need to dash about left right and centre but that if I do I can get back to bake really

06:49.690 --> 06:50.850
quickly.

06:50.910 --> 06:55.030
Now we've got a bake button and if we click that is not going to do anything because we've not really

06:55.030 --> 06:56.980
told it what we want to do.

06:57.280 --> 07:02.640
Now here we go no active image found at a material or bake to an external file.

07:02.770 --> 07:06.760
So in this case has our low poly ball got a material.

07:07.060 --> 07:07.450
No.

07:07.510 --> 07:13.750
So let's go assign material to it and I'm going to call this normal map just so I don't get confused

07:13.750 --> 07:16.870
with any type of other type of material that we set up.

07:16.990 --> 07:26.050
And I'm also going to scroll down here and set the surface colour to an image texture and I'm going

07:26.050 --> 07:27.550
to change it to a normal map.

07:27.670 --> 07:31.510
Now this isn't how you apply a normal map we'll go to that in a moment.

07:31.510 --> 07:34.810
This is just so I can see real time on the model.

07:34.810 --> 07:35.800
What is going on.

07:35.810 --> 07:41.070
I was going to hop out of edit mode there into object mode and change it to material.

07:41.230 --> 07:43.950
So there we go we can see both are black.

07:43.990 --> 07:49.260
So what we need to do is take from selected to active.

07:49.270 --> 07:51.980
So from Behi poly to the low poly.

07:52.210 --> 07:58.210
So let's go ahead and click on high poly hold down Shift and click on blow polin you can see why I'm

07:58.210 --> 08:02.640
using the outline it's a Select rather than the meshes that are on top of one another.

08:03.060 --> 08:06.630
I'm going to change my bake type here to normal.

08:06.630 --> 08:10.680
There it is and make sure selected to active is ticked.

08:10.680 --> 08:13.550
Now I'm going to hit the back button and let's see what happens.

08:13.830 --> 08:14.130
Okay.

08:14.130 --> 08:15.470
So that's not surprising.

08:15.600 --> 08:19.890
And that is exactly what I was expecting to get because both of them are pretty smooth.

08:20.040 --> 08:25.590
So let's go ahead and add some detail to the high poly ball and I'll use the sculpting tool to do that

08:26.100 --> 08:29.740
just so we can see what's going on and I'll create some highs and some lows.

08:29.760 --> 08:31.830
I'm going to use add and subtract.

08:31.830 --> 08:35.730
When it comes to that somebody is going to hide are low poly ball.

08:35.910 --> 08:38.050
I'm going to going to sculpt mode.

08:38.110 --> 08:38.490
That's good.

08:38.490 --> 08:39.860
That's a solid.

08:40.530 --> 08:42.060
I've obviously not could it's selected.

08:42.060 --> 08:47.940
There we go sculped mode and I can't see much of what's going on so let me rearrange my screen really

08:47.940 --> 08:50.910
quickly and I'm going to draw a smiley face.

08:50.910 --> 08:52.830
Who wouldn't draw a smiley face.

08:52.830 --> 08:53.840
There we go.

08:54.300 --> 08:57.980
So we've got ourselves some oh oh I've got symmetry turned on.

08:58.020 --> 08:59.420
Oh it's two smiley faces.

08:59.460 --> 09:00.420
Excellent.

09:00.420 --> 09:02.220
Now let's do a subtract as well.

09:02.220 --> 09:06.450
And let's say there we want to is.

09:07.430 --> 09:09.010
And there we go.

09:09.090 --> 09:13.770
It looks more like a love heart there but never mind Kate So we've got some detail now on the surface

09:13.770 --> 09:14.590
of our model.

09:14.610 --> 09:17.550
Let's see what happens if we go and bake that.

09:17.610 --> 09:18.730
So selected.

09:18.750 --> 09:22.090
Hi Polly shiff low poly too active.

09:22.290 --> 09:25.570
And I'm going to click Oh cant see it.

09:25.590 --> 09:29.340
So that's enable it and then bake if it's not there we can't bake it.

09:29.970 --> 09:34.650
Okay so we can see that the indents that we've made are appearing on the normal map.

09:34.770 --> 09:37.700
But these raised areas seem to be cut outs.

09:37.710 --> 09:43.720
In fact if we changed to material we can see the normal map actually being applied to our model as as

09:43.750 --> 09:50.310
a diffuse texture in this case and we can see that the raised areas are just ignored all together and

09:50.310 --> 09:51.090
that is no good.

09:51.090 --> 09:52.710
We want to include them.

09:52.770 --> 09:55.350
Now there are two ways of including them.

09:55.350 --> 10:02.580
Number three actually three ways of including them we can make the low poly ball bigger so we can go

10:02.580 --> 10:08.490
in here scale the low poly ball up so let's go to object mode select the low poly ball.

10:08.490 --> 10:09.940
Scale it up.

10:10.230 --> 10:11.170
Okay.

10:11.430 --> 10:15.120
Now go to a high poly low poly and make.

10:16.660 --> 10:17.350
And there we go.

10:17.350 --> 10:18.660
So that's one way of doing it.

10:18.760 --> 10:21.950
But now we have a problem.

10:21.950 --> 10:27.610
Essentially the the low or poly models are bigger and we don't really want to do that so let's undo

10:27.610 --> 10:28.150
that step.

10:28.210 --> 10:34.680
But that is one way you could go about it the other way you can go about it is to add a cage.

10:34.780 --> 10:43.840
Now a cage has to match the low poly model in terms of its triangle count so if we duplicated that and

10:43.840 --> 10:50.680
then made it match as close as possible to have a high poly ball that would enable us to use a cage

10:50.680 --> 10:51.660
to make that.

10:54.830 --> 10:59.090
Now the race distance is kind of similar to scaling up the model.

10:59.630 --> 11:05.120
And if we go and scale this up well that's not really scaling but it kind of gives the impression it

11:05.120 --> 11:09.410
moves the projection a bit further away from the surface.

11:09.440 --> 11:13.900
If we now try and do that let's see what results we get.

11:13.940 --> 11:17.010
So at Point two we seem to get a relatively good result.

11:17.090 --> 11:23.870
Now bearing in mind this can cause distortion on more complicated shapes you have to use that with caution

11:24.050 --> 11:28.490
and if you've got something that's massively different that juts out from the surface.

11:28.610 --> 11:34.790
These are not really that exaggerated they're not that extreme in terms of how far they stretch away

11:35.000 --> 11:40.820
but if they were to do that you may want to use a cage rather than just adjusting the race distance

11:41.170 --> 11:45.530
but it seems that point to in this case results in a relatively good normal map.

11:45.880 --> 11:47.360
That looks pretty impressive.

11:47.510 --> 11:52.740
So now that we've got a normal map made what we need to do is apply it.

11:52.790 --> 11:58.540
So in order to do that we're going to need to go over to our node editor.

11:59.210 --> 12:04.280
And this is the material that's currently set up and this is another great thing about applying it to

12:04.310 --> 12:09.950
the diffuse texture straightaway because the image text is already loaded and ready for us to use.

12:09.950 --> 12:17.210
So once again I'm going to hide the low are of high poly ball from our scene all together and I'm going

12:17.210 --> 12:21.400
to make sure the low poly ball has it's applied.

12:21.530 --> 12:25.250
So let's go ahead and let's go down here.

12:25.250 --> 12:26.840
Yes it's got the.

12:28.900 --> 12:30.790
It's got the normal map apply to it.

12:30.790 --> 12:32.170
That's absolutely fine.

12:32.170 --> 12:37.270
Now it may be tempting a course to Let's unplug that so we can see what's going on.

12:37.330 --> 12:41.340
It may be tempting to plug the colour straight into normal.

12:42.740 --> 12:46.060
Well that didn't work and there's no surprise in that that hasn't worked.

12:46.070 --> 12:53.630
We haven't told it anything at the moment so let's be explicit let's tell blender that the input the

12:53.630 --> 12:56.060
textured coordinates i.e. you v based.

12:56.240 --> 12:58.580
So let's join in to there.

12:58.610 --> 13:04.420
Now we don't want the colour be mapped to the normal we need it to go through some sort of filter.

13:04.430 --> 13:08.010
Now we could plug it into the bump mapping that we used earlier.

13:08.030 --> 13:17.360
We can also put it into a normal mapping So if we go ahead and add a vector normal map and pop it in

13:17.360 --> 13:22.500
between those two areas there we see that the colour is controlling the colour.

13:22.580 --> 13:28.430
We have not selected a u v map here but we can select normal map in this case and looking down here

13:28.490 --> 13:31.320
we should now see that this is starting to change.

13:31.340 --> 13:34.950
Our model Lets go into rended mode and have a look.

13:35.150 --> 13:35.920
There we go.

13:35.960 --> 13:41.770
That is looking pretty good but it does have some problems we can see its jerking around these edges

13:41.780 --> 13:47.460
and this is one of the art effects that can happen if you dont take control of your seams.

13:48.790 --> 13:51.000
Let's make the light a bit more exaggerated.

13:51.000 --> 13:58.030
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

13:58.030 --> 14:04.750
we go ahead and move the sun lamps I'm just going to rotate that sunlamp or on the y axis or something

14:04.750 --> 14:05.900
along those lines.

14:06.040 --> 14:13.390
What we should find is that the shadows change is as if there is real geometry there and that's the

14:13.390 --> 14:16.150
whole point of using these normal maps.

14:16.150 --> 14:16.930
That looks pretty.

14:16.930 --> 14:18.950
That's a good example there.

14:19.030 --> 14:20.730
You can see that it's light on one side.

14:20.740 --> 14:25.120
And if we rotate it all the way round it'll become light on the other and then dark.

14:25.120 --> 14:31.540
Now you can see here some artefacts that are being caused by having such a low poly model here.

14:31.630 --> 14:35.330
Let's just check that we do have smooth shading turned on.

14:35.470 --> 14:36.310
Yes we do.

14:36.310 --> 14:39.460
It's just unable to interpret the model.

14:39.520 --> 14:44.910
And of course the normal map has been is causing this horrible jaggedness.

14:45.250 --> 14:54.070
Oh no no wait I see what is going on here and I have forgotten to actually change the type of image

14:54.100 --> 14:56.210
that this thing is.

14:56.440 --> 14:58.630
Let's change the image texture itself.

14:58.630 --> 15:01.150
We haven't said this is non colour data.

15:01.330 --> 15:05.680
So it's interpreting the rgv values as colour.

15:05.860 --> 15:10.980
When we don't we want the r.g. values to be treated as individual values.

15:10.990 --> 15:17.860
There are three channels there from a value of zero to 100 percent and each one of those we need it

15:17.860 --> 15:21.800
to be interpreted completely individually in a blend between the two.

15:21.880 --> 15:24.720
So we can do that by changing it's a non colour data.

15:24.760 --> 15:25.480
There we go.

15:25.480 --> 15:27.760
That is the look we're looking for.

15:27.790 --> 15:35.480
And now if we go ahead and grab the lamp rotate it around and access and we can see here that it changes

15:35.480 --> 15:38.830
is as if the geometry were real.

15:38.830 --> 15:45.220
Now the question is of course if I have that there and I put the other one there go have Turn the lamp

15:45.220 --> 15:46.350
off instead.

15:46.390 --> 15:48.690
Can you tell the difference between the two.

15:48.730 --> 15:55.440
I'm going to render these out now side by side and I'll show you how great this is WOWO case are blown

15:55.570 --> 15:58.410
up to full screen and tried to fit them on as best I can.

15:58.540 --> 16:01.640
And I want you guys to guess which ones which.

16:04.000 --> 16:04.320
Okay.

16:04.330 --> 16:06.120
I'll give you a clue here.

16:06.220 --> 16:07.900
We look for reclusion.

16:07.900 --> 16:14.320
So even though the outside is relatively smooth we can see the eyeball on the other side on the right

16:14.320 --> 16:18.110
hand side in the shadowed area at the top left.

16:18.160 --> 16:20.500
We can see a bump of the eye.

16:20.500 --> 16:23.860
Let's head round the back of this particular smiley face.

16:23.860 --> 16:30.160
Now the great thing about this is the one on the left is less than 1000 polygons I think it's something

16:30.160 --> 16:32.810
like seven.

16:32.950 --> 16:37.500
The one on the right is nearly 49000 polygons.

16:37.630 --> 16:40.550
There's a huge difference in him there.

16:40.570 --> 16:44.560
But there's very little image quality difference at this point.

16:44.710 --> 16:49.410
So you can see how a normal map can really help you out.

16:49.480 --> 16:55.810
And of course if we combine that with the displacement map as well we can get some really impressive

16:55.810 --> 16:57.400
results.

16:57.460 --> 17:01.560
So bearing that in mind it's time for a challenge.

17:01.810 --> 17:06.480
I would like you guys to create a normal map similar to how we've just done.

17:06.730 --> 17:12.450
So take one of your models up to at least an L O D C or D level of detail.

17:12.560 --> 17:18.280
So we going to take a duplicate of the elodie B or A that you've currently worked on and really add

17:18.280 --> 17:28.000
some detail to that model then go ahead and create a normal map based upon that and apply it to a lower

17:28.000 --> 17:31.350
polygon model so apply it back to the level of detail.

17:31.360 --> 17:33.250
A or B.

17:33.250 --> 17:37.050
And finally of course share it in the discussions.

17:37.060 --> 17:41.990
The two side by side and see if people can guess which is which.

17:42.130 --> 17:46.290
If you do it really well it would be very very difficult to tell.

17:47.070 --> 17:51.990
I'm going to not pause a video at this point because we've almost run out of time for this particular

17:51.990 --> 17:55.680
lecture and we'll go through the solution in the next lecture.

17:55.920 --> 17:56.770
See you soon.
