Skip to main content
Participant
October 18, 2018
Question

newbie: seeking advice on tracking head (and replace)

  • October 18, 2018
  • 1 reply
  • 373 views

Hello.

I'm an AE newbie and have an experimental project where I want to replace the head of a person dancing with a still image of another person's head. The aesthetic is rough (ie I know it will look a bit odd or even funny but I quite like this). For example, I don't mind that when the dancer is side on, the 'replacement' head would not necessarily accurately reflect that change in orientation.

I'm looking for advice on a general workflow (or different options) that might make this possible (perhaps including pros and cons of each workflow). This is what is hard as a newbie to AE, it's not about specific skills (where there are so many tutorials online), but rather the best way to attack a specific project that might require a range of different skills.

The workflow would likely deal with two particular problems:

1. how to keep tracking the face (I assume using Mocha) when the dancer turns away from the camera. It might be that the still image that replaces the head of the moving image could reveal its own plain back when he turns away (ie rendering the 2d still image as a 3d object), but I'm not tied to this. It might look beautifully absurd if the still image keeps facing front as the dancer turns away (little bit The Exorcist like!).

2. how to deal with the tracking when the dancer's arm passes across his face. I assume this has to do with building layers into the shot but I find this concept difficult to figure out.

I've attached 3 screenshots to give you a sense of the look of the original footage.

Thanks everyone for your time and your expertise.

Simon

This topic has been closed for replies.

1 reply

Mylenium
Legend
October 18, 2018

Nothing to fix here. The whole piece was shot wrongly to begin with. You have to create the keyframes by hand and can only rely on tracking when the face is actually fully visible. Otherwise such stuff requires markers - on the background and the T-shirt as well as possibly on the face and arms. There are simply not enough persistent and distinct features in your shot that a tracker could latch on for longer than a few frames, so if at all it would be a jittery mess that still needs manual keyframe cleanup and fixing.

Mylenium

skiptimeAuthor
Participant
October 18, 2018

Thanks Mylenium for taking the time to respond.

The piece was never shot with motion tracking in mind, and nor was it shot with what I want to do in mind. It's more than I'm 'intervening' in the film.

I wonder though if you could elaborate on keyframes etc. That is, what would be a workflow to make this happen, even if done totally by hand. That's the bit I'm not really clear about -- an overall workflow (regardless of how tedious/laborious) that could make it happen.

Thanks in advance.

Simon

Community Expert
October 18, 2018

I would just motion track the head, apply the track to a null, then parent the replacement head to the null and move it into position to cover the existing head. Make the replacement layer 3D. Make sure the Anchor Point is centered on the nose just below the cheekbones. Make sure the replacement head layer is selected and press Alt/Option + p, then Alt/Option + s, then Alt/Option + r to set position, scale, and rotation keyframes. Scrub through the timeline until the actors head changes direction and adjust the position rotation and scale of the replacement head to get it to line up in the best way you can with the actors head. You could even add a second replacement head that shows the back of the head to use when the actor is facing away from the camera.

To make the Motion Tracker work properly it is easiest to first choose the Motion Tracking Workspace, then set the feature region to something that isn't going to change shape very much like the top of the actors head. Something like this should give you a fairly decent track.

If you go to Preferences>Display and temporarily turn off keyframe display it will be pretty easy to manually adjust the tracker when it fails or fix bad keyframes. Then just add the null, edit the target for Tracker 1 to point to the null and apply to X and Y. You should be about 80% of the way to lining up your replacement head layer just a couple of minutes after you have run the tracker.

Make sure you type Motion Track in the search help field in the top right corner of AE and spend at least a few minutes reading the help files so you understand the basics.

Another option that may work for your clip would be to draw a 4 point mask around the actors head starting at the upper right corner and use Track Mask to track his head. Then use the Create Nulls from Paths script available in the Windows Menu to attach nulls to the path. You would then add your replacement hed to the comp, make sure it fills the entire comp by scaling it up, then apply Corner Pin to the Replacement Head layer and tie the position of each of the pins to the position of the nulls with a simple expression created using the PickWhip. Here's what that would look like if I used a green oval with the blend mode set to Overlay to give the actor a green face.

You may have to go into the mask keyframe after tracking and adjust a few keyframes or pause the track when the track stops keeping track of the actors head and manually set a few keyframes before moving on. Again, reading up on how mask tracker works will give you a head start on the project.

I faked your movie by pre-composing one of the images you shared and animating the position. Both Motion Track and Track Mask worked well. Track Mask was set to Position, Scale and Rotation.

Both of these solutions should give you a decent solution in less time than setting a bunch of keyframes manually. You will be able to tell if these workflows will work when you start tracking. If the tracking holds fairly well then it's probably the easiest solution.

The last option, which I won't go into right now, would be to use Corner Pin Tracking in Mocha. I won't break that one down to you right now but it follows the same basic idea as Track Mask.