WEBVTT

00:00.240 --> 00:02.550
Welcome to overlaying images.

00:03.400 --> 00:08.050
We need to consider what are our layers when we're sticking everything together.

00:08.380 --> 00:12.020
One of the obvious ones is the background image and that has to be visible.

00:12.070 --> 00:15.860
In fact that is the base of our entire project.

00:15.910 --> 00:17.340
Now we got the object itself.

00:17.340 --> 00:23.140
This is the item we're using CGI were generating this on our computer and they were merging with the

00:23.140 --> 00:25.860
real world image that also has to be visible.

00:25.870 --> 00:29.070
Now the moment's whim blending the two things together.

00:29.080 --> 00:35.170
And we're kind of getting all of the objects isn't isolated and we're getting this blend between the

00:35.170 --> 00:35.530
two.

00:35.530 --> 00:37.540
So we need to sort that out.

00:37.630 --> 00:41.650
We're going to have a shadow eventually and that also needs to be visible.

00:41.710 --> 00:47.570
However the ground itself used for capturing the shabot needs to be hidden.

00:47.710 --> 00:53.380
So let's have a look now at how we can isolate the object by itself and give that some thoughts and

00:53.380 --> 00:58.840
also how we can go about isolating the shadow by itself or whether we need to do something else with

00:58.840 --> 01:00.220
the shadow as well.

01:00.220 --> 01:06.840
Before we go over into blender Let's grab a pen and paper and work out the layers of our image.

01:07.800 --> 01:10.840
Let's go ahead and think about what we want.

01:10.890 --> 01:13.970
So at the end we want a composite image.

01:13.980 --> 01:22.620
A composition that has our mountains or whatever your image is in the background an object and a shadow

01:23.040 --> 01:27.670
that looks like it's being cast onto the actual surface.

01:27.720 --> 01:33.470
And we've got a fake ground plane that we can use there which we don't want visible in the final scene.

01:33.510 --> 01:34.590
How are we going to do about that.

01:34.590 --> 01:38.460
Well let's have a look at our components what's making up this scene.

01:38.460 --> 01:43.710
We've got a background and that's all pretty much goes all the way to the end and there's something

01:43.710 --> 01:46.410
happening here before we render.

01:46.410 --> 01:49.510
And that's going to be last or final combination node if you will.

01:49.590 --> 01:54.610
And this is just conceptual at the moment we're trying to work out how to piece together our image.

01:54.630 --> 02:00.750
Now we can render our entire scene at once which is a an object.

02:00.990 --> 02:04.880
The ground plane it sits on and a shadow.

02:05.340 --> 02:07.630
Okay so that's something else we can work with.

02:07.680 --> 02:12.380
Now we could render the shadow by itself.

02:12.390 --> 02:18.450
Now if we have a look at what would happen in in reality is there would be a shadow cast underneath

02:18.450 --> 02:23.280
an object that's too close to the floor someone extend the shadow up to the top of the plane edge to

02:23.280 --> 02:24.780
demonstrate that.

02:24.990 --> 02:30.720
And then finally we can do the plane itself or the ground whatever we're doing and with with these We've

02:30.720 --> 02:34.590
got pretty much every combination we can use to work things out.

02:34.590 --> 02:41.170
Now the problem we have this one here is a circle in red for a moment problem with this one here it

02:41.370 --> 02:47.220
is it would actually if we overlaid it unless we started doing something funky we would have a shadow

02:47.250 --> 02:49.410
over the top of our object.

02:49.410 --> 02:52.080
When we combine them so we don't want to do that.

02:52.170 --> 02:57.450
So I'm just going to remove those bits there and we'll decide at this point that we do not want to use

02:57.450 --> 02:59.130
that particular image.

02:59.130 --> 03:05.490
Additionally we have to consider the render time implications itsay each one of these three images took

03:05.490 --> 03:06.660
the same time to render.

03:06.660 --> 03:07.500
I doubt they would.

03:07.500 --> 03:09.520
But let's to save arguments sake.

03:09.720 --> 03:15.900
They do then that middle one that we've decided to exclude potentially could save us 33 percent of our

03:15.900 --> 03:21.320
render time which if it's an animation is going to be a lot of render time.

03:21.330 --> 03:27.780
So when we can avoid rendering that is a good thing because it will save us a lot of time even if you

03:27.780 --> 03:33.120
decided at the end to render your composite image at high resolution is still going to have to render

03:33.120 --> 03:34.790
all of these out first.

03:34.800 --> 03:37.230
So that's a good time saving tip there.

03:37.320 --> 03:40.790
So that leaves us with these combinations and we need to do something with them.

03:40.800 --> 03:44.360
We don't know quite what is at the moment but we need to what do we need to get.

03:44.360 --> 03:50.460
We need to get the object by itself and we need to get the shadow by itself.

03:50.460 --> 03:53.050
But and art just draw a harsh line there.

03:53.070 --> 03:58.920
The shadow has to be occluded by the actual object.

03:59.840 --> 04:05.330
So you've got the object by itself and I'll just do a dash here as if it was alferd out and an image

04:05.330 --> 04:09.310
just by itself and once again here we would have an outfit out image.

04:09.440 --> 04:14.390
So how do we get this well we can certainly just extract the objects from here.

04:14.390 --> 04:17.580
So something will happen here which we'll get.

04:17.610 --> 04:19.750
That's And then we can combine that.

04:19.750 --> 04:22.270
Towards the end we to do a plus there.

04:22.280 --> 04:26.310
I don't know whether it will be an addition or multiplication or something.

04:26.330 --> 04:32.000
In fact what would be better of course would be an equals some sort of maths going on that would equal

04:32.000 --> 04:32.350
that.

04:32.360 --> 04:37.930
And again this question mark is really in equals what do we do here that equals that.

04:38.030 --> 04:42.020
And then finally we've got the shadow all by itself but occluded by the object.

04:42.080 --> 04:47.060
So we have the object up here and we have the plane just here and the difference between those will

04:47.060 --> 04:48.590
be included shadow.

04:48.680 --> 04:55.470
And so there's going to be something else happening when we combine these things together.

04:55.490 --> 05:00.540
So there's three distinct groups here we've got this background group with something happening and I'm

05:00.540 --> 05:02.170
just going to make that big big agree.

05:02.270 --> 05:06.820
So something happens with this background group and then it gets passed onwards.

05:07.010 --> 05:09.540
We've also got this group here.

05:10.440 --> 05:12.550
And then something gets passed onwards.

05:12.870 --> 05:17.610
And finally we've got a third group and just going to do it in a different colour so it stands out.

05:17.640 --> 05:19.980
This group here.

05:21.900 --> 05:24.150
So these things themselves I say group.

05:24.150 --> 05:28.540
They can be compartmentalized and then reused if necessary.

05:28.620 --> 05:33.030
Now will depend on the scenes you're doing but we can see here how putting them all together.

05:33.180 --> 05:39.180
We've got three distinct groups so we've got three levels of what's known as abstraction that we've

05:39.180 --> 05:44.280
got a lot of detail going in here but we can zoom out and make these modules much more easy to follow

05:44.280 --> 05:46.430
and much easier to read as well.

05:47.540 --> 05:52.460
Looking at this diagram in front of us we've pretty much done this first one if we just link in we get

05:52.460 --> 05:56.770
the background image and we're kind of there with this one at the moment.

05:56.780 --> 06:02.720
We're we've got the background the actual cube showing but it's affecting the entire image and not having

06:02.720 --> 06:05.280
the cube itself isolated.

06:05.300 --> 06:10.810
So let's go ahead now and look at that and hop on over in a blender.

06:13.200 --> 06:15.440
Okay so I've gone ahead and opened up the scene.

06:15.450 --> 06:21.780
We were working on before we're setting up the camera and the fake ground plane to cast the shadow one.

06:21.830 --> 06:27.460
And I'm liking what I see so far and I even rename the file so I don't overwrite the old one.

06:27.470 --> 06:31.070
Now I'm going to immediately append an object into my scene.

06:31.200 --> 06:38.260
I've gone on to blend swap and I have modified a an F 22 like thing it's an aeroplane.

06:38.570 --> 06:43.380
So let's go ahead and append it into our scenes and you can also use this if you're doing a runway and

06:43.380 --> 06:44.750
following along.

06:44.790 --> 06:48.260
F 22 lightning will just import that will go to object.

06:48.300 --> 06:57.180
Or if I click happy go f 20 to append from library and under the move that now towards the camera and

06:57.180 --> 07:01.160
there will do it's in the ground so that's just lift it up so it's not perfect.

07:01.320 --> 07:06.250
Now because I've set everything up so is all level I can actually whiz round to the.

07:06.260 --> 07:11.550
Front view and orthographic mode zoom in and make sure it's not actually in the ground so it would be

07:11.550 --> 07:13.020
hovering about there.

07:13.020 --> 07:16.930
This plane does not have wheels nevermind seats.

07:17.220 --> 07:20.750
So let's go ahead now and with background for camera mode.

07:20.760 --> 07:24.780
Make sure it's roughly in the right position and with shift across just a little.

07:24.930 --> 07:29.570
OK we've got an object and we want to isolated from the background.

07:29.640 --> 07:31.910
Let's render what we've got so far.

07:32.650 --> 07:37.870
And again looking at this the lighting is not right and it's going to take too long so to scroll down

07:38.550 --> 07:43.880
further sampling and turn the render down to one that will speed up that.

07:43.930 --> 07:48.360
And finally let's sort out our lighting as well so I've got the lamp in the scene.

07:48.430 --> 07:53.980
It's blatantly not a sunlamp at the moment so that's making some amp for argument's sake it doesn't

07:53.980 --> 07:57.150
matter with the sunlamp but I'm going to move it so as over the sun.

07:58.600 --> 08:06.460
And then the little line that comes out to show you the direction I can manipulate that so that it is

08:06.460 --> 08:07.770
facing towards us.

08:07.900 --> 08:12.850
So let's go ahead and open up the properties panel and we've still got our lamps selected and I'm going

08:12.850 --> 08:16.940
to change the rotation to 0 0 0.

08:17.680 --> 08:20.180
And I'm going to camp out for a moment.

08:21.000 --> 08:24.710
And see that that is facing directly down now.

08:24.720 --> 08:30.620
I don't want it face indirectly down I want it towards our plane which is over here.

08:30.930 --> 08:33.830
And so I think I need to rotate it around the x-axis.

08:33.840 --> 08:38.700
By the looks of it by minus 90 he hopes Yes that's right.

08:38.880 --> 08:44.400
And now I just need to move it towards the camera as well so I can go back to this view and literally

08:44.400 --> 08:49.060
by manipulating not the why these z axis has tried 10.

08:49.080 --> 08:50.270
Yeah that's moving it toward.

08:50.270 --> 08:51.790
So we need positive.

08:51.850 --> 08:55.370
So now it's definitely towards us that is quite hard to see.

08:55.380 --> 09:01.710
But the little line if I exaggerate it moving away moving towards it because it was roughly towards

09:01.710 --> 09:07.500
us to begin with I know it is moving towards not away from finally the rotation where the sun isn't

09:07.500 --> 09:08.920
pointing directly over there.

09:08.940 --> 09:16.610
I'm going to make it face down slightly may be 85 and let's just render that now and see what we get

09:16.900 --> 09:17.250
at.

09:17.380 --> 09:19.540
That's not the desired result.

09:19.560 --> 09:24.090
The first thing I'm going to do is get rid of that back drop because we need to focus on one thing at

09:24.090 --> 09:24.730
a time.

09:24.750 --> 09:28.880
If you put too many things into your pot you you won't be able to.

09:29.010 --> 09:34.650
We need to isolate the flavours so we need to isolate these two parts of our image someone to switch

09:34.650 --> 09:38.880
immediately over to the compositing node and let's have a back drop turned on.

09:38.910 --> 09:44.130
Oh no let's not have the backdrop there's just use of the window down here and also render turned on

09:44.550 --> 09:46.920
let's render our image out perfect.

09:46.920 --> 09:52.530
We're using nodes and you may get this happen to you occasionally where you're using nodes and no nodes

09:52.530 --> 09:53.500
appear.

09:53.910 --> 10:01.350
Switch to the shader and switch back to your compositing node and it should all come back.

10:01.380 --> 10:06.150
So as I was detailing earlier we need to isolate some of these components so they don't get in the way

10:06.180 --> 10:08.560
and you can't go back and touch them over that's abroad.

10:08.610 --> 10:10.670
You naughty naughty can't do that.

10:10.710 --> 10:15.720
So I'm going to sell these two here make them into a group and by making them into a group and then

10:15.720 --> 10:17.990
come out and it's called node group that's no good.

10:18.000 --> 10:20.880
I'm going to call it background image.

10:20.880 --> 10:25.130
We know that works are just background will be fine for the moment.

10:25.290 --> 10:26.340
We know that works.

10:26.340 --> 10:27.550
We don't need to play with it.

10:27.600 --> 10:31.470
Let's get rid of it completely from our set up for the moment.

10:31.620 --> 10:32.930
We've got this multiply here.

10:32.940 --> 10:33.720
I'm going to leave that.

10:33.720 --> 10:35.850
I think we're going to need multiply at the end.

10:35.850 --> 10:36.920
I don't know.

10:37.320 --> 10:41.890
So nothing plugged in with nothing plugged in we can't see what's going on.

10:42.060 --> 10:44.610
Let's delete the multiply and well if we need it.

10:44.610 --> 10:45.300
We'll pop it back.

10:45.300 --> 10:49.660
I'm going to link up to the not the view of the composer.

10:49.680 --> 10:50.550
There we go.

10:50.640 --> 10:55.890
And I'm going to get rid of the viewer because I can always bring that back in with no Wrangler if I

10:55.890 --> 10:56.880
need to.

10:57.650 --> 10:58.590
Excellent.

10:58.610 --> 10:59.990
So we have our friend play here.

10:59.990 --> 11:04.060
I'm still not happy with that's the the lamp itself.

11:04.160 --> 11:05.900
Have I actually set the lamp up.

11:05.900 --> 11:09.520
I don't think I have moved it I made it into a sun.

11:09.530 --> 11:13.120
I didn't use notes and I didn't turn up the strength to maybe five.

11:13.190 --> 11:16.930
Let's switch to rended mode to see what's going on in the 3D view.

11:18.020 --> 11:21.900
Gosh we've got a shadow there and it looks like it's facing the right direction.

11:21.980 --> 11:29.330
And so I want the shadow to be a bit tighter and this size will make its basically diffuse the shadow

11:29.610 --> 11:31.100
and set that to zero.

11:31.100 --> 11:36.310
We get a really harsh shadow that's also not what I desire northpoint not one.

11:36.740 --> 11:38.440
They go get a bit of fuzz there.

11:38.750 --> 11:41.790
Let's try not point nought five.

11:42.250 --> 11:42.650
Excellent.

11:42.650 --> 11:45.180
I like how that is coming out.

11:45.380 --> 11:49.710
Let's hop back over into the compositing layouts compositing.

11:49.760 --> 11:50.620
There we go.

11:50.660 --> 11:56.090
Now something is taking a while to render in the background let's just make sure everything set up sampling

11:56.480 --> 11:57.970
renders one that's fine.

11:57.980 --> 12:04.130
I'm happy with how this is here and we've got auto render Let's go ahead and work out how we can isolate

12:04.130 --> 12:04.430
this.

12:04.430 --> 12:07.190
In fact that doesn't look like it has rendered out.

12:07.310 --> 12:07.870
There we go.

12:07.880 --> 12:09.160
Now it has.

12:09.740 --> 12:11.330
What's Have we got to do.

12:11.330 --> 12:16.760
We need to isolate the object itself and because it's an object in our scene we can give that object

12:16.790 --> 12:21.440
an idea and then isolate it via that idea.

12:22.400 --> 12:28.800
Let's go back and open up what we've got a 3-d view here we don't need open anything else up.

12:28.880 --> 12:36.260
I've got the F 22 selected and I can go into its object properties and here I can give a pass index

12:36.290 --> 12:41.420
under the relations you can move it onto a different layer if you wanted to you can do that from here.

12:41.420 --> 12:46.730
That's another way of doing that and you can see that a parent object and you can give it an identity.

12:46.730 --> 12:51.920
I'm going to set that to one and just re render and see what happens.

12:52.010 --> 12:53.270
Nothing looks any different.

12:53.270 --> 12:57.730
Brilliant we haven't upset the rendering gods as it were.

12:57.830 --> 13:02.600
So the next thing to do here is be able to pull that information from our render layer.

13:02.600 --> 13:04.360
And it's not turned on at the moment.

13:04.460 --> 13:11.570
So we need to go to our render layers and go down and underpasses there's a lot more options.

13:11.570 --> 13:14.520
In this case we want the object index.

13:15.660 --> 13:21.360
If we go ahead and select that we can see that we get index objects coming out.

13:21.610 --> 13:23.310
Okay that's a good start.

13:23.310 --> 13:27.820
Now how do we mask off this particular F 22.

13:28.730 --> 13:32.100
Well we need to add in a node that's converter.

13:32.420 --> 13:38.270
And then I see the mask so it's masking off a particular index number.

13:38.270 --> 13:44.510
And here in highly value all we need to give it the entire scene data so that's plug in the on index

13:44.570 --> 13:45.560
object.

13:46.650 --> 13:47.760
And there we go.

13:47.760 --> 13:48.870
Let's preview this.

13:48.870 --> 13:50.790
I'm going to use noad Wrangler again.

13:50.910 --> 13:54.600
I could plug it into the vehicle which I've deleted but I'm going to use controlling shift and click

13:54.600 --> 14:00.500
on that and we should see if I turn back up on what's happening and we get a white image.

14:00.600 --> 14:03.430
We've not got it set to one so let's go ahead and set it to one.

14:03.500 --> 14:05.470
Oh now we get a black image.

14:05.490 --> 14:11.790
What is going on here now because we didn't have this set up on the render layers yet it hasn't actually

14:11.790 --> 14:12.770
been included.

14:12.840 --> 14:16.240
The node has it all set up but it has not been output yet.

14:16.260 --> 14:20.520
It's not stored that data so it's null at the moment or nothing.

14:20.790 --> 14:23.160
So let's go ahead and re render our scene.

14:23.550 --> 14:24.360
And there we go.

14:24.360 --> 14:27.830
We have a mask isolating just the object.

14:27.870 --> 14:29.200
Brilliant.

14:29.220 --> 14:32.880
And of course that leads us nicely on to a challenge.

14:32.880 --> 14:38.390
I would like you to go ahead and render the background and the objects together.

14:38.820 --> 14:44.480
So finish off the node set up to show the background with the object placed upon it.

14:45.300 --> 14:49.420
You'll need to use the idae mask to show parts of the rendered image.

14:49.500 --> 14:53.830
You'll want to see pause the video now and give that again.

14:55.590 --> 14:56.220
Okay guys.

14:56.220 --> 14:57.240
Welcome back.

14:57.570 --> 15:04.530
Let's go set up the nose now and hop on over in the blender right so we have a mask set up here that

15:04.530 --> 15:05.860
we can use.

15:06.930 --> 15:09.350
Let's bring back in our background.

15:09.420 --> 15:10.110
Did I delete it.

15:10.110 --> 15:11.830
No I just had it out of the way.

15:11.850 --> 15:13.870
You probably won't be able to see this.

15:13.910 --> 15:15.460
Zoom back in.

15:15.510 --> 15:15.930
There we go.

15:15.930 --> 15:17.680
Now I found that background low.

15:18.090 --> 15:19.500
And we've got a viewer here.

15:19.500 --> 15:23.850
I don't need the viewer it's just going to get in the way of this backdrop so I'm going to remove that

15:23.970 --> 15:25.210
entirely.

15:25.500 --> 15:33.810
And I also want the render to automatically update so what do we have before we had a mix colour mix

15:33.850 --> 15:37.400
knows we need to mix these two images together.

15:37.440 --> 15:40.400
We know that in which order.

15:40.430 --> 15:41.650
Oh interesting.

15:41.840 --> 15:46.350
Well if we just mix them 50/50 that's not going to work but we're going to have to do something with

15:46.350 --> 15:47.620
the idae mask here.

15:47.670 --> 15:53.770
I think it is mix we need because we need again this waiting here is an average of the two.

15:53.790 --> 15:56.940
However if we control the weighting.

15:57.030 --> 16:00.360
So let's just bring that back in.

16:00.360 --> 16:05.310
If we bring the weighting it of 100 percent of only this image.

16:05.490 --> 16:10.250
So I'll be the factor of the bottom one so I think that's the right order.

16:10.380 --> 16:11.740
Yeah I think so.

16:11.850 --> 16:17.820
This will be a factor of 100 percent thus showing us all of what's under this image.

16:17.820 --> 16:22.730
And then the black will be nothing of this image and therefore show all of the background.

16:22.770 --> 16:25.230
Let's plug it in and see what happens.

16:25.230 --> 16:27.290
All excellent.

16:27.300 --> 16:30.860
How about vides all come together rather nicely halimi.

16:30.930 --> 16:34.710
Just get rid of my back drop again so we can see the node set up.

16:34.890 --> 16:35.820
Let's see what we've got.

16:35.820 --> 16:39.210
Let's see if we can group things together into their compartments.

16:39.210 --> 16:45.840
So this is like an end mix node at the moment and we have the composite at the end so that's fine that's

16:45.840 --> 16:47.930
are that's our End Point.

16:47.940 --> 16:50.870
We've got a viewer here I can just get rid of that.

16:51.030 --> 16:54.090
So we have our I.D. mask and our render layers.

16:54.090 --> 16:56.750
Now I would like to group these two together.

16:56.810 --> 17:00.360
And sometimes it's a bad idea to group inputs together.

17:00.450 --> 17:06.720
But if you do try and group these together if we go node and make a group a blender will complain we

17:06.720 --> 17:09.970
can't shove a render layer into a group.

17:10.110 --> 17:11.680
And I'm not going to go about.

17:11.730 --> 17:13.900
And this is mask.

17:13.920 --> 17:16.500
I'm going to shove that into a group just yet.

17:16.650 --> 17:18.910
But this is isolated are object.

17:18.960 --> 17:25.550
The issue I've got with this of course is it's a different layer to this background so this is all one

17:25.560 --> 17:26.700
particular group.

17:26.700 --> 17:32.460
So we could visualize that in a different way if we want to we could put a little frame around it.

17:32.460 --> 17:35.920
So let's go and do that now at select both of these and add a frame.

17:35.940 --> 17:38.590
So I'm going to select those two as done and shift them.

17:38.590 --> 17:40.470
P Ill pop a frame around it.

17:40.500 --> 17:45.630
I'm happy with it left as the fall colours it just demonstrates that that is its own entity and also

17:45.630 --> 17:48.250
means we can move them both around together.

17:48.390 --> 17:49.130
Excellent.

17:49.140 --> 17:50.640
How did you guys get on.

17:50.640 --> 17:55.570
I hope you've managed to render your objects over the top of your photo your scene.

17:55.590 --> 17:58.190
Of course we can get to making that look a bit better.

17:58.260 --> 18:01.770
Later on we just need to get the components right first.

18:01.830 --> 18:06.450
Now I did sad in one nain this for I did want to colour in this frame but I will name it so with it

18:06.450 --> 18:11.880
selected I'm going to go over the label here and call it object isolation.

18:11.880 --> 18:14.810
I so relate to or isolation.

18:15.750 --> 18:22.160
That's called at isolators but the verb at the front ice or up spell that completely wrong I say relates

18:22.270 --> 18:27.500
object and I'm going to use kamil case which is where you just capitalize with no spaces.

18:27.510 --> 18:32.700
Isolate objects and then R has in that brillion THIS turn up the label size so we can read it.

18:32.710 --> 18:33.110
There we go.

18:33.150 --> 18:34.420
Isolate objects.

18:34.440 --> 18:35.760
Perfect.

18:35.760 --> 18:37.080
How did you guys get on.

18:37.110 --> 18:42.270
Remember to show your work over in the discussions on the forum and I will see you guys in the next

18:42.270 --> 18:43.010
lecture.
