Welcome to extracting image data.
So can we extract this shadow.
There are a couple ways that come to the top of my mind that we could do.
This is a rather arduous one we could take the background image and map it to an object that is visible
in the render.
But that can cause no end of issues especially if we're animating things can change rather rapidly and
you'd have to remap every frame no good there would be a better way of doing that now because we have
all of the 3D data to make a comparison scene.
We can go about and do that we can create another render layer for comparison without the object and
therefore without the shadow as well.
Now we can create just the shadow on its own however that can cause issues where the shadow appears
on top of our plane rather than underneath it.
And finally we do need to consider the order of these layers and by layers I'm not specifically talking
about the render layers but we are going to have our background image the render layer with everything
on and the render layer for comparison.
So we've got those three layers if we combine them in the wrong way.
Now there's not going to be too many permutations with three of them but if we combine the wrong way
you're not going to get the desired result and we'll play with that and see what we get.
So let's see if we can go extract that shadow and hop on over in a blender.
Right so we have our f 22 on top of the runway here.
And that's looking pretty good apart from the fact it doesn't really have any presence with there being
no shadow.
Now how are we going to go about doing this.
Well first of all let's think very carefully about how we've currently got this set up and what is really
happening.
So we have this image of the plane on the rim with a shadow and it's being masked out by just the plane.
We have a look at that's on the backdrop.
We see that it's just an alpha we anything that's just this plane will show through when we mix them
together and the black would mean anything.
That's not this plane.
It's part of this background image will show an order does matter.
Some going to get rid of the viewer there for the moment and turn off the backdrop if we mix these up
the wrong way you end up offering out the background and leaving the rest of the image.
So it does make a difference the way order these.
Now when you have other mixed nose We also have an issue with the ordering not only of the inputs to
any mix no but also which makes node comes first now because we're literally dropping this plane on
last.
Was saying this is the last thing to go on.
Stamp.
We put it on top.
That's also going to be the last thing we do later on that nothing passing in front of it.
So we're okay to do that.
So let's go ahead and work on the shadow.
So we're going to need a comparison layer.
And in order to do that we're going to have to go over to the render layers tab and sort that out by
the way I've just moved the background image down because this is the last thing to be going on.
I can just move it up and out of the way.
And I'm going to zoom in a little there so we can see what's going on now.
This is also a great thing to do with multi monitors.
You are not going to be able to show you a multi monitor setup.
You won't be able to see it on a normal screen.
It would look crazy but if you do have a multi monitor set up I would advise going window duplicate
window and setting your node editor to a different window and perhaps your this whole area here could
be the picture viewer with a properties panel on the side here.
But we need to create another Rendell air for comparison.
So we've got one render layer and I'm going to call this complete scene because that is what it is it's
not just a render layer it is a complete scene.
I'm going to add a nother render layer which you're going to use for a comparison and I'm going to call
this only ground because that is what I need to compare it with.
Now there are a couple of ways of making this work we could duplicate everything to another layer including
the lamp and completely forget about the plane.
But we don't need to do but what we can do is shift the plane over to another layer like Layer 2.
So with the plane selected I'm going to go to the object properties here and shift it over to layer
to it will disappear from here because in the render Tab we're not including both layers.
I'm going to hold down Shift and select layer.
So so now we can see everything again and we're working on a Only ground just to make sure that is selected.
So we've got only ground here but we want to exclude in this one we want to exclude the plane itself
the aeroplane not the plane on the ground how we want to exclude that so when we render them out now
we go render and render we won't see any difference down here just yet.
But now we can have we if we have a look in this red layer we've got this and the complete scene is
only the ground.
And we got only the ground there perfect.
So we will go back to complete scene.
The other thing that we need to make sure is well do we need to pass through an object index.
I don't think we do so will leave unchecked for the moment if we need to do something with the objects
ground and removing that from the scene.
We can do.
But I think we'll be okay.
So we've got and we're going to have to use this render layer here and the other render layer make a
comparison between them in order to do this I could link this down and drag it down and plug it into
a mix.
No but conceptually I'm going to keep that as a completely separate entity so I'm going to introduce
a new input a a layer and I'm going to duplicate that render layer and then set one of them to complete
scene.
And one of them to only the ground.
Now I'm not sure if this is going to be the appropriate order so that we don't have crossed wires.
Does that matter.
Not really.
I'm going to turn on the back drop so I can see what's going on that's what we were looking at last.
And I'm going to add in a colour mix node and I'm going to plug these two entities in.
Now if we're looking for a difference between these two layers we can do several things to without the
first thing I thought was a subtract and then we would see the difference between one layer and another.
But what would be nice is if this itself created some sort of mask this does create a mask that's kind
of inverted but it also lightens things.
It lightens the shadow quite considerably.
There's also a difference.
So let's click on difference and it looks exactly the same.
That is the definition of subtracts After all it's the difference between two.
After playing for ifit dividing and with these round beat other way gave me a nice shabot and it gave
me a plane that the plane itself doesn't really matter.
The reason why it doesn't matter is because we're going to put a stamp essentially over the top but
in fact because there's a gap underneath the shadow.
My whole argument about not just rendering the shadow out is now null and void because of the position
of the light and everything else.
So in order to make it not meyler Void I'm going to actually place my plane on the ground.
So there is some of the shadow which we can't see.
It's underneath that plane literally underneath.
We've also got these lines going across.
Let's just move this up away so you can focus on the picture we've got a line scooting across here.
That is where that plane i.e. the ground plane exists.
And that may cause us a problem that's why I was thinking earlier about we might need to use an object
eidy just for that plane itself to remove it.
But I don't know if I think we can get away with not having it.
So we've divided these together and we get this image coming out looking good so far.
We now need to put all of this back together now before we actually blend anything else together.
We need to blend this background image into this new mix now.
So were going to come out of here and into here with another mix now so let's add that in so it's ready
to go and I was going to plop them together.
There we go.
And it's not working at the moment.
That's fine we've got all the mixed nodes we need in place but we need to do some re ordering.
No we don't need to do any reordering that's all ready to go.
Of course now it's time for a challenge.
It's time for the final image composite so finish off the notes set up to show the background with the
object placed on it and the shadow of the object.
Consider adding more light if your object is to shadowed.
So you may be like me with the light.
The original lighting source in the scene is low on the horizon as it were and so the front is quite
shadowed and I'm going to add inner light as if it was.
Perhaps it's a flash photography or something along those lines.
Now you may need to create another eidy mask for the ground.
Do give it a different pass.
None.
If you do sometimes it works apsey fine.
Sometimes you will need that extra I.D. mask.
Complete the final composition and share it with us.
I love seeing you guys work and everybody else like seeing your work too so please make sure you share
your work over on the forum.
Pause a video now and give that a go.
Okay guys welcome back.
Let's go complete our final image composition.
So one thing at a time here let's compartmentalize what we've got going on.
So we've got this this and this all acting together.
I'm going to put them inside a frame and they're creating our shadow.
Then we've got the background image which is all by itself.
And then we're mixing the background image and our newly formed shadow.
And let's see what we get.
I'm going to remove that viewer and remove the backdrop so I can see my nodes more clearly.
So obviously mixing them together is not helping in this respect.
And if I move them backwards and forwards Oh are you expected that I would not cross plug in either.
Silly me.
Let's plug it in so we can see what's going on.
So we mix between these will just get a blend between them and that's no good.
That's not what we want.
We want to see all of this on top of this.
Now we have a look at this particular image that's coming out of here.
Just move the factor along.
We've got a lot of white if you remember earlier I was talking about if you've got white that's a value
of one.
So if you go ahead and multiply by one you'll get the same background image coming out.
So let's go ahead and do that now.
Ah I'm going to test it in a moment.
But I also think of any values of coming out of here greater than one.
So this pixel here that you can't really see any of these white pixels if they're actually greater than
one in their value you'd be dividing and making the image darker.
Let's see if that makes any difference.
So we need a multiply.
So were multiplied here.
And again it doesn't matter if we can see through our plane at the moment because we have a stamp our
plane back on.
Okay so a multiply next clamp this divide.
KS not making any difference in this particular instance but do bear in mind whenever you are doing
a division if a value coming through turns out greater than one it would cause you a problem.
It's not in this case so we're fine.
I'm going to leave it clamped just force.
Just so it's it's right so to speak even though it doesn't seem to be making any difference.
Okay now we need to stamp this on top so let's go ahead and link these two up and plug it in.
Is that done.
I think it might be.
Let's swap these around.
Yeah it's definitely done.
And let's just make sure we can't see through that wing.
We can't.
Okay.
But it's still a bit dark on the front here so what can we do.
I'm going to click on my plane itself and literally add a lamp into the scene and because we're rendering
both scenes it doesn't matter.
Well it doesn't need to be on the same layer as our plane ideally otherwise it won't be rendered.
There we go lamp add in a lamp.
Just the point lamp and well that's remenda and see what that comes out as that's probably a little
too close to our plane.
So I'm going to scoot round to the top view.
There's our plane.
And with this again multi monitors here would help massively.
I'm just going to move the lamp.
So it's a way from the plane ever so slightly.
And there we go.
Also render is now kicked back in.
And I'm going to turn up the intensity just a little so we're on the lamp we've got it selected it's
in emissions strength 100 less stress strength four thousand.
And that has not updated anything.
So again I'm going to move the lamp by nothing.
And there we go.
That's better it's highlighted the front of our plane.
And of course you can move into different positions to give it a different lighting effects.
I'm going to move it slightly over to the side so we've got more lights coming in from the side just
highlighting those edges.
And then we've got a nice shadow around the edge there.
I'm liking that.
Let's do something funky inside our plane.
You don't have to do anything like this of course I'm going to have a look there select the plane and
use PAD zero and go into perspective mode.
I'm just going to select inside the air intake and add another lamp.
This is just for fun.
I'm going to set that lamp to have.
I don't know a blue colour.
There's that.
That's right render it does that work call.
It doesn't need to have a strength of that maybe a little less.
That's re render.
Let's go a little less once again.
Shame that doesn't auto render at this point there is a little bit annoying.
Let's just try strength for five.
There we go a nice blue glow coming from it.
Realistic no.
Cool.
Yeah.
Why not let's do orange that see how orange comes out.
Yeah that's probably a little metal or better.
Okay this is really noisy at the moment and we are.
We need to be careful of is we don't override our blooming shadows that we had here before.
Let's go ahead now and turn up the render details.
I'm not going to bother with it being super high resolution in fact I'm going to make it lower.
I am going to turn up my samples now and turn them up to 50 and re render.
So I've got a shudder there and combined that's very subtle but does have a sort of shudder.
I don't think the shadow itself is strong enough.
In this case I really don't.
So a couple of options we can do there because I dont want to lose the highlighting on my plane.
The first thing I can do is try moving that way perhaps so the light is highlighting the plane isn't
so close.
Maybe it's too close to the ground.
Where is our spot like let's lift that up a little.
Okay that's that's still not doing exactly what I wanted.
Let's go to our sunlamp and increase its intensity because it's at five at the moment it's just try
50 and once again I'm going to move this by zero.
I could have hit 12 as well.
Interesting we've now got a highlight round our plane.
That's not very nice.
So I'm going to turn that back down to 5.
I don't like that at all.
And I'm going to re render.
So there's some fun to be had here we have got a shadow over the back here.
I don't think the shadow I need to move this around I believe or make it weaker and closer.
So we'll go a hundred and move around again.
This is now playing with the scene.
There we go.
That's a bit better.
I'm happy with that.
And it's time to render that out in full and see what it looks like.
In fact I'm going to also go ahead and add some materials to this plane so it doesn't look so dull.
And I'll see you guys back in a moment with the full render.
Okay so as I was playing about here with V F 22 I just added a glass cockpit or was about so and I was
just literally playing about how I added a transparent which round the top here and I render that out
and all of a sudden it went like this.
So it does look like we need to exclude the.
Ground plane in our renders.
So we need to go ahead.
That's hop out here.
So it's our ground plane and give it an index pass different to our plane and go in and add it into
the appropriate place.
So it's going to be coming out of this in jet in Im there.
But menteith back in index Oh beep.
And I'm going to add that in.
Convert her I.D. mask of a pop that in there and there we go but soon so going to take this out.
And now we've not got all of this set up quite yet.
We do need to render.
In fact we need to make sure only the ground has the object index because thats the one we once x then.
Now we just need a rerun.
Before we do anything else.
So weve got an owl fillet here lets just check and see what that looks like.
Excellent.
So we need to plug that in.
Where it goes wonky does it go wonky here.
Maybe does a go wonky here.
I think it does.
So we plug that into the factor and then swap these round all this.
This is an odd one here.
Now if not get the indexed pass set to 2.
K. And how that is looking much better now.
Excellent.
I hate it when I forget to flick four index mask to the right value.
Excellent.
Thats me.
Done.
Im going to render this out now as my final scenes are going to turn up.
I'm only gonna render it 10 ATP and I'm also going to turn up the render the render samples here to
200 and then just hit render and wait for a bit.
It will take a while to render out.
And there we go.
Excellent.
This has turned out much better than I thought it was going to do from Brasilia.
When that happens.
How did ewell's come out.
Did you use the same scene and plane as me or did you do something else.
I'd love to see your work and so would everybody else so please make sure you share your work over on
the forum and I will see you guys in the next lecture.