I am using after effects and I want to place a drawing of a character behind a person in the video footage to make it look like the character is standing in the distance behind the person in the film. Is that possible? I have been thinking about masking but the video is treated as one object and not separate objects.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You will need to create 2 layers, one with the foreground person and one with the background, with the animation in between. Since you only have the one layer, you need to duplicate it, and send one copy to the front. You then have to remove everything except the foreground from the front copy.
How you do this will depend on your footage. I'm assuming you haven't shot against a green screen, so just keying out the foreground character (using something like Keylight) isn't going to work, unless you're lucky enough that the character happens to be standing in front of a well-lit object of a flat contrasting colour. In that case you'll have to rotoscope.
So, welcome to the world of rotoscoping, roto to its friends, except it doesn't have friends because it sucks. Basically rotoscoping means animated tracing of live footage. Disney pioneered it for their early hand drawn animation, but today it mostly means manually creating an animated matte.
If you have AE CS5+ you'll have the roto brush tool, which is like the magic wand from Photoshop, but it follows movement over time. Often it can do the heavy lifting and get you a nice clean foreground and background plate. Here's a link for the CS6 version, and they've given it some more love for CC with it's own refine edge tool. If you watch the Adobe videos it looks like a walk in the park, but unfortunately it doesn't always work like it says on the can. If your foreground and background are similar in colour, or are very detailed or grainy using roto brush might actually take longer than doing it by hand, because the matte will start to wander and it can be hard to convince it to go where you want it to go.
So your plan C is doing it by hand, which is a whole bunch of fun. My advice: get comfortable. I always use a graphics tablet when I'm doing roto, at least make sure you've got a good mouse, and a well set up workstation. Get some music playing or listen to a podcast or the radio. This may help stop you going insane. Now the important stuff is organised it's time to get to work.
First, play through the action. Try to analyse the movement, breaking it down into separate parts. If the character is walking for example, you might want a separate mask for each leg, to avoid having to create and destroy masks and handles as the legs cross over each other. The same for arms and hands.
Then you need to start drawing your masks. Do NOT start tracing frame by frame, that way is the short road to pain. Draw the mask around the foreground element you're starting with at the start of the shot, and then jump to the end of the shot and move all the points in the mask so that they are match up to where they were at the beginning - for example if there's a point on the end of the character's nose n the first frame, try and put the same point on the end of the characters nose in the last shot. Wait - you did set a keyframe for that first mask didn't you? I forget at least once every roto session.
Ok so if you play the shot back now you'll see that the mask starts out right, gets progressively wrong, and then goes back to being right. Find the point at which it is the most wrong and correct it, creating a new keyframe. Sometimes you'll need to create new mask handles, don't worry, AE interpolates them well, though deleting handles can be problematic.
Now play between your first and second keyframe, find where the mask is furthest out of whack, stop and add a keyframe there, and the same for the section between the second keyframe and last keyframe. And repeat, putting in-between keyframes where the mask is most out of line. You'll find that as you progress the mask will start getting closer and closer to where it needs to be, even on the in-between bits, until you're correcting very small errors. You may well have to keyframe every frame, depending on the shot, but doing it this way will mean that the computer is doing most of the work for you, compared to starting at the beginning and working frame by frame.
Remember that with AE if there is a single handle that has to be tweaked then it will create a new keyframe for the whole mask. So make sure the whole mask is right each time you make anew keyframe. If you just concentrate on one bit and then realise after you've set keyframes for your whole shot that one handle is a couple of pixels off you'll have to edit each one of them again.
Another tip is to work in the layer window rather than the comp window. this will speed up the rendering, and avoid accidental clicks on other layers. I usually turn off the mask rendering (in the view options at the bottom of the layer window) because it lets me see what's happening outside the mask as well as speeding up display.