Join Amy Leland for an in-depth discussion in this video The Modular Keyer inside of Action, part of Smoke 2015 Essential Training.
In this last video of this section of the course, we're going to take the clips that we set up in the previous lesson for keying the green screen and apply that key using the action effect. If you didn't do the previous lesson to set the clips up. Go back and do that now, and then we'll apply the action effect and key the clip. So, again, with the two clips, the top clip is the clip with the green screen that I'm going to key out. The bottom clip is the moving background that will show through the green screen once it's keyed. I'm going to make sure my focuser is on this top clip.
That's where I want my effect to go. And again you can click on this FX button, right click to add an effect or do the control tab. Pick whichever one you like. We're going to add the action effect. Now this time I'm not going to use any of the controls on the tool bar. I'm going to go straight into the editor to get access to the keyer. When we are keying a clip in the action effect, this is going to work a little differently than what we did before in that it's not going to involve any of our nodes. Inside of the action effect, you have an area that lists all the media inside of the action effect, and lets you apply some effects directly to that media.
That's that button over here to the left that says media, I'm going to click on that. Now I mentioned before that one of the differences between the timeline effective action, or doing action inside of connect effects, is whether or not we can have multiple pieces of media. In this timeline effect, we can. So, we will only ever have this one piece of media. It's still the right place to access the keyer. In this media list, we have a column right here that says K. This is the column that will determine whether or not a keyer is applied to this clip.
If I want to apply a keyer to that clip, I will simply double click where it says k in that media list. And that will bring me into something called the modular keyer. Now, this keyer may seem intimidating at first. But once you take a look at how it simply breaks the keying process down into parts, it will make a lot more sense. When I'm keying a clip, what I am doing is choosing the color range to cut out of that clip. In other words, we shot against a green screen, I want to take everything in that clip that's green and cut it out and make transparency to the clip behind it.
But it isn't so simple as picking just one exact color. I will have to pick a range of colors. And also not cut away areas if they're areas in the clip that are supposed to stay. We have to make a range of selections. And whatever keying tool you're using, whether it's this modular key here in Smoke or a keyer in any other application,. You're essentially making three decisions. What color am I cutting away? Are there ranges to that color that I want to cut away? And what am I doing at the edges of that key? In addition you may want to use masks in order to protect or cut away parts of the image.
Outside of that color correction. In this modular here we will make the decisions about the color and the ranges in this node that says master k. I will make decisions about what happens at the edge using this mat edge, and I can also use the g mass tool to create either mass to save areas or garbage mass to throw areas away. We also have a 2 d histogram if you want to make any sorts of. White corrections to the image as you're doing the keying but i'm not going to use that, this time around. We're going to start this process by making our color selection.
For that I'm going to double-click on this master K node to bring up its controls. And once I've opened those controls, I also want to create a way to see the results of what I'm doing. While I'm working. We did this earlier when we were doing the tracking in the action effect. I want to keep this schematic on screen but also see the results of my work. I'm going to switch my view over here to two up instead of one up, and in this left pane, I'm going to keep my schematic. I'll select this right pane.
I'm going to change my view to the master keyer result. Right now it just looks like my clip because I haven't made any keying selections yet. I also want to be sure I'm seeing the entire clip so I'm going to change my zoom to fit. Now, we are not going to try to pull a perfect key in this key. It can be a little tricky. It's a little push, pull. Something you do that fixes one thing may actually damage something you did somewhere else. Pulling a perfect key is something you can spend a lot of time on. I just want to introduce you to the tools so you have the ability on your own to create well keyed clips.
I just want to make sure my play head is anywhere here that I can see a whole lot of the green screen to help me work with it. And my first step is going to be to sample the color that I would like to use as part of the key. I'm going to click in this key colors in the left hand well which brings me an eye dropper. Which I will then drag across the green. Now, you'll notice it turns gray. There is actually a view for dealing with this key that will make it easier to see what you have selected and what you haven't.
And that's to go to, what's called a matte view. In a matte view, anything I've selected to cut away, will be black or transparent. And anything I've decided to keep will be white for opaque, like in alpha channel. It will make it easier to see the difference between areas that are going to be cut away, and the areas that will be kept. So again with this pane selected, I'm going to switch my view. To the master keyer out mat. I can now see that by simply selecting that green color, I've made a start at selecting that this area will get cut away, and that this area will be kept.
Although I have a lot of cleaning up to do. If we pulled a perfect key, everything that would cut away, would be clean black, and everything we would keep, would be clean solid white. We probably won't get quite to that point, but we'll use some tricks to get us closer. The first thing is, while I'm working on this matte one of the things I ca do is, pull up some sliders that will make some adjustments to that matte, in order to pull a slightly better key. If you click anywhere on the screen, what will come up, will be sliders that will allow you to make adjustments overall, or to various areas of the map. Wherever you click, you will only get sliders that will help you in the area where you clicked. So here, I just get one for the matte overall, because I clicked in that black area. And I can try moving the slider to the left or to the right, to see the effect it has. And what I can see is that, it has a great effect on the area I want to keep, but it si dirtying up the black selection in the background. Like I said, it's kind of a push pull. So I might get this, to where I'm getting more of the area that needs to be kept and is white. But I'll still need to come back and clean up the black. Again, if I click somewhere else, here is an area that should be white but it isn't, I click there, I will get different sliders. If you see more than one slider, they will always be lined up so the one on the top will have the most effect and so on. So, if I start with the one on the top, I can see how I can work with that to deepen that choice there. So again, you can play with these sliders as one way of cleaning up that mat. Now up until now, everything I have done has effected the entire image. In other words, whatever correction I make is being applied to the entire matte. You can also make corrections that only apply to either the part of the matte that should be black or the part of the matte that should be white. Where that comes in is this button that says sampling right now I'm sampling the entire matte. I can switch that to patch one. And then what I want to do, is select pixels that should be either black or white. And Smoke will detect from me, what I'm trying to do.
So for instance, if I click in this black area, you notice it detects right away, that I clicked on an area I thought should be black. So I am now patching in the black. And it actually created a really good patch. If I had more pixels I wanted to select you can also hold down your shift and your control key at the same time to drag a range of selection. But my black patch was actually better before that so I'm going to hit Cmd+z to undo. So that black actually looks pretty good, I'd like to try to work on the white but I need to switch what patch I'm working on to do that. If I come over here and start selecting white pixels without selecting the patch. It's going to assume, I am saying this pixels should be black, and that will mess up my key. I am going to come to my sampling and switch to Patch 2. I will then do the same thing over here. I am going to hold down shift and ctrl and say select these pixels and you notice it starts to clean up my white area as well. Now if I select pixels that start to mess up my other area, I might want to undo that and find other ways to clean those up. Again I'm not trying to pull a perfect key right now, it would take us a long time, but you get the idea. As I mentioned, this master k control helps us with the overall selection and range. But I also want to pay attention to how the white area of my mat and the black area of my mat, or the keyed and unkeyed areas of my clip look where they intersect. In other words, how do things look at the edges. And I actually find this easier to see in my result view. So I'm going to switch this from my out matte. To my results. And what I can see that is that edges of this, you'll sometimes get what looks like a glow. In other words, do I need to pull a few pixels back here, so I am not getting this glow around the edges or soften the edges so they are not so jagged. In order to get that, I am going to double click on this control for matte edge. And what I want to take a look at is what happens if I change what's happening at the edge of my matte selection. So for instance one of the things I might do is I might shrink the matte back a few pixels. Let's take a little bit off of where these edges are. And when I turn that shrink on what you can immediately see is it basically took back a few of the pixels out of the selection.
And it takes that glow out of there which really helps. You can also change how the matte and the background are going to interact with one another by blurring the matte. So if I blur the matte, it just softens the edges a little bit, and you don't see quite that, pasted on effect that you get with a clip that isn't quite keyed properly. And you can, of course, change how much that blur is. And say, well maybe don't blur it quite so much. So you can work with those edge controls to change how this looks against the matte. And again, I'm going to select this side, and change my zoom to fit, just to see how things are looking.
And this black area is where the clip is going to show from the track underneath. It's starting to look better. Now, the last thing I want to talk about is masks. Now, in this particular clip, this will be a tricky clip to mask because there is so much camera movement in this clip. Any mask that I created, I would have to also animate to match the camera move, which I don't want to get into in this video. I do want to show you how to draw a mask though because it's a little tricky, and I want you to know how to do this for your own clips. I'm going to double click this g mask control.
And what I want to see over on the right is instead of the result, I want to see the g mask result. And that takes me back to this matte view. Which I'm going to set to fit. So, let's say I wanted to try to mass away this area, I said, you know, I wasn't able to correct it with the patches maybe if I massed over that area. When you want to add a mass you first of all must be in this mass result mode. And then you can click on Add under Object to add a mask object.
And when I click that add I now have a cross hairs for drawing points. I'm going to click and just draw a mask around this object. And when you're done drawing, you click on the first point that you drew to close that mask. And now that area is solid white. That's made a nice mask to say, no, you know what? Do include this as part of the clip that doesn't get keyed out. As I said though, as this playhead moves, that mask isn't going to go without it. So I would need to animate that mask to stay with the thing it's masking out.
So I'm going to undo creating that mask. The other thing I want to show you is if you'd like to create a mask in the area that's keyed out so in other words a garbage mat. I want to mask something to make it go away. There's one other thing you need to do to the mask, so if I again click object add and I'm going to draw a quick mask. And when I am done, close it. You'll notice by default that our mask is set to keep something. In other words, make this a white part of the matte so it'll always be there.
If you want to use a mask to say no, throw that part away, make it part of the black part of the matte. You just need to come down here to your mask controls and the color 100 which is 100 for white. Click on that to change it to zero for black. What's inside of this mask would now be cut away instead of kept. But again, I would have to animate this to stay with my clip which I don't want to do right now, so I'm going to hit undo once to change the color. Wants to get rid of the mask. So again, with our key, the idea is use your master k controls to choose the colors that are cut away. The matte edge controls to determine how the edge of the matte reacts.
And the g mask if you want to create masks to keep or cut away part of the clip. And then I am going to go to the result. And what I see here is that even with just this quick keying job, I now have this black empty area where the background clip is going to show underneath. It's not a perfect key. And especially on these metal panels over here where the green was reflecting, I would need to do. Some work to clean that up. But we've got a good start on a key. I'm going to return back to my action effect. I'm then going to exit back to the timeline. And what I have here on the timeline is my keyed clip, but I can't see my background clip.
We mentioned this the first time we did an action effect. Rather than using this comp to composite the two clips together. I want to make sure I have this action effect active and I'm going to use this option to use the back. When I click use back, there's my background clip inside of my keyed clip. I have now keyed this clip, and that background image that was animated to match into that area now sits inside of my keyed area. And I can see it back there. So again, there's a lot more work we can do on that key but you now see a good basic rundown of the tools inside of the modular keyer and how to apply that key through the action effect in your timeline.
- Creating a project and user
- Importing and organizing media
- Editing in the timeline
- Trimming in the timeline
- Connecting scenes with transitions
- Using timeline effects like 2D Transform and Action
- Color correcting
- Adding 3D objects to a scene
- Working with titles and 3D text
- Exporting your final project