Keying and Tracking in After Effects: Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- What's up? Joey here at School of Motion and welcome to day 21 of 30 days of After Effects. Today's video is part two of the series where we are taking the Baltimore Orioles mascot and we are inserting him seamlessly into my backyard. In this video, we're gonna talk about keying, getting a good key and integrating that keyed footage into the background and making it sit in there with color correction and some other tricks. I want to thank the department of Motion Design at the Ringling College of Art and Design for getting permission from the Orioles for me to use the Orioles' mascot footage and for shooting this on their red camera in the green screen room at Ringling, which is awesome. Don't forget to sign up for a free student account so you can grab the project files from this lesson as well as assets from any other lesson on this site. Now, let's hop into After Effects and let's do this thing. In part two, we are now going to finish this composite. If you remember in the last video, we patched our background plate and we removed the little pink chair that was sitting there and we got a nice track on that chair so that we could actually translate that information onto another layer. Now we're ready to grab our green screen clip and key it out and insert it there. Here is the clip, and it's ... I'm actually just gonna make a new comp with it. Stick it down here and we'll call this "keyed bird." Now the way I approach keying it sort of depends on what it is I'm keying. The basics of keying is that you wanna break a key into a few different pieces so that way you can just sort of work on certain parts of the image with certain types of keys. There's a lot of different strategies. I'm gonna show you one that works pretty effectively in most situations. This is the clip right here. All right, and it's always a good idea to just kind of scrub through it a few times and figure out if there's gonna be any issues with it. I can see one issue is if I let it go too far, his feet actually break the frame so I definitely wanna make sure I don't use that part of the shot. I'm just gonna put an out point here. Then let's go to the beginning here. At the beginning of the shot, if I use this part, the problem would be that there's a big shadow on the green screen here and it's a different color green now than the main part of the green screen and so that would create a little bit of an issue. I mean, it's solvable but it would just create more work. I might as well save myself some work and not use any of the shot before this frame. I'm gonna hit B, I'm gonna Control click here and say trim comp to work area. Now this is all the clip that I'm gonna use. The first step that I do is to do what's called a garbage mat, and that's just a mask that's very, very rough and it just cuts out all of this junk. You know, the lights and the stands that are in the shot that you obviously don't want. This was shot on the red camera and then the footage was transferred down to a pro res file. You can see that the frame of the red actually is a little bit narrower than 16 by nine, so that's why you have these black bars at the top and the bottom and I obviously don't want those either. I'm just gonna sort of scrub through and figure out, okay. Right about here is where I can cut off the frame and then on the left side right about here. I'm just gonna draw a quick mask and I'm not going to be very particular about this because this is just step one. In step two, we're actually gonna make our mask much, much, much, much, much more accurate. All right so let's finish this mask and then just scrub through and make sure that the actor or the character or whatever you're keying doesn't leave the frame at all, and I can tighten this up a little bit. But it doesn't have to be very precise. Let me talk briefly about the shadow here. The shadow, if I pull this mask out you can see that I might actually be able to keep the shadow that was cast on the green screen floor and composite that onto the grass. The problem is that the shadow, you know, it's a long shadow and it runs kind of off the frame and it actually runs into this light stand here. If I wanted to use that shadow, I would manually have to feather it. I sort of made a decision early on that I was just gonna get rid of the shadow and just make a new one. I'll show you guys how to do that. Just so you know, that's why I don't really care that this mask is cutting the shadow off. Now that we've got that, let me pre-compose this layer. I'm just gonna hit Shift + Command + C, make sure I move all attributes into the new comp and we can call this "bird clip garbage mat" just so I know what step this was. All right, so now we've got a very rough garbage mat. Now I want to eliminate as much of the green as I can and make a very, very tight garbage mat. What I mean is, when I apply my keyer, we're gonna use the effect called Keylight that comes with After Effects and when I use that, I want Keylight to only have to worry about pixels very, very, very close to the bird. The reason that's important is because the way this was lit, this was lit pretty well, you can see that the color of the green screen all the way around the bird, even mostly on the floor is pretty consistent, but over here it starts to get really dark. Then by the shadow it starts to get really dark and even, you know, it's just the way lights fall off. The edges of your shot are gonna get a little darker and so you don't want Keylight to have to knock those pixels out. There's a cool trick I learned and I actually learned this and I apologize, I can't remember the teacher's name, but I learned this on an FXPHD course and I'll use this opportunity to plug them. If you wanna learn visual effects and compositing, FXPHD is incredible, I've taken a lot of their classes and they're amazing. This was a little trick I picked up from them. You can, now here's one kind of annoying thing, the effect I'm gonna use to do this, it used to be in the keying menu here and I believe since Creative Cloud came out they've moved it into obsolete and it's called color key. I'm guessing the reason they moved it there is because it is the world's crappiest keyer but what's great about it is it renders almost instantly. It's very fast and so it works really well for what I'm about to show you. The color key, you just grab your eye dropper, pick a color pretty close to the bird. You can see, perfect our key is done. Then you need to adjust the color tolerance. When you increase the tolerance it starts to eat away more and more of the green and you can see it just looks awful. This is a terrible keyer but there's a pretty cool trick you can do with it. Before I go any further, I'm gonna add a solid layer behind the bird and it's already this nice pink color because I obviously did this before I recorded the tutorial. What I usually do when I'm keying is I'll take a really, really bright contrasting color and I'll stick it behind my subject. Then I'll make it into a guide layer so it doesn't actually render. The reason I do that is because now if I increase this tolerance, and the goal is to get rid of all of the green, okay? All of it. The problem with getting rid of all of it is that, and I mean it doesn't have to be all of it, but just most of it, right? Most of that green is gone. You can see the problem that creates. It eats away at your footage too. Because now this tolerance is very, very high and it's working well on most of the bird but on the socks, right near the whatever these things are, down by his feet. It's eating away at them and you can see through them, but if I didn't have this color back there, right? If I had this background set to black or something, it wouldn't be as obvious that that's actually a hole. I might think that actually that's supposed to be black. By putting a pink color there, I can see the holes. Now that I've done this, and just to show you this effect, I mean it renders so fast, that's why I like it. Now that I've done that, I can use this edge thin parameter and I'm gonna pull it backwards as far as it goes, okay, to negative five. What that does is it brings back the information on the edges and you can see now I have, there's still a little problem down here by his foot, if you look down here. It's still eating away a little too much of his foot so I'm just gonna bring the color tolerance down until, there we go, until that hole gets filled in. Make sure there's no other holes in the footage anywhere. That trick gives you the world's tightest garbage mat in like five seconds. This is great because the color that is around him is gonna be way more consistent than the color of the entire green screen. You can see over here, you're getting a little schmutz, right? And it never actually intersects him so I can actually get rid of that really easily by just drawing a little mask like this and setting it to subtract. Then you can see that the floor is showing up here so why don't we zoom into that and do the same kind of thing. Oh, I actually started drawing a shape layer. Make sure you have your layer selected. Then we can just select that little piece, set that to subtract, and then the shadow I'm not gonna worry about for now. We can always come back in and mask that if we want to, but at least for most of the footage, we now have a great mat. Now I'm gonna pre comp this. We'll just call this "bird clip better mat." Now I am ready to key it. I usually break keys up into two pieces and what you really are focusing on when you're keying something is the edge, that is the most important thing. I'm gonna go into full res so you can see the edges. You know, when he's waving the bat around, for example, let me find a good frame. What you're really concerned with with keying is trying to keep motion blur and stuff like this. If you do a key and you sort of eat away at your footage too much, it's gonna give you these crisp edges and it's not gonna look very good. You're gonna wanna try and maintain the nice softness of those edges. The problem is if you're maintaining the nice softness of the edges, you might also be leaving some holes inside of your mat that you're creating. I'll explain what a mat is for those of you that don't know. What I generally do is I break my key up into two pieces, at least two pieces. A core, where I'm really only concerned with getting a good inner part of my key. Then an edge key, where I'm only concerned with what the edges are doing. Let's start by making a core key. I'm just gonna rename this "core." Now we'll apply Keylight. Keylight is in the keying menu. Let me get myself a little bit more room here so we can see this bird better. Hey look at that, a comment! That's awesome. I should've turned that off, let me turn that off there. Okay. Here's what you do, here's the way Keylight works. You start by selecting the screen color and that just means, and I like how they spell color, the British way, and you just use the eyedropper and you pick a green and there you go. You're done, look at that! All done, one click, all right? Now not really. You can see that there's some holes in him down here and there's some garbage going on with his feet and all that kind of stuff. Here's the thing about keys. When you just look at it like this, you might think, "Oh, well the top of him is done, look at that." Well, it's fooling you, all right? You can't just trust your eyes when you're keying, you need to actually look at the mat. Here's what the mat is. If you click on this view option right here and go down to screen mat, this shows you the black and white image that Keylight is creating and the white pixels will be kept, the black pixels will be knocked out, and the gray pixels will be transparent. Look very closely. There's gray pixels all over him and there's noise in those gray pixels. The problem is you will see that when I composite it over footage. Okay? Although the edges of this look awesome, right? There's nice soft edges and the motion blur is still sort of maintained, we have holes in this map. These gray pixels are holes. On top of that, we may also have some pixels on the fringe that are not being totally knocked out. To my eye, it looks like they are, but I don't trust my eye. There's this cool little thing you can do in After Effects. This little number down here, this is the exposure that After Effects is showing you for your comp. By default it's at zero, but if I crank it up like this, it's now sort of artificially brightening everything. These pixels are actually not being totally knocked out and you may say, "Oh but I can't see them," well the problem is when you composite it and you start color correcting, all kinds of weird stuff will happen if you're not worrying about getting rid of those pixels. What I do is I crank this up a little bit so I can actually see those pixels. By the way, it works the other way too. If I crank it down, it makes it a little bit easier to see the gray pixels in the white areas. Adjusting this exposure is a great trick when you're keying. What I need to do is adjust my screen mat settings. The two that you adjust most of the time are clip black and clip white. These pixels should be black, and they're not so I'm gonna adjust the clip black. This number is basically telling Keylight what is the minimum value, or sorry, the maximum value that I will set to be to black. Right now, if a pixel has a value of zero, it will be black. If I set this to five, it will say well, if a pixel has a value of five, I will set it to black. I can just knock this up. You really wanna be as delicate as possible. You don't every wanna just, you know, you don't wanna just do this, okay? Just say, "Oh there you go, that looks good." You actually wanna use your arrow keys. Go up until that's gone and then hold the Command key and go down, and when you hold Command and use the up and down arrows, it moves this number in smaller increments and you wanna find the absolute minimum number necessary to get rid of that stuff. Don't worry about the ground right now because what we're probably gonna end up doing is doing a core key and an edge key for the top of the bird, and then a separate core key and edge key for the feet. That's how we're gonna get rid of this and make the feet look good. Now we've gotten rid of all the white pixels that should be black. Now let's adjust our exposure back down and you can see there's all these holes. A ton of gray pixels here. To fix those, you adjust the clip white. I'm just gonna start moving this down and you can see that I have to really, really crank these numbers in order to get rid of all those holes. Now I've gotten rid of all the holes up here, there's no more pixels that shouldn't be there. If you wanna reset the exposure, you just click this button right here. Now if I just hit space bar, now here's one thing that is kind of a big issue. If we look at the original footage, let me set the view to source for a minute, that baseball bat is super duper shiny. It's reflecting the green screen, and there's not gonna be an automatic way to fix that so that is a situation where you would probably need to create an animated mat to fix that. You'd have to just sort of go frame by frame and wherever you need to see the bat but there's green in it, you have to mask it out manually. It's called rotoscoping, it's awful. Or sometimes, you can get away with it because if you think about why you're seeing green on that bat, you're seeing it because the bat is shiny. Whatever environment this bird and the bat are in will be reflected in the bat to some extent and so you're gonna see through this part of the image, but the visual effect may actually just look like whatever environment the bird's in, you're seeing reflected in the bat. I hope that makes sense. If you look, if we actually go to the final comp and we go to ... I'm not even sure I even used a piece of the footage where that's happening, but you know, there's probably holes in the bat at some point in here, but you don't really notice them because all it's gonna do is gonna reveal very subtly the footage that's behind him and it's gonna look like a reflection. So it's gonna be okay. It's gonna be okay. All right so now let's go back to our, let's go to our final result now. When you're on final result in Keylight, there's a few things happening. The way Keylight works is first, it creates a mat for you, that black and white image, then it applies that mat. If you wanna see what that looks like, just look at the intermediate result. That's showing you what it looks like and the problem with just stopping with the intermediate result is that a lot of times, you get sort of this green cast on the pixels and that's because, it's called green spill, and it's just inherent when you're shooting green screen that the green paint is gonna reflect up and bounce up and sort of add this green tint to pieces of the footage. So when you have final result turned on it does some stuff to try and take that away. Usually that's what you wanna just do, is put it on final result. If you played this, right? Remember we really cranked these settings. The problem is, like look at his hand. If I zoom in, look at the shape. It's like this super hard edge, and if I look at the original source footage, you'll see that there's actually some softness to this because he's moving, and that softness has been just destroyed by how much we've had to crank the settings. If we go to final result, look right here. Look at this area, and then we'll go back to source. You see how there's these nice little details that you wanna be able to keep, you know, the softness of this mascot costume but because we've cranked the settings so high, we're losing that. This mat is really good for a core, and here's the thing. I want to basically erase the edges here because I don't wanna do a separate key for the edges, I don't want to have to, you know, I don't wanna have to try and fix this one. What I'm gonna do is I'm gonna use this screen shrink and grow setting. What this does, if I just crank it back where you'll see it eats away at your image, or it can grow it back out if you want to. Here's what I want to do. I want to shrink it by one pixel, minus one. It just eats away at one pixel, and that's it. The reason I'm eating away at that one pixel is because now what I can do is I can just set up another copy of this layer and only key it out so the edges look good, and there's gonna be a bunch of holes in it but that's okay because right underneath that layer is gonna be this layer which has no holes. Let's duplicate this layer and let's call this "edge." Let's reset Keylight. Now we have a brand new key ready to go. What we're gonna do is we're gonna just grab a screen color like this, okay. Now, if we come in here and take a look, you can see that with that edge mat, when I turn it on and off, it brings back the softness, it brings back those nice edges. Underneath it, and here's a good way to check this too, if you turn off this layer for a minute, another thing you can do is you can just set your background color, Command + K, you can just set your background color to this too instead of doing a guide layer. The advantage there is that if you hit option four, it will show you your alpha channel. I can turn the edge key on and off and I can see the effect, right? If I just have this edge key, you can see all these gray pixels in there. Once I turn my core key back on, it fills them in for me but I don't see those crummy edges because I shrunk that map by one pixel. Now I'll hit option four again and bring my color back. We still need to check the screen mat for this key, okay? I'm not concerned at all with these gray pixels, but what is gonna be a problem, and I'm gonna crank up this gamma here, or the exposure, sorry. I am concerned that there are still some pixels right on the edge there that you're seeing. It's showing you all of these pixels here and what Keylight is doing is it's actually looking at the original footage. If we look at the source, and I turn this exposure back down, remember we have a garbage mat on here so even though Keylight is showing you pixels out here, really all you need to worry about are the pixels right here around the edge. If we go back to our screen mat, crank up the exposure, I do need to make sure there are no pixels here, or that there are very few pixels along the edge. You can get away with a little bit, but not too much. Let's go to our screen mat, and I'm just gonna nudge the clip black, and I only want the absolute minimum value that gets me a decent result, okay? Let's take a look at this. Now you could still see some schmutz there, but only when I really crank the exposure up. All right so if I reset the exposure, it looks completely black, and we're just gonna have to see this in context before we know if we're in good shape. If we now go to final result and we take a look at this key, and when you are keying, and you're checking your results, you need to do it in full res to be able to tell if it's working, okay? It looks like we're in pretty good shape. Now there is, I just noticed, there's a little hole right here happening in his pupil, which is kind of funny, and it's only in that one little spot it looks like. I'll show you how to fix that, that's actually pretty easy. What you can do, and actually the first thing we should do is figure out where that problem is being introduced because we have a few things going on here. If I turn Keylight off, well you can see the hole is still there. What that tells me is that that problem was introduced here when we did our color key. I am going to, I'm actually just gonna duplicate this layer, delete this effect, and just draw a little mask around his eye. There you go. I've got masks all over this thing so let me delete the other two masks, there we go. All I did was just make a little patch and I only need it for a few frames. So let's see, so right there, that's the first frame. I hit option left bracket and just trimmed it to there. Then we're gonna go forward and then it's gone by there. So that's it. Now if I turn this back on, and I can ... I can adjust this mask a little bit, make it come over a little bit further to the right. There we go. Cool, so now that hole is gone. No, it's not, it's still there. Look at that pesky thing, oh my goodness. There we go, now it's gone. All right and it looks like I am unfortunately gonna have to animate my mask a little bit. That was pretty quick and easy, there we go. Problem solved. Now we have no more hole in the bird's eyeball. We've got a good core mat, a good edge mat, we're maintaining that motion blur there which is awesome, and what we don't have is a good key for the feet. What I'm gonna do is I'm gonna do a separate key for the feet. Now that we've got a good core mat, a good edge mat for the bird, I'm gonna pre comp them, and I'm gonna call this "bird top." Wow, I really hit that p hard on "top," didn't I? I'm gonna duplicate "bird top," I'm gonna call this "bird bottom." I'm gonna move "bird bottom" down here like this. Now I've got two copies of the same key and what I wanna do, let me turn off bottom for a second and I'm gonna grab my top layer, I'm gonna hit Q, bring up my mask. I'm just gonna put a mask say right around there. So this part of the key is great, that's fantastic. The bottom is not, though. What I can do now, I'm gonna make this a little bigger. I'm gonna copy this mask to the bottom layer, open up my mask and set this one to subtract, okay? What you'll notice is that even though these are the exact same masks, you're gonna get this little one pixel thing, so take that bottom mask and just nudge it up a couple pixels and that line goes away. Now I can come into this "bird bottom" comp and I have a core and an edge layer ready to go and I can just turn edge off, reset for my core layer, and now I can just do a key for the feet. This is gonna work better because now I can pick the color of the floor and it will work much better. Let's zoom in, I just picked the color for the floor, let's take a look at our screen mat and you can see we've got a lot of pixels that shouldn't be there and then a lot of pixels that should be there. We'll just go to our screen mat settings and I'm gonna first crank the white, and you've really gotta crank it to fill in those holes. Then I'm gonna crank the black, all right. You can see that now we've filled in all the holes, and we've gotten rid of all the junk, but this just looks horrific and that's because these numbers are so high, they're just so cranked. These edges are just gonna look like garbage. I can also see that there's problem down here in the socks still, which I'm guessing is probably still coming from this comp here, so maybe what I need to do is actually adjust these settings a little bit more, there we go. There we go, okay cool. Real quick, lemme just make sure that didn't screw up anything on the top. It shouldn't have. Looks okay. All right, so now we've got a good core, a core key for the shoes and remember we need to shrink it by one pixel and then do an edge key, all right. Let's grab a color of the floor, turn Keylight back on, reset this, there we go, and go back to our screen mat. What I really just wanna make sure I do is get rid of any extra schmutzy pixels. I don't care about the holes anymore, I just wanna try and get rid of as many schmutzy pixels as I can. One thing that's happening here is I'm having to crank this clip black quite a bit, a little bit more than I'd like to. Sometimes a good thing to play with, just to see if it helps, is the screen balance setting. What this does is it sort of alters the way Keylight works based on the color of the screen. So if it's a blue screen, the screen balance value you wanna use is gonna be different than for a green screen. Normally, the default value works pretty well for green screens but sometimes if there's a shadow like that, it's altering the color, so it can help if you just kind of scrub this one way or the other and see. You can see as I push it towards zero, it is doing one thing I like, which is sort of darkening these pixels, but it's also doing something else I don't like which is it's making the edges crummy. I'm gonna leave that a 50 and unfortunately I think I'm just gonna have to have this thing cranked. Let's have a look here. Let's see what we got. Now we've got decent edges, much better than the core. We'll go to final result, we'll take a look at that. This is much better now. Again, you're seeing some weird stuff up here at the top because this key does not work well for the top of the bird but it works better for the bottom. We've managed to get rid of, it looks like most of the shadow. If I look at the alpha channel, I don't actually see that shadow anymore. If we now go back to our keyed bird, remember which has our good top key and now our decent bottom key. If we look at it, you can see you know, there's some stuff down here I'm seeing that I'm not loving, like when you stop on a frame where there's a lot of motion blur, I'm seeing some it looks like some pretty hard edges here and I am seeing a little bit of that schmutz still show up. I'm gonna go back in here, let's go to my screen mat. Let's just hit that black a little bit more. Let's see if that helped. That helped a little bit and I wonder if it's coming from the core mat. Let me turn my edge mat off for a second and go to my screen mat. Maybe what would help is if I just erode this two pixels, let's try that. There we go, that got rid of that. Then you can even use this screen softness, I could blur the edges by a pixel which will help it blend in more with this edge layer. The edge layer is getting a little weird too. So because this is only for the bottom of the bird, I'm not as concerned with the fidelity of the edges as I am with the top, because your eyes are gonna be looking up here, not as much down here. What I can do is even on this edge mat, I can maybe soften the edges a little bit. Let's put a one pixel blur on them and then shrink it by one pixel. All right now let's go back here and take a look. Really, the big test is gonna be when you put this over a background, if you notice anything jumping out at you. That's the real test. I have a feeling that this is gonna work pretty well now. I know that all of these steps, they may seem kind of tedious and it's very tempting to just try and click Keylight on there and mess with the settings and say, "I'm done." In my experience, it almost never happens. You almost always have to do at least this amount of work to get a good key or at least one that you know, a visual effects supervisor will okay. Now that we've got the bird, if we've got our keyed bird comp here, let's go into this comp here and let's just drag our keyed bird right in there. I'm gonna put the anchor point somewhere around his heel, basically where his foot's making contact with the ground. I'm gonna turn off this solid, actually I'm just gonna delete it. Let me turn off our patch layer for a minute and I'm just going to adjust the bird's position making sure that his feet are on the ground pretty much exactly where that chair is because that's what we tracked. So if I for example, if I move the bird here and make him closer to the camera, he's not gonna track correctly. It needs to be right where that chair is. I'm gonna scale him down a little bit and then I'm gonna turn the patch back on and parent the bird to the track. Now we'll RAM preview it and we'll see what we got. Now you're seeing the bird on screen before we actually have the track. Actually first, let's go back to the first frame where you should see him, which is this frame and I'm gonna hit option left bracket, and so now that bird layer does not exist until we have good tracking information. All right, so while this is RAM previewing let's talk about some of the issues that we're gonna have to deal with. The track actually works pretty well, and it's actually kind of amazing because if you remember in the last video, it didn't take very long to get a good track and to patch this, so that we don't have to worry about. A big, big thing whenever you're compositing is you need to match the colors. Here's what I mean by that. If you look at the color range of this scene and you look at the bird, the bird sticks out. He doesn't look like he fits in there. It's kind of hard to say why. One thing is, he's not casting a shadow and other things are casting a shadow. So we'll deal with that, that's not a problem. What we are gonna have to do though is make his color match, you know if he was really standing outside would his suit really be this dark? Would this orange beak really look that color? I'm gonna show you some strategies to color correct this. Color correction is so important when you're doing keying. What I like to do is first, I like to go channel by channel. When you're using color footage, this makes it a lot easier. The reason I go channel by channel and maybe you guys don't know what that means, let me explain really quickly. This image you're looking at has three color channels, red, green, and blue, and you put them all together and you get a nice picture like this. You can look at each channel individually by clicking this button. Red, green, and blue, okay? What's cool about this is it's a lot easier for your eye to look at a black and white image and judge it critically than a color image. There's something off about this bird and I can make guesses as to what that is, but if I look at the blue channel, I can see holy crap, the blue channel is so much darker than everything else in the scene. If you look at the actual composite image, by the way the hot keys for this is option one, two, three show you red, green, and blue, and then if you hold option and hit three again or whatever channel you're on, it'll bring you back to your composite image. He's wearing a black suit and you know, but there's light hitting it and his black suit is as dark as these shadows which have no light hitting them. Really it should probably be closer to this color, this is a metal frame that's a pretty dark kind of grayish brown color. His suit shouldn't be as dark as it is, it should be a little bit brighter. Here's what we're gonna do. We're gonna go channel by channel. I'm gonna hit option one, we're looking at the red channel. What I'm gonna do is I'm gonna put a levels effect on my layer and you can just sort of eyeball it. If you understand how the levels effect works you can just kinda look at it and try and judge what's going on but that takes a little practice. There's actually a way to help yourself out. Here's what you could do. Hold your mouse over a very dark pixel on the bird, somewhere in here, right? While you do that, look right here on your screen in the info panel. If you don't have the info panel open, go to window, make sure info is checked. When you hold your mouse over it, it's gonna tell you the red, green, and blue values of that pixel. I see the red value of these pixels, it's in the low teens, a couple of them get up to 20, but really low teens. If I come over here and I put my mouse here, the red value of this is in the 50s, almost 60. This is in the teens, this is about 60, there's about a 40 to 50 level difference and so what I can do is I can adjust the output black up by basically the difference between these two. So if I adjust it by like 30, it's now gonna bring this now into the 40s, it's raised that black value by this number. You can use that to make the blacks match, okay? There are some things on this bird that should be totally black. The shadow underneath his foot should match these blacks. I don't wanna actually crank the output black that much but I do wanna crank it maybe half that, okay? If I just turn levels on and off, you can see that just doing that, it sits in there better. Then you do the same thing with white. He's got a very bright orange colored belly here and then down here, his socks, if we look at the color, at the actual color thing, his socks have this white kind of piece on them, and his eyes are white too and there are white things in the scene, like the clouds and my neighbor's patio. You basically just need to decide how bright do you think this piece of his leg should be. Should it be as bright as this piece of this house over here? Well that piece, that pixel has a value of 180 in the red channel, and his sock only has a value of 160. What I can do is I can change the input white down by the difference. There's a 20 value difference, so I'll just say minus 20. Now this pixel has a value of 170 and this pixel has a value of 190, so I need to do it a little bit more. I like to just kind of eyeball it and just kind of squint my eyes and de-focus a little bit. The main ones you're looking for, the output black is gonna raise the level of your blacks. The output white is gonna lower the level of your whites. If something looks too bright, this is the one you're gonna knock down. That's not happening though. Then on top of that, if you don't have enough white, and that was the case, you can adjust the input white. If you don't have enough black, you can adjust the input black. This middle arrow is the gamma and this is just sort of an overall adjustment, you just kind of adjust it to taste. Now our red channel sits in there much better. Now let's move to the green channel, we'll do the same thing, and I'll do this a little bit faster. He looks way too dark in here. Now the black level doesn't look too, too bad but I'm gonna knock it up a little bit. You need to make sure, by the way, I made a big error here. You see how I've been adjusting these arrows here? What I need to do is I actually need to set levels to the channel I'm looking at. So I'm gonna reset this, go to the red channel and I'm just gonna very quickly redo what I just did. Which was bring the black output down, bring the white input up, and then I adjusted the gamma a little bit. Cool, all right. Now I'm gonna go to the green channel and switch the levels effects to the green channel and now I'll do the same thing. It looks too dark here, so I'm gonna start by boosting the gamma. I'm looking at his sock here, it's got a green value of 150 and over here this house has a green value of 190. I think again I need to really crank the white level, or the white input up on the green channel. Then his beak looks a little bit dark, and that's kind of a mid-tone. When you wanna affect mid-tones you can push the gamma a little bit and when you do that, it's making the blacks look a little bit muddy so now I'm gonna use this black input arrow and just knock it down a little bit. That's sitting in there much better now. Then we'll go to the blue channel and the blue channel is kind of a mess so let's switch this to blue. It's just way too dark so I need to knock this blue output way down like this. I'm just kind of squinting and I'm saying, "Okay, does that now sit in there better?" You don't really have any contrast to this either, so I'm gonna crank this white input up quite a bit until it starts to look right. All right, so now you saw how it wasn't that hard to judge if this thing is sitting in there correctly when it's black and white. Now let's switch back to our color, okay? This works so much better now. Let me turn levels off and on. Look how much better it sits in that scene. The colors make sense now, you know, and we did a bunch of different adjustments to each channel and to actually just sort of eyeball this, you'd have to be a pretty experienced colorist to do this without looking at the individual channels. Looking at the channels makes this so much easier. Now, I mean frankly that's working pretty well. You can then switch this back to RGB and make some overall adjustments. His bat still feels a little dark, he feels a tiny bit dark overall. I could try pushing the output black just a little bit up like that and see if that feels better. Now that's actually, that doesn't feel, that feels worse to me. I'm gonna split the difference there. Output black I pushed up to seven, let me set it to three. Then let me push the gamma down a little bit, just a little bit like that. Now at this point I'm just trying to use my eyeballs and use my judgment. That's not bad. That's definitely light years better than where it started. Cool? All right. Now that we've got that, let's add a shadow to this bird. There's a neat little trick I like to do now. This is gonna be made so much easier by the fact that the footage of the bird was shot on a tripod. If we look at this, it's easy to add a shadow to something that's not moving. For the most part, this bird's not moving so I think this trick's gonna work pretty well. What I'm gonna do is duplicate this layer and I'm gonna rename this "shadow." I'm gonna put the shadow layer underneath this and I'm going to delete the levels effect, we don't need it but what we do need to do is add a fill effect. I'm gonna say generate, fill. What I wanna do is pick a color, I wanna look for a shadow that's already in the scene and I like these shadows here cast by the trees because these shadows are basically caused because the sun cannot reach underneath these little shrubs but this part of the grass where the palm trees are casting their shadow, that's probably the same color that this shadow should be for the mascot. I'm gonna grab my color picker and just pick that color, and you can see it's a pretty dark green. Now I'm gonna use an effect, distort CC slant, and this comes with After Effects. This effect's really cool, let me turn the bird off for a minute so you can see. Here's our filled in shadow layer and what you need to do is first tell the effect where the floor is. You can click this little icon, it gives you a crosshair and you can put the shadow right where the floor meets the foot, so somewhere in there. Then you can slant it and set the height of it and create a shadow. What you wanna do is look at the direction the shadows are going, they're pretty much just going off sideways, and it looks like they might be coming a little bit towards the camera. You just wanna try and match the direction of that shadow. I'm gonna set this layer to multiply. Sorry, here we go, multiply. Third times the charm, there we go. Now I can see the grass through it. I need to adjust the opacity of this so that it matches this and you know, it looks like I may want to adjust the color a little bit, but I don't know, that's actually matching the color okay. I think it'll be okay. These shadows are a little bit blurrier and that's happening because they're being cast on grass, they're not being cast on a flat surface. I could do some sophisticated thing where I distort the shadow to try and make it look like it's on grass, or I could just blur it a little bit, and that's what I'll do. I'm gonna use a fast blur and just blur it until it sort of matches right there. All right, and that matches pretty good. Now I'll turn my bird back on and what's cool is because he's not moving for most of this shot, right? For this part of the shot, that shadow sticks right on there. I may wanna adjust the floor a little bit because I kinda feel like, you can do this interactively, it just kind of feels like the shadow wasn't connected to him enough. There we go. Now it's not going to be a perfect shadow because it's not a real 3D shadow and so sometimes you know, you may need to cheat it a little bit one way or the other. Let's see here, let's grab this and move this around. You can adjust the slant a little bit if you need to. You can even nudge the layer over a little bit, just actually change the position of it. It just needs to look mostly correct. I think I did a great job of screwing it up. There we go. Okay, cool. We've got a shadow and what I am a little concerned about is the beginning of the shot where the bird kinda takes a step because this effect can't tell that the bird's taking a step. You can see right there, the shadow makes no sense. You can probably get away with just doing a little key framing, so let's just animate where the floor is and then let's just go back a few frames and let's just move that floor down a little bit and maybe, maybe that's enough. It's moving pretty quick at the beginning of the shot too, so we can probably get away with something like this. I'm just gonna set these to auto bezier so that it just sorta tries to make a nice curve. It doesn't, you're starting to see, you don't wanna see the shadow move so I wanna make sure that I do this quickly enough. Yeah, see, if you can notice it, it's too much and I'm definitely noticing it, so I'm gonna get rid of this key frame and I'm just gonna have it ... Yeah, let's see if that works better. That's better. The good thing is, people's eyes are gonna be drawn to this bird, so if the shadow doesn't match up exactly, it's not the end of the world. You can get away with more than you'd suspect when you're compositing as long as the big things are correct, like the color correction. One thing that I made sure to do was make sure that the sun was on this side of the frame, because that's where the Keylight was. I made sure I held the camera at about the same height that they shot this mascot, so that the perspective would make sense. Now we've got a pretty good result. I'm gonna show you guys a couple other tricks to help you out with this. One thing I love to do is do light wraps because light wraps can really help just glue a composite together. What I'm gonna do is I'm gonna pre comp this bird layer but I actually need it pre comped with the track, I need it moving inside of the pre comp. What I'm gonna do is duplicate my track now and parent this to the duplicate and then I'm gonna pre comp this whole thing and I'm gonna call this "bird key" ... Let's just call it "bird key comp" or something, I don't know. I didn't come up with a very creative name for that. What's cool is now this layer is not moving, it just has that motion baked into it. Now what I'm gonna do is I'm copy my background and put it above my footage, and actually I wanna make sure that I use the background that has been patched. Now I'm gonna select the patch and the background, pre comp those and call that "background." Let me describe what a light wrap is. It's basically the effect of when you have a bright environment, like a sky and a lot of sunlight, some of that is gonna sort of show up on the edges of your subject. If you shoot in a green screen studio, you're not gonna have any of that, but you can fake it. I'll show you how to fake it. I'm gonna duplicate my background and put it above my keyed out bird. What I wanna do is I only wanna see the background kind of on the edges here. There's a neat little trick I use to do that. I'm gonna use an effect called set mat and I'm gonna put it on my copy of my background and I'm gonna say take mat from the layer "bird key comp." Then I'm gonna say invert the mat and if I solo this layer, you'll see what that's doing. It's using this comp that has that motion baked into it and it's cutting out the bird. Now why am I doing that? Well the next step is gonna be to add a fast blur, blur a little bit. Now that's blurring this image over the edges of you know, this cut out. Then I'm gonna duplicate this set mat effect, put it after the fast blur, get rid of the invert mat. Now this is what's being created. It's just a blurred version of the background showing up on the edges. This is what it's gonna do. I'm gonna set this to add mode and I'm gonna mess with the opacity because you don't want too much, you just want a little bit. What this is doing, you'll really notice it if we zoom in, if we go to full res here and you take a look at the hat. If I turn this off, there's no light spilling onto that from the sky, and as soon as I turn that on, it shows up. It's just gonna help him sit in there, and you don't wanna overdo it, this is probably too heavy. You don't need a lot of this. A lot of times what I'll do too, is I'll take this layer, I'm gonna rename this "light wrap" now because that's what this is. By the way, there are effects you can buy that will just do this for you, but this is a pretty easy way to do it. What I wanna do is mask out this effect so it only shows up, let's just use an ellipse tool, the grass isn't going to reflect as much on the bird as the sky, because the sky is this giant, bright thing. You're gonna get some greens kind of bouncing up from the grass on there, so I'm just gonna feather this mask a lot. If I solo it you'll see that what I'm trying to do is just have more of that effect on the top of the bird than on the bottom. There you go, so now I've got a nice light wrap on there. Technically what I would need to do is animate this mask because the camera pans up like this, but that happens so fast that I just am not sure that it's really gonna make a big difference. Let's do a quick little RAM preview here and see what we got. This composite is starting to work pretty well, you know, considering that I can tell you that the Orioles' mascot was not shot for this purpose. It just shows you how a little compositing can go a long way. The last thing that can help just kind of sit things together is to then color correct the entire thing as a whole. Now that I've comped this whole thing together, I'm gonna color correct all of it and I'm gonna do it all the same way. I'm just gonna make a layer called "CC" for color correction, make it an adjustment layer. By the way, someone asked me why I don't ever just say new adjustment layer, and it's because I try to never use this menu if I can remember the hot key and I can never remember this hot key, but I remember this hot key, so I just do that and then click this. I'm gonna color correct this thing as a whole. Now what I can do is I can grab a curve, which is a great color correction tool, and this new version of curves is awesome. I can just kind of crush the blacks a little bit, boost the highlights, and just give it kind of like that filmic S-curve, like that, you know? Increase this contrast a little bit, and then another thing I like to do is go into color balance and push these values around just to get a little more character. Depending on what you're going for, if you're going for like the Matrix or something, you could push a lot of green into the shadows and then pull some green out of the highlights, or push them into the highlights and get this kind of greenish tone. A lot of times I just like to put a little bit of blue in the blacks. If you click preserve luminosity, it's gonna really give you a lot of contrast. Sometimes I do that, sometimes I don't. I don't think I'll do it in this situation. You can see that just by adding some blues to the shadows, it just gives it a little bit more of a filmic character. The highlights, I don't know maybe I'll add a little bit of green to the highlights just to kind of reinforce that nice green color. Then anyone who's ever worked with me knows that I am a serial vignetter and so what I'm gonna do, I'm just gonna throw a levels effect on a color correcter and I'm gonna push the gamma down and then I'm gonna draw a shape like this, invert that mask and feather it just to give my whole composition a little bit of that vignette around the edges. Because I did all of this color correction over the whole scene, it's just gonna help tie everything together even that much more. Cool? Another thing I didn't do in this case is try to match the grain of the keyed footage to the background footage. That's another step you can do. I don't think you're gonna get much out of it given that you're gonna watch this heavily compressed on Vimeo, and you're not gonna really be able to see the difference but the bird was shot on the red camera, the background was shot on Canon T3I, so obviously the grain profiles are gonna be very different on those two cameras. You can use the add grain effect to try and match the grain on the bird but for the most part, you're not gonna notice that, especially for a tutorial. We have covered a whole crap ton of stuff in this video, and I hope you guys were able to absorb a lot of it. Compositing stuff together, it's not just for visual effects. If you get good at this, this will also make your motion graphics pieces look better too. Just training your eye to see subtle little differences in color and just knowing when things don't match and knowing some little tricks to kind of help them sit in the scene better, all those things are gonna help your 2D animated pieces too. All of those skills cross over. Thank you guys so much for sitting through another long one, I really appreciate it, and I love you guys so much. Thank you, I will see you next time. Thank you so much for watching. I hope you learned a ton about keying, tracking, and compositing in these lessons. I wanna say thank you to Ringling for the use of the green screen studio and the red camera, and I wanna say thank you to the Orioles for allowing the use of the footage of their mascot. If you have any questions or thoughts about this lesson, definitely let us know. We would love to hear from you if you use any of the techniques from this lesson on a project. So give us a shout on Twitter @schoolofmotion and show us your work. If you learned something valuable from this video, please share it around. It helps us spread the word about School of Motion, and it means a lot. Don't forget to sign up for a free student account so you can access project files from the lesson you just watched, plus a whole bunch of other very cool stuff. Thank you so much, and I will see you next time.
Info
Channel: School of Motion
Views: 7,874
Rating: undefined out of 5
Keywords: motion graphics, tutorial, Video Tutorial, Compositing, Effect, Track, Key, Tracking, Keying, After Effects
Id: lc7KNJMA_LM
Channel Id: undefined
Length: 57min 17sec (3437 seconds)
Published: Mon Jun 26 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.