Tracking and Keying in After Effects | Part 2

If you haven't started on part one of this series you're going to want to go and watch that first. In this lesson we're going to pick up where we left off last time and add even more compositing skills to our arsenal. In this lesson we'll take a look at even more keying techniques, creating a fake shadow to really ground an object, color-correcting the foreground to match the background on our composited shot, and creating a light wrap to really make our Baltimore Oriel look like he's always been there.

Make sure you check out the resources tab for info on where you can get some greenscreen footage to practice you keying skills with. And for a background plate, whip out your smart phone… it will be plenty good enough to play around with this technique. So much to learn, so little time.

If you have any questions, click over to the Q&A tab to post them. Other students can answer you, and we'll put our team on the case to try and get you a solution ASAP. 

Download Project File

 Get some greenscreen footage from Hollywood Camera Work 

    00:00:00,000(upbeat music) (people cheer and applaud)
    00:00:07,304(bird chirps)
    00:00:09,613(tapping)
    00:00:12,191(upbeat music)
    00:00:20,673- What's up? Joey here at School of Motion
    00:00:22,165and welcome to day 21 of 30 days of After Effects.
    00:00:25,705Today's video is part two of the series
    00:00:27,264where we are taking the Baltimore Orioles mascot
    00:00:30,233and we are inserting him seamlessly into my backyard.
    00:00:33,648In this video, we're gonna talk about keying,
    00:00:35,845getting a good key and integrating that keyed footage
    00:00:38,567into the background and making it sit in there
    00:00:40,630with color correction and some other tricks.
    00:00:43,097I want to thank the department of Motion Design
    00:00:45,126at the Ringling College of Art and Design
    00:00:47,163for getting permission from the Orioles
    00:00:49,223for me to use the Orioles' mascot footage
    00:00:51,453and for shooting this on their red camera
    00:00:53,940in the green screen room at Ringling, which is awesome.
    00:00:56,738Don't forget to sign up for a free student account
    00:00:59,031so you can grab the project files from this lesson
    00:01:01,624as well as assets from any other lesson on this site.
    00:01:04,654Now, let's hop into After Effects and let's do this thing.
    00:01:09,095In part two, we are now going to finish this composite.
    00:01:12,523If you remember in the last video,
    00:01:14,932we patched our background plate
    00:01:17,546and we removed the little pink chair that was sitting there
    00:01:20,018and we got a nice track on that chair
    00:01:22,212so that we could actually translate that information
    00:01:25,923onto another layer.
    00:01:27,522Now we're ready to grab our green screen clip
    00:01:30,796and key it out and insert it there.
    00:01:33,553Here is the clip, and it's ...
    00:01:35,592I'm actually just gonna make a new comp with it.
    00:01:39,092Stick it down here and we'll call this "keyed bird."
    00:01:43,209Now the way I approach keying it sort of depends
    00:01:46,632on what it is I'm keying.
    00:01:50,754The basics of keying is that you wanna break a key into
    00:01:54,698a few different pieces so that way you can just sort of
    00:01:58,552work on certain parts of the image
    00:02:00,664with certain types of keys.
    00:02:03,329There's a lot of different strategies.
    00:02:04,176I'm gonna show you one that works
    00:02:05,849pretty effectively in most situations.
    00:02:09,420This is the clip right here.
    00:02:11,367All right, and it's always a good idea
    00:02:12,276to just kind of scrub through it a few times
    00:02:14,267and figure out if there's gonna be any issues with it.
    00:02:16,096I can see one issue is if I let it go too far,
    00:02:18,979his feet actually break the frame
    00:02:20,678so I definitely wanna make sure I don't use
    00:02:22,366that part of the shot.
    00:02:24,117I'm just gonna put an out point here.
    00:02:26,153Then let's go to the beginning here.
    00:02:29,143At the beginning of the shot, if I use this part,
    00:02:31,856the problem would be that there's a big shadow
    00:02:33,835on the green screen here and it's a different color green
    00:02:37,879now than the main part of the green screen
    00:02:39,778and so that would create a little bit of an issue.
    00:02:43,126I mean, it's solvable but it would just create more work.
    00:02:46,184I might as well save myself some work
    00:02:47,500and not use any of the shot before this frame.
    00:02:52,951I'm gonna hit B, I'm gonna Control click here
    00:02:55,077and say trim comp to work area.
    00:02:56,465Now this is all the clip that I'm gonna use.
    00:03:00,079The first step that I do
    00:03:02,114is to do what's called a garbage mat,
    00:03:04,306and that's just a mask that's very, very rough
    00:03:07,628and it just cuts out all of this junk.
    00:03:10,629You know, the lights and the stands that are in the shot
    00:03:13,246that you obviously don't want.
    00:03:15,652This was shot on the red camera
    00:03:17,349and then the footage was transferred down to a pro res file.
    00:03:22,119You can see that the frame of the red actually
    00:03:25,294is a little bit narrower than 16 by nine,
    00:03:27,382so that's why you have these black bars
    00:03:29,166at the top and the bottom
    00:03:30,066and I obviously don't want those either.
    00:03:32,018I'm just gonna sort of scrub through and figure out, okay.
    00:03:36,598Right about here is where I can cut off the frame
    00:03:39,580and then on the left side right about here.
    00:03:42,000I'm just gonna draw a quick mask
    00:03:44,603and I'm not going to be very particular about this
    00:03:48,036because this is just step one.
    00:03:50,478In step two, we're actually gonna make our mask
    00:03:52,603much, much, much, much, much more accurate.
    00:03:55,413All right so let's finish this mask
    00:03:58,010and then just scrub through and make sure that
    00:04:00,740the actor or the character or whatever you're keying
    00:04:03,814doesn't leave the frame at all,
    00:04:05,243and I can tighten this up a little bit.
    00:04:07,617But it doesn't have to be very precise.
    00:04:09,495Let me talk briefly about the shadow here.
    00:04:13,252The shadow, if I pull this mask out
    00:04:15,262you can see that I might actually be able
    00:04:18,620to keep the shadow that was cast on the green screen floor
    00:04:22,588and composite that onto the grass.
    00:04:27,029The problem is that the shadow, you know, it's a long shadow
    00:04:29,737and it runs kind of off the frame
    00:04:31,931and it actually runs into this light stand here.
    00:04:36,196If I wanted to use that shadow,
    00:04:38,015I would manually have to feather it.
    00:04:41,654I sort of made a decision early on
    00:04:43,092that I was just gonna get rid of the shadow
    00:04:44,886and just make a new one.
    00:04:46,065I'll show you guys how to do that.
    00:04:47,979Just so you know, that's why I don't really care
    00:04:49,511that this mask is cutting the shadow off.
    00:04:52,251Now that we've got that, let me pre-compose this layer.
    00:04:54,580I'm just gonna hit Shift + Command + C,
    00:04:56,557make sure I move all attributes into the new comp
    00:04:58,735and we can call this "bird clip garbage mat"
    00:05:02,961just so I know what step this was.
    00:05:05,247All right, so now we've got a very rough garbage mat.
    00:05:08,237Now I want to eliminate as much of the green as I can
    00:05:12,554and make a very, very tight garbage mat.
    00:05:15,739What I mean is, when I apply my keyer,
    00:05:19,586we're gonna use the effect called Keylight
    00:05:21,211that comes with After Effects and when I use that,
    00:05:23,708I want Keylight to only have to worry
    00:05:25,921about pixels very, very, very close to the bird.
    00:05:29,533The reason that's important is because
    00:05:31,901the way this was lit, this was lit pretty well,
    00:05:33,505you can see that the color of the green screen
    00:05:35,914all the way around the bird, even mostly on the floor
    00:05:39,220is pretty consistent,
    00:05:40,585but over here it starts to get really dark.
    00:05:42,852Then by the shadow it starts to get really dark
    00:05:45,264and even, you know, it's just the way lights fall off.
    00:05:49,269The edges of your shot are gonna get a little darker
    00:05:51,811and so you don't want Keylight
    00:05:53,213to have to knock those pixels out.
    00:05:56,360There's a cool trick I learned and I actually learned this
    00:05:59,575and I apologize, I can't remember the teacher's name,
    00:06:01,668but I learned this on an FXPHD course
    00:06:04,297and I'll use this opportunity to plug them.
    00:06:06,584If you wanna learn visual effects and compositing,
    00:06:09,576FXPHD is incredible, I've taken a lot of their classes
    00:06:12,868and they're amazing.
    00:06:14,011This was a little trick I picked up from them.
    00:06:15,912You can, now here's one kind of annoying thing,
    00:06:20,167the effect I'm gonna use to do this,
    00:06:21,871it used to be in the keying menu here
    00:06:25,124and I believe since Creative Cloud came out
    00:06:28,107they've moved it into obsolete and it's called color key.
    00:06:32,160I'm guessing the reason they moved it there
    00:06:33,629is because it is the world's crappiest keyer
    00:06:37,537but what's great about it is it renders almost instantly.
    00:06:40,797It's very fast and so it works really well
    00:06:43,217for what I'm about to show you.
    00:06:45,666The color key, you just grab your eye dropper,
    00:06:48,760pick a color pretty close to the bird.
    00:06:52,417You can see, perfect our key is done.
    00:06:54,709Then you need to adjust the color tolerance.
    00:06:58,673When you increase the tolerance
    00:07:00,235it starts to eat away more and more of the green
    00:07:02,063and you can see it just looks awful.
    00:07:04,224This is a terrible keyer but
    00:07:06,784there's a pretty cool trick you can do with it.
    00:07:09,168Before I go any further,
    00:07:10,325I'm gonna add a solid layer behind the bird
    00:07:14,259and it's already this nice pink color
    00:07:16,087because I obviously did this before I recorded the tutorial.
    00:07:21,392What I usually do when I'm keying
    00:07:22,399is I'll take a really, really bright contrasting color
    00:07:25,658and I'll stick it behind my subject.
    00:07:28,878Then I'll make it into a guide layer
    00:07:30,828so it doesn't actually render.
    00:07:32,680The reason I do that is because now
    00:07:35,626if I increase this tolerance,
    00:07:37,028and the goal is to get rid of all of the green, okay?
    00:07:41,490All of it.
    00:07:42,614The problem with getting rid of all of it
    00:07:45,173is that, and I mean it doesn't have to be all of it,
    00:07:47,364but just most of it, right?
    00:07:48,504Most of that green is gone.
    00:07:50,184You can see the problem that creates.
    00:07:52,397It eats away at your footage too.
    00:07:55,761Because now this tolerance is very, very high
    00:07:58,548and it's working well on most of the bird
    00:08:00,870but on the socks, right near the whatever these things are,
    00:08:03,839down by his feet.
    00:08:05,714It's eating away at them and you can see through them,
    00:08:08,206but if I didn't have this color back there, right?
    00:08:12,156If I had this background set to black or something,
    00:08:16,197it wouldn't be as obvious that that's actually a hole.
    00:08:19,462I might think that actually that's supposed to be black.
    00:08:21,663By putting a pink color there, I can see the holes.
    00:08:24,564Now that I've done this, and just to show you this effect,
    00:08:27,538I mean it renders so fast, that's why I like it.
    00:08:30,802Now that I've done that, I can use this edge thin parameter
    00:08:34,090and I'm gonna pull it backwards as far as it goes,
    00:08:37,154okay, to negative five.
    00:08:38,665What that does is it brings back
    00:08:40,924the information on the edges
    00:08:43,502and you can see now I have,
    00:08:45,864there's still a little problem down here by his foot,
    00:08:47,750if you look down here.
    00:08:48,583It's still eating away a little too much of his foot
    00:08:50,355so I'm just gonna bring the color tolerance down
    00:08:54,145until, there we go, until that hole gets filled in.
    00:08:57,117Make sure there's no other holes in the footage anywhere.
    00:09:01,458That trick gives you the world's tightest garbage mat
    00:09:05,313in like five seconds.
    00:09:07,213This is great because the color that is around him
    00:09:11,460is gonna be way more consistent
    00:09:13,633than the color of the entire green screen.
    00:09:16,660You can see over here, you're getting
    00:09:19,005a little schmutz, right?
    00:09:21,169And it never actually intersects him
    00:09:22,955so I can actually get rid of that really easily
    00:09:25,573by just drawing a little mask like this
    00:09:28,572and setting it to subtract.
    00:09:31,450Then you can see that the floor is showing up here
    00:09:34,479so why don't we zoom into that
    00:09:36,759and do the same kind of thing.
    00:09:39,555Oh, I actually started drawing a shape layer.
    00:09:41,008Make sure you have your layer selected.
    00:09:44,519Then we can just select that little piece,
    00:09:46,406set that to subtract,
    00:09:48,186and then the shadow I'm not gonna worry about for now.
    00:09:51,670We can always come back in and mask that if we want to,
    00:09:54,451but at least for most of the footage,
    00:09:57,016we now have a great mat.
    00:09:58,659Now I'm gonna pre comp this.
    00:10:01,671We'll just call this "bird clip better mat."
    00:10:07,211Now I am ready to key it.
    00:10:11,152I usually break keys up into two pieces
    00:10:14,834and what you really are focusing on
    00:10:17,747when you're keying something is the edge,
    00:10:20,231that is the most important thing.
    00:10:21,423I'm gonna go into full res so you can see the edges.
    00:10:25,425You know, when he's waving the bat around, for example,
    00:10:30,720let me find a good frame.
    00:10:32,302What you're really concerned with with keying
    00:10:34,391is trying to keep motion blur and stuff like this.
    00:10:39,056If you do a key and you sort of
    00:10:42,751eat away at your footage too much,
    00:10:44,968it's gonna give you these crisp edges
    00:10:46,531and it's not gonna look very good.
    00:10:47,732You're gonna wanna try and maintain
    00:10:49,919the nice softness of those edges.
    00:10:52,581The problem is if you're maintaining
    00:10:54,416the nice softness of the edges,
    00:10:56,008you might also be leaving some holes
    00:10:58,137inside of your mat that you're creating.
    00:11:01,113I'll explain what a mat is for those of you that don't know.
    00:11:04,692What I generally do is I break my key up into two pieces,
    00:11:08,117at least two pieces.
    00:11:09,296A core, where I'm really only concerned
    00:11:12,247with getting a good inner part of my key.
    00:11:15,891Then an edge key, where I'm only concerned
    00:11:18,473with what the edges are doing.
    00:11:19,737Let's start by making a core key.
    00:11:22,067I'm just gonna rename this "core."
    00:11:24,615Now we'll apply Keylight.
    00:11:27,204Keylight is in the keying menu.
    00:11:29,907Let me get myself a little bit more room here
    00:11:31,847so we can see this bird better.
    00:11:33,734Hey look at that, a comment!
    00:11:35,540That's awesome. (laughs)
    00:11:36,946I should've turned that off, let me turn that off there.
    00:11:38,910Okay.
    00:11:42,086Here's what you do, here's the way Keylight works.
    00:11:43,671You start by selecting the screen color
    00:11:46,513and that just means, and I like how they spell color,
    00:11:49,152the British way, and you just use the eyedropper
    00:11:51,446and you pick a green and there you go.
    00:11:53,867You're done, look at that!
    00:11:55,772All done, one click, all right?
    00:11:58,061Now not really.
    00:12:00,374You can see that there's some holes in him down here
    00:12:03,491and there's some garbage going on with his feet
    00:12:05,564and all that kind of stuff.
    00:12:07,360Here's the thing about keys.
    00:12:09,642When you just look at it like this, you might think,
    00:12:12,202"Oh, well the top of him is done, look at that."
    00:12:15,641Well, it's fooling you, all right?
    00:12:17,788You can't just trust your eyes when you're keying,
    00:12:20,312you need to actually look at the mat.
    00:12:22,527Here's what the mat is.
    00:12:23,485If you click on this view option right here
    00:12:25,930and go down to screen mat,
    00:12:29,135this shows you the black and white image
    00:12:31,871that Keylight is creating and the white pixels
    00:12:35,182will be kept, the black pixels will be knocked out,
    00:12:38,227and the gray pixels will be transparent.
    00:12:40,278Look very closely.
    00:12:41,900There's gray pixels all over him
    00:12:43,679and there's noise in those gray pixels.
    00:12:45,559The problem is you will see that
    00:12:47,726when I composite it over footage.
    00:12:51,012Okay?
    00:12:52,341Although the edges of this look awesome, right?
    00:12:57,076There's nice soft edges and the motion blur
    00:12:59,774is still sort of maintained, we have holes in this map.
    00:13:03,948These gray pixels are holes.
    00:13:06,332On top of that, we may also have some pixels on the fringe
    00:13:10,822that are not being totally knocked out.
    00:13:13,080To my eye, it looks like they are, but I don't trust my eye.
    00:13:17,595There's this cool little thing you can do in After Effects.
    00:13:19,798This little number down here, this is the exposure
    00:13:23,511that After Effects is showing you for your comp.
    00:13:27,187By default it's at zero, but if I crank it up like this,
    00:13:30,548it's now sort of artificially brightening everything.
    00:13:34,032These pixels are actually not being totally knocked out
    00:13:38,437and you may say, "Oh but I can't see them,"
    00:13:41,298well the problem is when you composite it
    00:13:43,019and you start color correcting,
    00:13:44,375all kinds of weird stuff will happen
    00:13:46,657if you're not worrying about getting rid of those pixels.
    00:13:52,889What I do is I crank this up a little bit
    00:13:54,888so I can actually see those pixels.
    00:13:56,864By the way, it works the other way too.
    00:13:58,236If I crank it down, it makes it a little bit easier
    00:14:00,506to see the gray pixels in the white areas.
    00:14:03,406Adjusting this exposure is a great trick when you're keying.
    00:14:06,189What I need to do is adjust my screen mat settings.
    00:14:10,744The two that you adjust most of the time
    00:14:12,516are clip black and clip white.
    00:14:15,097These pixels should be black, and they're not
    00:14:17,882so I'm gonna adjust the clip black.
    00:14:20,046This number is basically telling Keylight
    00:14:23,066what is the minimum value, or sorry, the maximum value
    00:14:28,729that I will set to be to black.
    00:14:31,505Right now, if a pixel has a value of zero, it will be black.
    00:14:35,749If I set this to five, it will say well,
    00:14:39,442if a pixel has a value of five, I will set it to black.
    00:14:42,062I can just knock this up.
    00:14:44,628You really wanna be as delicate as possible.
    00:14:48,219You don't every wanna just, you know,
    00:14:50,698you don't wanna just do this, okay?
    00:14:52,646Just say, "Oh there you go, that looks good."
    00:14:55,083You actually wanna use your arrow keys.
    00:14:58,450Go up until that's gone and then hold the Command key
    00:15:01,895and go down, and when you hold Command
    00:15:04,512and use the up and down arrows,
    00:15:05,772it moves this number in smaller increments
    00:15:07,858and you wanna find the absolute minimum number necessary
    00:15:12,271to get rid of that stuff.
    00:15:13,591Don't worry about the ground right now
    00:15:15,906because what we're probably gonna end up doing
    00:15:18,281is doing a core key and an edge key for the top of the bird,
    00:15:24,128and then a separate core key and edge key for the feet.
    00:15:27,606That's how we're gonna get rid of this
    00:15:29,153and make the feet look good.
    00:15:31,322Now we've gotten rid of all the white pixels
    00:15:34,149that should be black.
    00:15:35,096Now let's adjust our exposure back down
    00:15:37,362and you can see there's all these holes.
    00:15:39,833A ton of gray pixels here.
    00:15:42,113To fix those, you adjust the clip white.
    00:15:45,224I'm just gonna start moving this down
    00:15:48,874and you can see that I have to really, really
    00:15:51,753crank these numbers in order to get rid of all those holes.
    00:15:55,905Now I've gotten rid of all the holes up here,
    00:15:58,025there's no more pixels that shouldn't be there.
    00:15:59,858If you wanna reset the exposure,
    00:16:01,563you just click this button right here.
    00:16:04,368Now if I just hit space bar,
    00:16:06,434now here's one thing that is kind of a big issue.
    00:16:09,022If we look at the original footage,
    00:16:10,774let me set the view to source for a minute,
    00:16:13,005that baseball bat is super duper shiny.
    00:16:16,539It's reflecting the green screen,
    00:16:19,058and there's not gonna be an automatic way to fix that
    00:16:24,497so that is a situation where you would
    00:16:27,346probably need to create an animated mat to fix that.
    00:16:32,181You'd have to just sort of go frame by frame
    00:16:34,085and wherever you need to see the bat
    00:16:36,182but there's green in it, you have to mask it out manually.
    00:16:38,836It's called rotoscoping, it's awful.
    00:16:40,889Or sometimes, you can get away with it
    00:16:43,639because if you think about why you're seeing green
    00:16:45,837on that bat, you're seeing it because the bat is shiny.
    00:16:48,944Whatever environment this bird and the bat are in
    00:16:52,256will be reflected in the bat to some extent
    00:16:54,892and so you're gonna see through this part of the image,
    00:17:00,777but the visual effect may actually
    00:17:03,643just look like whatever environment the bird's in,
    00:17:06,850you're seeing reflected in the bat.
    00:17:08,641I hope that makes sense.
    00:17:09,700If you look, if we actually go to the final comp
    00:17:12,075and we go to ...
    00:17:14,669I'm not even sure I even used a piece of the footage
    00:17:16,633where that's happening, but you know,
    00:17:19,812there's probably holes in the bat at some point in here,
    00:17:23,896but you don't really notice them
    00:17:25,880because all it's gonna do is gonna reveal very subtly
    00:17:29,581the footage that's behind him
    00:17:31,146and it's gonna look like a reflection.
    00:17:32,426So it's gonna be okay.
    00:17:34,054It's gonna be okay.
    00:17:35,738All right so now let's go back to our,
    00:17:38,576let's go to our final result now.
    00:17:41,080When you're on final result in Keylight,
    00:17:43,398there's a few things happening.
    00:17:45,857The way Keylight works is first, it creates a mat for you,
    00:17:49,629that black and white image, then it applies that mat.
    00:17:51,665If you wanna see what that looks like,
    00:17:53,144just look at the intermediate result.
    00:17:55,571That's showing you what it looks like
    00:17:56,860and the problem with just stopping
    00:17:59,056with the intermediate result is that a lot of times,
    00:18:01,973you get sort of this green cast on the pixels
    00:18:06,728and that's because, it's called green spill,
    00:18:09,536and it's just inherent when you're shooting green screen
    00:18:12,515that the green paint is gonna reflect up and bounce up
    00:18:16,350and sort of add this green tint to pieces of the footage.
    00:18:21,022So when you have final result turned on
    00:18:23,755it does some stuff to try and take that away.
    00:18:25,883Usually that's what you wanna just do,
    00:18:27,978is put it on final result.
    00:18:30,604If you played this, right?
    00:18:32,226Remember we really cranked these settings.
    00:18:35,642The problem is, like look at his hand.
    00:18:39,104If I zoom in, look at the shape.
    00:18:41,256It's like this super hard edge,
    00:18:44,240and if I look at the original source footage,
    00:18:46,030you'll see that there's actually some softness to this
    00:18:48,720because he's moving, and that softness has been
    00:18:51,426just destroyed by how much we've had to crank the settings.
    00:18:55,709If we go to final result, look right here.
    00:18:58,134Look at this area, and then we'll go back to source.
    00:18:59,929You see how there's these nice little details
    00:19:03,257that you wanna be able to keep,
    00:19:04,943you know, the softness of this mascot costume
    00:19:09,862but because we've cranked the settings so high,
    00:19:12,837we're losing that.
    00:19:14,859This mat is really good for a core, and here's the thing.
    00:19:18,195I want to basically erase the edges here
    00:19:21,451because I don't wanna do a separate key for the edges,
    00:19:24,013I don't want to have to, you know,
    00:19:28,279I don't wanna have to try and fix this one.
    00:19:30,504What I'm gonna do is I'm gonna use
    00:19:31,721this screen shrink and grow setting.
    00:19:34,522What this does, if I just crank it back
    00:19:36,075where you'll see it eats away at your image,
    00:19:38,767or it can grow it back out if you want to.
    00:19:41,212Here's what I want to do.
    00:19:42,269I want to shrink it by one pixel, minus one.
    00:19:47,597It just eats away at one pixel, and that's it.
    00:19:50,756The reason I'm eating away at that one pixel
    00:19:52,516is because now what I can do is
    00:19:54,877I can just set up another copy of this layer
    00:19:59,575and only key it out so the edges look good,
    00:20:03,368and there's gonna be a bunch of holes in it
    00:20:05,278but that's okay because right underneath that layer
    00:20:07,786is gonna be this layer which has no holes.
    00:20:10,471Let's duplicate this layer and let's call this "edge."
    00:20:14,991Let's reset Keylight.
    00:20:17,391Now we have a brand new key ready to go.
    00:20:21,551What we're gonna do is we're gonna just
    00:20:23,544grab a screen color like this, okay.
    00:20:28,162Now, if we come in here and take a look,
    00:20:32,206you can see that with that edge mat,
    00:20:34,047when I turn it on and off, it brings back the softness,
    00:20:38,420it brings back those nice edges.
    00:20:41,594Underneath it, and here's a good way to check this too,
    00:20:46,175if you turn off this layer for a minute,
    00:20:48,923another thing you can do
    00:20:49,815is you can just set your background color, Command + K,
    00:20:52,844you can just set your background color to this too
    00:20:55,726instead of doing a guide layer.
    00:20:57,293The advantage there is that if you hit option four,
    00:21:01,072it will show you your alpha channel.
    00:21:03,187I can turn the edge key on and off
    00:21:05,806and I can see the effect, right?
    00:21:08,291If I just have this edge key,
    00:21:10,450you can see all these gray pixels in there.
    00:21:12,186Once I turn my core key back on, it fills them in for me
    00:21:15,598but I don't see those crummy edges
    00:21:17,510because I shrunk that map by one pixel.
    00:21:20,952Now I'll hit option four again and bring my color back.
    00:21:25,158We still need to check the screen mat for this key, okay?
    00:21:32,397I'm not concerned at all with these gray pixels,
    00:21:35,890but what is gonna be a problem,
    00:21:37,727and I'm gonna crank up this gamma here,
    00:21:41,108or the exposure, sorry.
    00:21:43,814I am concerned that there are still some pixels
    00:21:47,358right on the edge there that you're seeing.
    00:21:49,807It's showing you all of these pixels here
    00:21:53,068and what Keylight is doing is it's actually
    00:21:55,111looking at the original footage.
    00:21:58,196If we look at the source,
    00:21:59,986and I turn this exposure back down,
    00:22:01,259remember we have a garbage mat on here
    00:22:03,183so even though Keylight is showing you pixels out here,
    00:22:05,748really all you need to worry about are the pixels
    00:22:07,435right here around the edge.
    00:22:09,558If we go back to our screen mat, crank up the exposure,
    00:22:12,664I do need to make sure there are no pixels here,
    00:22:15,549or that there are very few pixels along the edge.
    00:22:17,799You can get away with a little bit, but not too much.
    00:22:20,361Let's go to our screen mat,
    00:22:22,025and I'm just gonna nudge the clip black,
    00:22:25,218and I only want the absolute minimum value
    00:22:28,106that gets me a decent result, okay?
    00:22:30,952Let's take a look at this.
    00:22:32,738Now you could still see some schmutz there,
    00:22:36,563but only when I really crank the exposure up.
    00:22:39,878All right so if I reset the exposure,
    00:22:41,906it looks completely black,
    00:22:43,222and we're just gonna have to see this in context
    00:22:45,290before we know if we're in good shape.
    00:22:47,409If we now go to final result and we take a look at this key,
    00:22:51,971and when you are keying, and you're checking your results,
    00:22:55,556you need to do it in full res to be able to tell
    00:22:58,502if it's working, okay?
    00:23:03,053It looks like we're in pretty good shape.
    00:23:05,110Now there is, I just noticed, there's a little hole
    00:23:08,334right here happening in his pupil, which is kind of funny,
    00:23:11,966and it's only in that one little spot it looks like.
    00:23:15,436I'll show you how to fix that, that's actually pretty easy.
    00:23:17,435What you can do, and actually the first thing we should do
    00:23:20,197is figure out where that problem is being introduced
    00:23:23,797because we have a few things going on here.
    00:23:25,113If I turn Keylight off,
    00:23:26,722well you can see the hole is still there.
    00:23:28,179What that tells me is that that problem was introduced
    00:23:31,904here when we did our color key.
    00:23:34,616I am going to, I'm actually just gonna
    00:23:38,782duplicate this layer, delete this effect,
    00:23:42,412and just draw a little mask around his eye.
    00:23:46,832There you go.
    00:23:51,673I've got masks all over this thing
    00:23:52,941so let me delete the other two masks, there we go.
    00:23:56,106All I did was just make a little patch
    00:23:58,220and I only need it for a few frames.
    00:24:01,091So let's see, so right there, that's the first frame.
    00:24:03,852I hit option left bracket and just trimmed it to there.
    00:24:06,348Then we're gonna go forward and then it's gone by there.
    00:24:08,772So that's it.
    00:24:10,138Now if I turn this back on, and I can ...
    00:24:14,990I can adjust this mask a little bit,
    00:24:19,964make it come over a little bit further to the right.
    00:24:22,574There we go.
    00:24:23,888Cool, so now that hole is gone.
    00:24:25,436No, it's not, it's still there.
    00:24:27,586Look at that pesky thing, oh my goodness.
    00:24:31,492There we go, now it's gone.
    00:24:35,437All right and it looks like I am unfortunately gonna have to
    00:24:37,923animate my mask a little bit.
    00:24:41,976That was pretty quick and easy, there we go.
    00:24:43,786Problem solved.
    00:24:45,188Now we have no more hole in the bird's eyeball.
    00:24:48,978We've got a good core mat, a good edge mat,
    00:24:52,426we're maintaining that motion blur there which is awesome,
    00:24:55,842and what we don't have is a good key for the feet.
    00:24:59,682What I'm gonna do is I'm gonna do
    00:25:00,943a separate key for the feet.
    00:25:02,456Now that we've got a good core mat,
    00:25:04,207a good edge mat for the bird,
    00:25:05,936I'm gonna pre comp them, and I'm gonna call this "bird top."
    00:25:10,824Wow, I really hit that p hard on "top," didn't I?
    00:25:14,522I'm gonna duplicate "bird top,"
    00:25:16,441I'm gonna call this "bird bottom."
    00:25:20,585I'm gonna move "bird bottom" down here like this.
    00:25:23,212Now I've got two copies of the same key
    00:25:26,638and what I wanna do, let me turn off bottom for a second
    00:25:28,458and I'm gonna grab my top layer,
    00:25:30,753I'm gonna hit Q, bring up my mask.
    00:25:33,610I'm just gonna put a mask say right around there.
    00:25:39,530So this part of the key is great, that's fantastic.
    00:25:43,207The bottom is not, though.
    00:25:44,632What I can do now, I'm gonna make this a little bigger.
    00:25:48,559I'm gonna copy this mask to the bottom layer,
    00:25:51,992open up my mask and set this one to subtract, okay?
    00:25:56,381What you'll notice is that even though
    00:25:58,021these are the exact same masks,
    00:26:00,173you're gonna get this little one pixel thing,
    00:26:01,856so take that bottom mask and just nudge it
    00:26:06,910up a couple pixels and that line goes away.
    00:26:10,029Now I can come into this "bird bottom" comp
    00:26:13,638and I have a core and an edge layer ready to go
    00:26:16,484and I can just turn edge off, reset for my core layer,
    00:26:21,362and now I can just do a key for the feet.
    00:26:24,104This is gonna work better because now I can pick
    00:26:26,297the color of the floor and it will work much better.
    00:26:30,373Let's zoom in, I just picked the color for the floor,
    00:26:33,450let's take a look at our screen mat
    00:26:38,932and you can see we've got a lot of pixels
    00:26:41,438that shouldn't be there
    00:26:42,791and then a lot of pixels that should be there.
    00:26:45,071We'll just go to our screen mat settings
    00:26:46,928and I'm gonna first crank the white,
    00:26:49,660and you've really gotta crank it to fill in those holes.
    00:26:53,157Then I'm gonna crank the black, all right.
    00:26:56,205You can see that now we've filled in all the holes,
    00:26:59,713and we've gotten rid of all the junk,
    00:27:02,833but this just looks horrific
    00:27:04,891and that's because these numbers are so high,
    00:27:07,881they're just so cranked.
    00:27:09,385These edges are just gonna look like garbage.
    00:27:12,816I can also see that there's problem down here
    00:27:16,228in the socks still, which I'm guessing
    00:27:19,877is probably still coming from this comp here,
    00:27:22,621so maybe what I need to do is actually
    00:27:25,331adjust these settings a little bit more, there we go.
    00:27:32,333There we go, okay cool.
    00:27:35,005Real quick, lemme just make sure
    00:27:36,157that didn't screw up anything on the top.
    00:27:37,478It shouldn't have.
    00:27:38,982Looks okay.
    00:27:40,591All right, so now we've got a good core,
    00:27:42,951a core key for the shoes
    00:27:45,103and remember we need to shrink it by one pixel
    00:27:49,276and then do an edge key, all right.
    00:27:52,508Let's grab a color of the floor, turn Keylight back on,
    00:27:57,409reset this, there we go, and go back to our screen mat.
    00:28:03,591What I really just wanna make sure I do
    00:28:05,520is get rid of any extra schmutzy pixels.
    00:28:09,913I don't care about the holes anymore,
    00:28:11,769I just wanna try and get rid of as many
    00:28:13,486schmutzy pixels as I can.
    00:28:15,527One thing that's happening here
    00:28:16,663is I'm having to crank this clip black quite a bit,
    00:28:20,150a little bit more than I'd like to.
    00:28:21,588Sometimes a good thing to play with,
    00:28:23,707just to see if it helps, is the screen balance setting.
    00:28:27,018What this does is it sort of alters the way Keylight works
    00:28:31,254based on the color of the screen.
    00:28:33,789So if it's a blue screen,
    00:28:35,429the screen balance value you wanna use
    00:28:37,562is gonna be different than for a green screen.
    00:28:40,803Normally, the default value works pretty well
    00:28:43,919for green screens but sometimes
    00:28:45,688if there's a shadow like that, it's altering the color,
    00:28:48,729so it can help if you just kind of scrub this
    00:28:50,787one way or the other and see.
    00:28:53,469You can see as I push it towards zero,
    00:28:57,707it is doing one thing I like,
    00:28:59,906which is sort of darkening these pixels,
    00:29:01,282but it's also doing something else I don't like
    00:29:03,171which is it's making the edges crummy.
    00:29:06,103I'm gonna leave that a 50 and unfortunately
    00:29:07,676I think I'm just gonna have to have this thing cranked.
    00:29:11,051Let's have a look here. Let's see what we got.
    00:29:15,599Now we've got decent edges, much better than the core.
    00:29:20,411We'll go to final result, we'll take a look at that.
    00:29:23,528This is much better now.
    00:29:29,406Again, you're seeing some weird stuff up here at the top
    00:29:32,028because this key does not work well for the top of the bird
    00:29:34,993but it works better for the bottom.
    00:29:36,983We've managed to get rid of,
    00:29:38,219it looks like most of the shadow.
    00:29:40,067If I look at the alpha channel,
    00:29:41,662I don't actually see that shadow anymore.
    00:29:43,765If we now go back to our keyed bird,
    00:29:45,881remember which has our good top key
    00:29:48,304and now our decent bottom key.
    00:29:50,851If we look at it,
    00:29:54,250you can see you know, there's some stuff down here
    00:29:56,194I'm seeing that I'm not loving,
    00:29:58,441like when you stop on a frame
    00:30:00,471where there's a lot of motion blur,
    00:30:01,754I'm seeing some it looks like some pretty hard edges here
    00:30:05,366and I am seeing a little bit of that schmutz still show up.
    00:30:08,699I'm gonna go back in here,
    00:30:11,409let's go to my screen mat.
    00:30:13,828Let's just hit that black a little bit more.
    00:30:19,052Let's see if that helped.
    00:30:20,047That helped a little bit and I wonder if
    00:30:23,135it's coming from the core mat.
    00:30:24,452Let me turn my edge mat off for a second
    00:30:26,683and go to my screen mat.
    00:30:29,676Maybe what would help is if I just
    00:30:31,710erode this two pixels, let's try that.
    00:30:35,828There we go, that got rid of that.
    00:30:38,473Then you can even use this screen softness,
    00:30:40,563I could blur the edges by a pixel
    00:30:43,131which will help it blend in more with this edge layer.
    00:30:47,586The edge layer is getting a little weird too.
    00:30:49,728So because this is only for the bottom of the bird,
    00:30:55,034I'm not as concerned with the fidelity
    00:30:57,660of the edges as I am with the top,
    00:30:59,572because your eyes are gonna be looking up here,
    00:31:02,049not as much down here.
    00:31:03,021What I can do is even on this edge mat,
    00:31:06,594I can maybe soften the edges a little bit.
    00:31:09,470Let's put a one pixel blur on them
    00:31:11,408and then shrink it by one pixel.
    00:31:15,147All right now let's go back here and take a look.
    00:31:17,788Really, the big test is gonna be
    00:31:20,205when you put this over a background,
    00:31:22,130if you notice anything jumping out at you.
    00:31:25,054That's the real test.
    00:31:26,440I have a feeling that this is gonna work pretty well now.
    00:31:31,553I know that all of these steps,
    00:31:33,192they may seem kind of tedious and it's very tempting
    00:31:36,042to just try and click Keylight on there
    00:31:38,848and mess with the settings and say, "I'm done."
    00:31:42,055In my experience, it almost never happens.
    00:31:44,432You almost always have to do at least this amount of work
    00:31:48,396to get a good key or at least one that you know,
    00:31:51,117a visual effects supervisor will okay.
    00:31:53,893Now that we've got the bird,
    00:31:55,699if we've got our keyed bird comp here,
    00:31:57,386let's go into this comp here
    00:31:58,712and let's just drag our keyed bird right in there.
    00:32:01,531I'm gonna put the anchor point
    00:32:05,141somewhere around his heel,
    00:32:06,255basically where his foot's making contact with the ground.
    00:32:08,925I'm gonna turn off this solid,
    00:32:10,348actually I'm just gonna delete it.
    00:32:11,930Let me turn off our patch layer for a minute
    00:32:13,900and I'm just going to adjust the bird's position
    00:32:17,954making sure that his feet are on the ground
    00:32:22,122pretty much exactly where that chair is
    00:32:24,141because that's what we tracked.
    00:32:26,242So if I for example, if I move the bird here
    00:32:29,056and make him closer to the camera,
    00:32:31,160he's not gonna track correctly.
    00:32:32,673It needs to be right where that chair is.
    00:32:35,267I'm gonna scale him down a little bit
    00:32:37,775and then I'm gonna turn the patch back on
    00:32:40,097and parent the bird to the track.
    00:32:43,177Now we'll RAM preview it and we'll see what we got.
    00:32:45,092Now you're seeing the bird on screen
    00:32:47,393before we actually have the track.
    00:32:48,795Actually first, let's go back to the first frame
    00:32:52,515where you should see him, which is this frame
    00:32:55,154and I'm gonna hit option left bracket,
    00:32:57,566and so now that bird layer does not exist
    00:33:00,392until we have good tracking information.
    00:33:03,793All right, so while this is RAM previewing
    00:33:05,870let's talk about some of the issues
    00:33:07,706that we're gonna have to deal with.
    00:33:10,082The track actually works pretty well,
    00:33:14,388and it's actually kind of amazing
    00:33:16,844because if you remember in the last video,
    00:33:18,503it didn't take very long to get a good track
    00:33:20,350and to patch this, so that we don't have to worry about.
    00:33:23,049A big, big thing whenever you're compositing
    00:33:25,830is you need to match the colors.
    00:33:28,641Here's what I mean by that.
    00:33:30,219If you look at the color range of this scene
    00:33:34,476and you look at the bird, the bird sticks out.
    00:33:37,176He doesn't look like he fits in there.
    00:33:40,627It's kind of hard to say why.
    00:33:42,006One thing is, he's not casting a shadow
    00:33:44,301and other things are casting a shadow.
    00:33:45,849So we'll deal with that, that's not a problem.
    00:33:50,200What we are gonna have to do though
    00:33:51,945is make his color match,
    00:33:54,278you know if he was really standing outside
    00:33:55,840would his suit really be this dark?
    00:33:57,760Would this orange beak really look that color?
    00:34:01,492I'm gonna show you some strategies to color correct this.
    00:34:04,537Color correction is so important when you're doing keying.
    00:34:08,033What I like to do is first, I like to go channel by channel.
    00:34:13,996When you're using color footage, this makes it a lot easier.
    00:34:17,113The reason I go channel by channel
    00:34:19,495and maybe you guys don't know what that means,
    00:34:20,790let me explain really quickly.
    00:34:22,380This image you're looking at has three color channels,
    00:34:25,577red, green, and blue, and you put them all together
    00:34:27,629and you get a nice picture like this.
    00:34:29,224You can look at each channel individually
    00:34:31,144by clicking this button.
    00:34:32,818Red, green, and blue, okay?
    00:34:36,152What's cool about this is it's a lot easier for your eye
    00:34:39,792to look at a black and white image
    00:34:41,567and judge it critically than a color image.
    00:34:44,127There's something off about this bird
    00:34:46,824and I can make guesses as to what that is,
    00:34:49,193but if I look at the blue channel,
    00:34:51,614I can see holy crap, the blue channel is so much darker
    00:34:55,849than everything else in the scene.
    00:34:58,614If you look at the actual composite image,
    00:35:01,430by the way the hot keys for this is option one, two, three
    00:35:05,040show you red, green, and blue,
    00:35:06,462and then if you hold option and hit three again
    00:35:08,777or whatever channel you're on,
    00:35:10,261it'll bring you back to your composite image.
    00:35:12,666He's wearing a black suit
    00:35:14,571and you know, but there's light hitting it
    00:35:17,477and his black suit is as dark as these shadows
    00:35:20,367which have no light hitting them.
    00:35:22,654Really it should probably be closer to this color,
    00:35:25,436this is a metal frame that's a pretty dark
    00:35:28,862kind of grayish brown color.
    00:35:31,710His suit shouldn't be as dark as it is,
    00:35:34,514it should be a little bit brighter.
    00:35:36,579Here's what we're gonna do.
    00:35:37,412We're gonna go channel by channel.
    00:35:38,613I'm gonna hit option one,
    00:35:40,536we're looking at the red channel.
    00:35:41,600What I'm gonna do is I'm gonna put a levels effect
    00:35:44,775on my layer and you can just sort of eyeball it.
    00:35:51,021If you understand how the levels effect works
    00:35:52,832you can just kinda look at it and try
    00:35:55,777and judge what's going on but that takes a little practice.
    00:36:00,108There's actually a way to help yourself out.
    00:36:03,689Here's what you could do.
    00:36:05,183Hold your mouse over a very dark pixel on the bird,
    00:36:08,432somewhere in here, right?
    00:36:09,952While you do that, look right here on your screen
    00:36:12,748in the info panel.
    00:36:13,606If you don't have the info panel open,
    00:36:15,434go to window, make sure info is checked.
    00:36:18,427When you hold your mouse over it, it's gonna tell you
    00:36:21,875the red, green, and blue values of that pixel.
    00:36:24,311I see the red value of these pixels,
    00:36:27,017it's in the low teens, a couple of them get up to 20,
    00:36:29,789but really low teens.
    00:36:31,971If I come over here and I put my mouse here,
    00:36:34,985the red value of this is in the 50s, almost 60.
    00:36:42,178This is in the teens, this is about 60,
    00:36:44,488there's about a 40 to 50 level difference
    00:36:48,525and so what I can do is I can adjust the output black
    00:36:53,944up by basically the difference between these two.
    00:36:56,530So if I adjust it by like 30,
    00:36:59,447it's now gonna bring this now into the 40s,
    00:37:01,888it's raised that black value by this number.
    00:37:06,584You can use that to make the blacks match, okay?
    00:37:13,811There are some things on this bird
    00:37:15,137that should be totally black.
    00:37:16,195The shadow underneath his foot should match these blacks.
    00:37:21,286I don't wanna actually crank the output black that much
    00:37:23,645but I do wanna crank it maybe half that, okay?
    00:37:27,006If I just turn levels on and off,
    00:37:28,169you can see that just doing that, it sits in there better.
    00:37:31,658Then you do the same thing with white.
    00:37:33,310He's got a very bright orange colored belly here
    00:37:36,560and then down here, his socks, if we look at the color,
    00:37:40,175at the actual color thing, his socks have this white
    00:37:43,464kind of piece on them, and his eyes are white too
    00:37:46,749and there are white things in the scene,
    00:37:49,064like the clouds and my neighbor's patio. (chuckles)
    00:37:55,136You basically just need to decide how bright
    00:37:56,992do you think this piece of his leg should be.
    00:37:59,273Should it be as bright as this
    00:38:00,538piece of this house over here?
    00:38:02,345Well that piece, that pixel has a value of 180
    00:38:05,924in the red channel, and his sock only has a value of 160.
    00:38:10,023What I can do is I can change
    00:38:11,474the input white down by the difference.
    00:38:15,582There's a 20 value difference, so I'll just say minus 20.
    00:38:20,133Now this pixel has a value of 170
    00:38:25,570and this pixel has a value of 190,
    00:38:27,142so I need to do it a little bit more.
    00:38:29,632I like to just kind of eyeball it
    00:38:32,058and just kind of squint my eyes and de-focus a little bit.
    00:38:35,476The main ones you're looking for,
    00:38:37,462the output black is gonna raise the level of your blacks.
    00:38:41,244The output white is gonna lower the level of your whites.
    00:38:44,667If something looks too bright,
    00:38:46,656this is the one you're gonna knock down.
    00:38:48,679That's not happening though.
    00:38:50,467Then on top of that, if you don't have enough white,
    00:38:53,099and that was the case, you can adjust the input white.
    00:38:55,508If you don't have enough black,
    00:38:56,448you can adjust the input black.
    00:38:58,359This middle arrow is the gamma
    00:38:59,792and this is just sort of an overall adjustment,
    00:39:01,810you just kind of adjust it to taste.
    00:39:03,805Now our red channel sits in there much better.
    00:39:07,109Now let's move to the green channel,
    00:39:08,190we'll do the same thing,
    00:39:09,139and I'll do this a little bit faster.
    00:39:11,398He looks way too dark in here.
    00:39:14,159Now the black level doesn't look too, too bad
    00:39:17,121but I'm gonna knock it up a little bit.
    00:39:18,579You need to make sure, by the way, I made a big error here.
    00:39:23,409You see how I've been adjusting these arrows here?
    00:39:27,235What I need to do is I actually need
    00:39:29,000to set levels to the channel I'm looking at.
    00:39:31,950So I'm gonna reset this, go to the red channel
    00:39:34,088and I'm just gonna very quickly redo what I just did.
    00:39:38,587Which was bring the black output down,
    00:39:42,754bring the white input up,
    00:39:44,531and then I adjusted the gamma a little bit.
    00:39:48,310Cool, all right.
    00:39:49,287Now I'm gonna go to the green channel
    00:39:50,997and switch the levels effects to the green channel
    00:39:53,763and now I'll do the same thing.
    00:39:54,825It looks too dark here,
    00:39:56,423so I'm gonna start by boosting the gamma.
    00:39:59,450I'm looking at his sock here, it's got a green value of 150
    00:40:02,821and over here this house has a green value of 190.
    00:40:06,754I think again I need to really crank the white level,
    00:40:10,666or the white input up on the green channel.
    00:40:14,189Then his beak looks a little bit dark,
    00:40:17,388and that's kind of a mid-tone.
    00:40:18,783When you wanna affect mid-tones
    00:40:19,860you can push the gamma a little bit and when you do that,
    00:40:22,784it's making the blacks look a little bit muddy
    00:40:24,946so now I'm gonna use this black input arrow
    00:40:27,416and just knock it down a little bit.
    00:40:29,533That's sitting in there much better now.
    00:40:32,594Then we'll go to the blue channel
    00:40:34,736and the blue channel is kind of a mess
    00:40:37,111so let's switch this to blue.
    00:40:38,649It's just way too dark so I need to knock
    00:40:41,862this blue output way down like this.
    00:40:46,553I'm just kind of squinting and I'm saying,
    00:40:48,384"Okay, does that now sit in there better?"
    00:40:51,792You don't really have any contrast to this either,
    00:40:54,542so I'm gonna crank this white input up quite a bit
    00:40:58,756until it starts to look right.
    00:41:01,913All right, so now you saw how it wasn't that hard
    00:41:04,788to judge if this thing is sitting in there correctly
    00:41:07,572when it's black and white.
    00:41:08,689Now let's switch back to our color, okay?
    00:41:12,070This works so much better now.
    00:41:14,849Let me turn levels off and on.
    00:41:17,996Look how much better it sits in that scene.
    00:41:21,573The colors make sense now, you know,
    00:41:24,151and we did a bunch of different adjustments
    00:41:26,868to each channel and to actually just sort of eyeball this,
    00:41:31,418you'd have to be a pretty experienced colorist
    00:41:33,773to do this without looking at the individual channels.
    00:41:36,965Looking at the channels makes this so much easier.
    00:41:39,097Now, I mean frankly that's working pretty well.
    00:41:42,816You can then switch this back to RGB
    00:41:45,358and make some overall adjustments.
    00:41:47,853His bat still feels a little dark,
    00:41:50,331he feels a tiny bit dark overall.
    00:41:52,760I could try pushing the output black
    00:41:56,455just a little bit up like that and see if that feels better.
    00:41:59,785Now that's actually, that doesn't feel,
    00:42:01,864that feels worse to me.
    00:42:03,678I'm gonna split the difference there.
    00:42:04,511Output black I pushed up to seven, let me set it to three.
    00:42:08,263Then let me push the gamma down a little bit,
    00:42:11,588just a little bit like that.
    00:42:15,212Now at this point I'm just trying
    00:42:16,547to use my eyeballs and use my judgment.
    00:42:18,827That's not bad.
    00:42:20,766That's definitely light years better than where it started.
    00:42:25,749Cool? All right.
    00:42:26,627Now that we've got that, let's add a shadow to this bird.
    00:42:30,885There's a neat little trick I like to do now.
    00:42:33,095This is gonna be made so much easier by the fact
    00:42:35,277that the footage of the bird was shot on a tripod.
    00:42:40,621If we look at this, it's easy to add a shadow
    00:42:43,022to something that's not moving.
    00:42:44,980For the most part, this bird's not moving
    00:42:47,385so I think this trick's gonna work pretty well.
    00:42:49,293What I'm gonna do is duplicate this layer
    00:42:52,640and I'm gonna rename this "shadow."
    00:42:55,114I'm gonna put the shadow layer underneath this
    00:42:57,637and I'm going to delete the levels effect, we don't need it
    00:43:00,564but what we do need to do is add a fill effect.
    00:43:03,658I'm gonna say generate, fill.
    00:43:06,595What I wanna do is pick a color,
    00:43:09,083I wanna look for a shadow that's already in the scene
    00:43:12,191and I like these shadows here cast by the trees
    00:43:14,736because these shadows are basically caused
    00:43:17,890because the sun cannot reach underneath these little shrubs
    00:43:21,720but this part of the grass where the palm trees
    00:43:24,575are casting their shadow, that's probably the same color
    00:43:27,232that this shadow should be for the mascot.
    00:43:30,776I'm gonna grab my color picker and just pick that color,
    00:43:33,983and you can see it's a pretty dark green.
    00:43:37,401Now I'm gonna use an effect, distort CC slant,
    00:43:43,104and this comes with After Effects.
    00:43:45,223This effect's really cool,
    00:43:46,503let me turn the bird off for a minute so you can see.
    00:43:49,531Here's our filled in shadow layer and what you need to do
    00:43:52,498is first tell the effect where the floor is.
    00:43:55,234You can click this little icon, it gives you a crosshair
    00:43:58,194and you can put the shadow right where the floor
    00:44:02,079meets the foot, so somewhere in there.
    00:44:04,966Then you can slant it and set the height of it
    00:44:09,915and create a shadow.
    00:44:11,421What you wanna do is look at
    00:44:13,132the direction the shadows are going,
    00:44:14,573they're pretty much just going off sideways,
    00:44:18,056and it looks like they might be coming
    00:44:19,694a little bit towards the camera.
    00:44:22,642You just wanna try and match the direction of that shadow.
    00:44:27,519I'm gonna set this layer to multiply.
    00:44:31,853Sorry, here we go, multiply.
    00:44:33,732Third times the charm, there we go.
    00:44:36,174Now I can see the grass through it.
    00:44:39,180I need to adjust the opacity of this so that it matches this
    00:44:45,540and you know, it looks like I may want
    00:44:49,017to adjust the color a little bit,
    00:44:50,519but I don't know, that's actually matching the color okay.
    00:44:53,733I think it'll be okay.
    00:44:54,566These shadows are a little bit blurrier
    00:44:57,210and that's happening because they're being cast on grass,
    00:44:59,772they're not being cast on a flat surface.
    00:45:03,010I could do some sophisticated thing
    00:45:05,373where I distort the shadow to try
    00:45:08,177and make it look like it's on grass,
    00:45:09,087or I could just blur it a little bit,
    00:45:11,445and that's what I'll do.
    00:45:12,432I'm gonna use a fast blur and just blur it
    00:45:15,819until it sort of matches right there.
    00:45:18,595All right, and that matches pretty good.
    00:45:20,842Now I'll turn my bird back on
    00:45:22,520and what's cool is because he's not moving
    00:45:25,426for most of this shot, right?
    00:45:28,502For this part of the shot,
    00:45:29,797that shadow sticks right on there.
    00:45:34,291I may wanna adjust the floor a little bit
    00:45:36,396because I kinda feel like, you can do this interactively,
    00:45:39,918it just kind of feels like the shadow
    00:45:41,045wasn't connected to him enough.
    00:45:43,318There we go.
    00:45:45,087Now it's not going to be a perfect shadow
    00:45:47,404because it's not a real 3D shadow
    00:45:49,390and so sometimes you know, you may need to cheat it
    00:45:52,215a little bit one way or the other.
    00:45:55,753Let's see here, let's grab this and move this around.
    00:46:01,764You can adjust the slant a little bit if you need to.
    00:46:05,385You can even nudge the layer over a little bit,
    00:46:08,149just actually change the position of it.
    00:46:11,058It just needs to look mostly correct.
    00:46:14,648I think I did a great job of screwing it up.
    00:46:18,124There we go.
    00:46:19,412Okay, cool.
    00:46:21,352We've got a shadow and what I am a little concerned about
    00:46:24,558is the beginning of the shot
    00:46:25,626where the bird kinda takes a step
    00:46:28,085because this effect can't tell
    00:46:30,484that the bird's taking a step.
    00:46:31,600You can see right there, the shadow makes no sense.
    00:46:35,708You can probably get away
    00:46:36,990with just doing a little key framing,
    00:46:38,915so let's just animate where the floor is
    00:46:41,817and then let's just go back a few frames
    00:46:43,240and let's just move that floor down a little bit
    00:46:47,870and maybe, maybe that's enough.
    00:46:50,871It's moving pretty quick at the beginning of the shot too,
    00:46:53,501so we can probably get away with something like this.
    00:46:58,203I'm just gonna set these to auto bezier
    00:47:00,081so that it just sorta tries to make a nice curve.
    00:47:03,128It doesn't, you're starting to see,
    00:47:05,040you don't wanna see the shadow move
    00:47:06,563so I wanna make sure that I do this quickly enough.
    00:47:10,835Yeah, see, if you can notice it, it's too much
    00:47:15,386and I'm definitely noticing it,
    00:47:16,679so I'm gonna get rid of this key frame
    00:47:20,218and I'm just gonna have it ...
    00:47:22,139Yeah, let's see if that works better.
    00:47:24,161That's better.
    00:47:26,394The good thing is, people's eyes are gonna be drawn
    00:47:29,984to this bird, so if the shadow doesn't match up exactly,
    00:47:34,796it's not the end of the world.
    00:47:36,625You can get away with more than you'd suspect
    00:47:40,011when you're compositing as long as the big things
    00:47:42,592are correct, like the color correction.
    00:47:45,250One thing that I made sure to do was make sure
    00:47:49,092that the sun was on this side of the frame,
    00:47:51,308because that's where the Keylight was.
    00:47:53,354I made sure I held the camera at about
    00:47:55,585the same height that they shot this mascot,
    00:47:58,121so that the perspective would make sense.
    00:48:01,597Now we've got a pretty good result.
    00:48:02,782I'm gonna show you guys a couple other tricks
    00:48:05,386to help you out with this.
    00:48:07,608One thing I love to do is do light wraps
    00:48:12,336because light wraps can really help
    00:48:14,304just glue a composite together.
    00:48:16,544What I'm gonna do is I'm gonna pre comp this bird layer
    00:48:21,895but I actually need it pre comped with the track,
    00:48:25,464I need it moving inside of the pre comp.
    00:48:27,753What I'm gonna do is duplicate my track now
    00:48:30,648and parent this to the duplicate
    00:48:32,664and then I'm gonna pre comp this whole thing
    00:48:35,260and I'm gonna call this "bird key" ...
    00:48:40,226Let's just call it "bird key comp"
    00:48:42,136or something, I don't know.
    00:48:44,104I didn't come up with a very creative name for that.
    00:48:46,379What's cool is now this layer is not moving,
    00:48:48,542it just has that motion baked into it.
    00:48:52,067Now what I'm gonna do is I'm copy my background
    00:48:55,162and put it above my footage,
    00:48:58,131and actually I wanna make sure that I use
    00:49:00,265the background that has been patched.
    00:49:01,863Now I'm gonna select the patch and the background,
    00:49:04,471pre comp those and call that "background."
    00:49:07,269Let me describe what a light wrap is.
    00:49:08,745It's basically the effect of when you have
    00:49:11,900a bright environment, like a sky and a lot of sunlight,
    00:49:16,400some of that is gonna sort of show up
    00:49:19,363on the edges of your subject.
    00:49:23,126If you shoot in a green screen studio,
    00:49:24,635you're not gonna have any of that, but you can fake it.
    00:49:27,149I'll show you how to fake it.
    00:49:28,951I'm gonna duplicate my background
    00:49:30,441and put it above my keyed out bird.
    00:49:34,740What I wanna do is I only wanna see
    00:49:38,521the background kind of on the edges here.
    00:49:41,937There's a neat little trick I use to do that.
    00:49:44,384I'm gonna use an effect called set mat
    00:49:47,761and I'm gonna put it on my copy of my background
    00:49:49,697and I'm gonna say take mat from the layer "bird key comp."
    00:49:54,098Then I'm gonna say invert the mat
    00:49:55,950and if I solo this layer, you'll see what that's doing.
    00:49:59,062It's using this comp that has that motion baked into it
    00:50:03,176and it's cutting out the bird.
    00:50:05,975Now why am I doing that?
    00:50:06,808Well the next step is gonna be to add a fast blur,
    00:50:11,656blur a little bit.
    00:50:13,553Now that's blurring this image over the edges of
    00:50:19,252you know, this cut out.
    00:50:20,866Then I'm gonna duplicate this set mat effect,
    00:50:23,014put it after the fast blur, get rid of the invert mat.
    00:50:28,426Now this is what's being created.
    00:50:31,673It's just a blurred version of the background
    00:50:34,076showing up on the edges.
    00:50:36,309This is what it's gonna do.
    00:50:37,453I'm gonna set this to add mode
    00:50:40,892and I'm gonna mess with the opacity
    00:50:42,220because you don't want too much, you just want a little bit.
    00:50:46,695What this is doing, you'll really notice it if we zoom in,
    00:50:50,340if we go to full res here and you take a look at the hat.
    00:50:53,719If I turn this off, there's no light
    00:50:56,109spilling onto that from the sky,
    00:50:58,459and as soon as I turn that on, it shows up.
    00:51:02,390It's just gonna help him sit in there,
    00:51:04,181and you don't wanna overdo it, this is probably too heavy.
    00:51:07,172You don't need a lot of this.
    00:51:09,158A lot of times what I'll do too, is I'll take this layer,
    00:51:11,562I'm gonna rename this "light wrap" now
    00:51:13,040because that's what this is.
    00:51:15,097By the way, there are effects you can buy
    00:51:16,940that will just do this for you,
    00:51:18,327but this is a pretty easy way to do it.
    00:51:21,444What I wanna do is mask out this effect so it only shows up,
    00:51:27,859let's just use an ellipse tool,
    00:51:31,184the grass isn't going to reflect as much on the bird
    00:51:37,117as the sky, because the sky is this giant, bright thing.
    00:51:41,689You're gonna get some greens kind of
    00:51:43,573bouncing up from the grass on there,
    00:51:45,370so I'm just gonna feather this mask a lot.
    00:51:49,428If I solo it you'll see that what I'm trying to do
    00:51:52,351is just have more of that effect
    00:51:54,866on the top of the bird than on the bottom.
    00:51:59,772There you go, so now I've got a nice light wrap on there.
    00:52:02,819Technically what I would need to do is animate this mask
    00:52:06,833because the camera pans up like this,
    00:52:09,659but that happens so fast that I just am not sure
    00:52:11,795that it's really gonna make a big difference.
    00:52:14,188Let's do a quick little RAM preview here
    00:52:17,542and see what we got.
    00:52:19,708This composite is starting to work pretty well,
    00:52:23,450you know, considering that I can tell you
    00:52:25,647that the Orioles' mascot was not shot for this purpose.
    00:52:29,478(laughs) It just shows you how
    00:52:31,673a little compositing can go a long way.
    00:52:33,420The last thing that can help
    00:52:35,626just kind of sit things together
    00:52:37,784is to then color correct the entire thing as a whole.
    00:52:43,310Now that I've comped this whole thing together,
    00:52:45,442I'm gonna color correct all of it
    00:52:47,306and I'm gonna do it all the same way.
    00:52:49,358I'm just gonna make a layer called "CC"
    00:52:51,409for color correction, make it an adjustment layer.
    00:52:54,301By the way, someone asked me why I don't ever just say
    00:52:56,869new adjustment layer, and it's because
    00:53:00,292I try to never use this menu if I can remember the hot key
    00:53:04,136and I can never remember this hot key,
    00:53:06,108but I remember this hot key,
    00:53:07,629so I just do that and then click this.
    00:53:10,492I'm gonna color correct this thing as a whole.
    00:53:12,564Now what I can do is I can grab a curve,
    00:53:15,222which is a great color correction tool,
    00:53:17,086and this new version of curves is awesome.
    00:53:19,790I can just kind of crush the blacks a little bit,
    00:53:23,052boost the highlights, and just give it kind of like that
    00:53:25,615filmic S-curve, like that, you know?
    00:53:28,924Increase this contrast a little bit,
    00:53:30,699and then another thing I like to do
    00:53:33,047is go into color balance and push these values around
    00:53:36,794just to get a little more character.
    00:53:39,680Depending on what you're going for,
    00:53:41,004if you're going for like the Matrix or something,
    00:53:44,276you could push a lot of green into the shadows
    00:53:47,117and then pull some green out of the highlights,
    00:53:51,601or push them into the highlights
    00:53:52,771and get this kind of greenish tone.
    00:53:54,561A lot of times I just like to put
    00:53:55,612a little bit of blue in the blacks.
    00:53:59,002If you click preserve luminosity,
    00:54:01,899it's gonna really give you a lot of contrast.
    00:54:04,499Sometimes I do that, sometimes I don't.
    00:54:06,092I don't think I'll do it in this situation.
    00:54:08,376You can see that just by adding some blues to the shadows,
    00:54:11,200it just gives it a little bit more of a filmic character.
    00:54:18,536The highlights, I don't know maybe I'll add
    00:54:20,427a little bit of green to the highlights
    00:54:22,316just to kind of reinforce that nice green color.
    00:54:26,073Then anyone who's ever worked with me knows
    00:54:29,659that I am a serial vignetter and so what I'm gonna do,
    00:54:35,375I'm just gonna throw a levels effect on a color correcter
    00:54:37,973and I'm gonna push the gamma down
    00:54:40,116and then I'm gonna draw a shape like this,
    00:54:45,074invert that mask and feather it
    00:54:46,645just to give my whole composition
    00:54:49,135a little bit of that vignette around the edges.
    00:54:51,644Because I did all of this color correction
    00:54:55,280over the whole scene, it's just gonna help
    00:54:57,726tie everything together even that much more.
    00:55:01,321Cool?
    00:55:02,154Another thing I didn't do in this case
    00:55:04,329is try to match the grain of the keyed footage
    00:55:08,634to the background footage.
    00:55:09,659That's another step you can do.
    00:55:12,025I don't think you're gonna get much out of it
    00:55:14,164given that you're gonna watch this
    00:55:16,024heavily compressed on Vimeo,
    00:55:17,597and you're not gonna really be able to see the difference
    00:55:19,520but the bird was shot on the red camera,
    00:55:22,508the background was shot on Canon T3I,
    00:55:25,530so obviously the grain profiles are gonna be
    00:55:27,566very different on those two cameras.
    00:55:30,215You can use the add grain effect
    00:55:31,476to try and match the grain on the bird
    00:55:33,381but for the most part, you're not gonna notice that,
    00:55:37,226especially for a tutorial.
    00:55:39,607We have covered a whole crap ton of stuff in this video,
    00:55:43,501and I hope you guys were able to absorb a lot of it.
    00:55:48,214Compositing stuff together,
    00:55:50,085it's not just for visual effects.
    00:55:51,811If you get good at this, this will also make
    00:55:54,086your motion graphics pieces look better too.
    00:55:56,752Just training your eye to see
    00:55:59,233subtle little differences in color
    00:56:01,241and just knowing when things don't match
    00:56:03,343and knowing some little tricks
    00:56:04,619to kind of help them sit in the scene better,
    00:56:06,451all those things are gonna help your 2D animated pieces too.
    00:56:11,795All of those skills cross over.
    00:56:14,081Thank you guys so much for sitting through another long one,
    00:56:16,684I really appreciate it, and I love you guys so much.
    00:56:18,679Thank you, I will see you next time.
    00:56:21,826Thank you so much for watching.
    00:56:23,344I hope you learned a ton about keying, tracking,
    00:56:25,959and compositing in these lessons.
    00:56:27,648I wanna say thank you to Ringling
    00:56:28,881for the use of the green screen studio and the red camera,
    00:56:31,651and I wanna say thank you to the Orioles
    00:56:33,197for allowing the use of the footage of their mascot.
    00:56:36,030If you have any questions or thoughts about this lesson,
    00:56:37,946definitely let us know.
    00:56:39,253We would love to hear from you
    00:56:40,899if you use any of the techniques
    00:56:42,821from this lesson on a project.
    00:56:44,583So give us a shout on Twitter @schoolofmotion
    00:56:47,311and show us your work.
    00:56:48,416If you learned something valuable from this video,
    00:56:50,026please share it around.
    00:56:51,426It helps us spread the word about School of Motion,
    00:56:53,954and it means a lot.
    00:56:55,255Don't forget to sign up for a free student account
    00:56:57,061so you can access project files
    00:56:58,512from the lesson you just watched,
    00:57:00,187plus a whole bunch of other very cool stuff.
    00:57:02,839Thank you so much, and I will see you next time.
    00:57:06,313(tapping)
    00:57:09,055(upbeat music)