Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

A simple 2-layer tracking workflow?

Contributor ,
Mar 03, 2019 Mar 03, 2019

Hi, Folks-

Wisdom appreciated here. The video layer I'm tracking has a bald guy. His simulated wig is on the layer above- a PNG file.

I track the guy in AE using a two-point tracker, one on his nose, the other on his tie knot.  I get a smooth track, only a couple tweaks needed. Seems to detect position, rotation, and scale.

Exporting the data to the target wig layer is not so smooth. Comes out tilted and not on his head. I have to correct scale, rotation is wacky, and the wig is out of position. Then does it take? Of course not! Advance to the next frame, snaps right back to off position; I've only edited one keyframe. Of...many.

So I try the mocha plugin; it's fun to use, the planar track is smooth in half the time! Not sure what I'm missing, but I have read the plugin docs and I see I can export one parameter (like top left, center, etc) at a time.

When I finally apply this successfully to the wig layer, the wig again wigs out, becoming distorted-- but it sure follows the guy, sort of parked on his shoulder like a tribble.

Not a good wig simulation.

Most recently I've added a null object in hopes to allow me to set up the scale of the wig, and assigned the movie data track to the null, and then the movie goes haywire.

I've seen several tutorials on tracking to adding signs and license plates and ID blurs, and they've advanced me into the trouble I'm in now.

I'm an editor, not an effects guy, Jim!  But I love the tools and many of us have been led into it. This is a personal project of discovery and hair pulling.

Ideas or examples welcome!

Best, as always,

Loren

-Lor -
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Mar 07, 2019 Mar 07, 2019

ADDING A 2D TRACKING WIG WITH MOCHA AE

Special thanks to Rick Gerard, ACP, and Eric Peikin at Boris Support, for procedure and alternative strategies for beginners like me. (Fortunately, I bring some teaching skills to what I learn. You judge.)

Adding a wig which tracks a character, ideally from background to foreground, or side to side without sharp head turns, is much like tracking moving auto license plates or sign replacement. But here we’re dealing with people.

Rick’s TV screen-replace video

...
Translate
Community Expert ,
Mar 03, 2019 Mar 03, 2019

If the two-point (scale and rotation) motion tracker is not giving you proper results then it's probably user error.

Here is how I would go about tracking your shot.

  1. Open the motion tracking Workspace
  2. Select the footage layer
  3. Select motion track + scale and rotation
  4. Move to a point in the timeline where the actor's head is pretty square to the camera and level
  5. Set the first feature area centered on the bridge of the actor's nose and make it wide enough to include both eyes
  6. Expand the search area to make sure that it is big enough to catch any movement in the frame
  7. Set the second feature region to the necktie and make it big enough to include at least all of the not and a little of the collar
  8. Expand the search area again to make sure it is big enough to include everything that might move between frames
  9. Track forward and backward
    (hint: if you open Preferences>Display and set only 1 keyframe to display it is a lot easier to verify and edit a motion track)
  10. When the track is complete step through the track one frame at a time and verify that the attach point is accurately following the bridge of the nose and the center of the tie
  11. Move to the first frame of the layer
  12. Add a new null
  13. Set the null as the target of the motion track and hit apply
  14. Add your "wig" layer and Shift + parent it to the Null to snap the wig layer to the null's position
  15. Adjust the position and rotation of the wig layer to match it to the actors head

That should do it.

The same thing goes for tracking in Mocha. Corner Pin track the face, verify the track is good by checking the surface and adding a grid or other image. Expand the surface to precisely include the width of the head where the wig will sit, then save the corner pin data. Back in AE take your wig layer and scale it up and position it so that it completely fills the frame. If the wig layer has transparency then you might be able to just fit it to the composition. Now Pre-compose the wig layer moving all attributes. Back in the Mocha UI (new version) or copy the corner pin data, move to the first frame and apply corner pin to the wig layer or select the wig layer and paste if you have copied corner pin data. If your adjusted surface in Mocha is the same size as the wig then the wig will perfectly fit on the actors head.

The trick to both techniques is making sure that the track is good and moving to the first frame before you apply anything.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 03, 2019 Mar 03, 2019

Hi, Rick!

Thank you for such a meaty response.  I will try both methods.

Note: your tracking instructions 2- 9 have already been followed, to the letter! The AE track looks good.

A couple questions:

About step 3- should I include position with scale and rotation?

About step 9- this shot tracks better from the very last frame, backward to the point when the character recedes behind a curtain.

There I made a couple keyframe tweaks to extend so the wig wouldn't jump as he emerges.

(The Prefs keyframe display hint for editing is fantastic, can't wait to try it.)

About step 13 - Am I using the pick whip in the AE timeline or TrkMat column?

I'll be following steps 10-15 very carefully.

In my Mocha experiments, I used both B-spline and flat rectangle for tracking. In one of the B-splines I allowed for "wig space."

The wig layer is huge - but not frame-filling, so I'll do that for sure. The PNG carries an alpha channel, so fitting the wig at a good middle  frame has been no problem- in the Comp window.  Being able to trace exactly with B-spline tool where it sits on the fellow's head I can't do- I have to B-spline in the Layer window, not the Comp. Is there a workaround?

Your instruction to use Corner Pin export data -- I've only been using Transform till now, so can't wait to try it.  I used Pin once- went haywire-- that was without employing a null.  For Pin, I have two choices, one with motion blur?

Will report back.

Best, as always,

Loren

-Lor -
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2019 Mar 03, 2019

Step #13 - In the Motion Tracking Panel select the null as the Target and then apply after you have moved to the first frame. No pickwhip involved. The only time you might use a pickwhip wold be to point from the Parent column in the wig layer to the null while holding down the shift key. Personally I always just click the parent button and pick the appropriate layer.

You don't follow the outline of the face in Mocha, you set the surface to be a rectangle and line it up with the top of the actors head. The spline can include the entire face. Sounds like you need to go to the Borris FX site and view some Mocha tutorials. Corner pin tracking will distort a layer to fit the rectangle you created in Mocha. Corner Pin data uses the frame size of the comp so it's important to scale the layer to fit the comp and then pre-compose.

It's not exactly the same thing but here's a little tutorial I did that demonstrates some advanced corner pin techniques with mocha. Notice how the frame size is adjusted:

That technique will work if you treat the actor's head the way I treated the TV, then distort the wig the same way I distorted the video replacement.

You might not need to go to all that work but the mocha part about setting the surface is critical to making that work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 03, 2019 Mar 03, 2019

Hi, Rick -

Very interesting.

One thing I should mention, and it may not mater-- the shot I'm treating is not at the beginning the sequence, but I've trimmed it and the wig, and the Null, to the work area of interest.

For tracking I have the "Track Type" as Transform. I deselected Position. The new tracking came out rock steady.

As you suggest I used the dropdown menu with Shift to assign the wig to the Null after applying the tracking data to the Null.

Hate to tell you, the darn wig still flies about and doesn't;t follow the head. It just wanders. I'm sure it's Operator error, somewhere.  If I nail one, I've got them all.

I'll try the Mocha track next. I have not done a distortion fit yet but in your example it came out spiffy.

I'll report back.

Best, as always,

Loren

-Lor -
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2019 Mar 03, 2019

Try creating a 200 X 200 pixel solid and applying the tracking data to the solid instead of the null. If the solid jumps around then the track has errors. It takes a bit of practice and skill to see and adjust tracking errors.

If you can share the shot I'll gladly take a look but because of the trouble you are having the best solution may be to track the shot in Mocha. Mocha certainly looks at a lot more pixels.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 04, 2019 Mar 04, 2019

Hi, Rick -

That is my next course. We're currently all snowed in here in Boston, plenty of time to work this through carefully.

So, Mocha plugin, rectangle framing, plus 200 X 200 solid coming up!

Thank you for the kind offer to get a look at the materials. Will report back.

Best, as always,

Loren

-Lor -
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 07, 2019 Mar 07, 2019
LATEST

ADDING A 2D TRACKING WIG WITH MOCHA AE

Special thanks to Rick Gerard, ACP, and Eric Peikin at Boris Support, for procedure and alternative strategies for beginners like me. (Fortunately, I bring some teaching skills to what I learn. You judge.)

Adding a wig which tracks a character, ideally from background to foreground, or side to side without sharp head turns, is much like tracking moving auto license plates or sign replacement. But here we’re dealing with people.

Rick’s TV screen-replace video in this thread is a seminal learning tool. Watch carefully for his Surface tool application; he works quickly.

Eric from Boris also demonstrated this process in Mocha Pro, by activating Surface before describing the search area. Watching Eric work. I could see Mocha Pro training would be valuable.  Mocha Pro is pretty awesome; it also offers sophisticated Camera Solve tracking, and the ability to insert a tracked effect right into your NLE, in my case, Premiere Pro. Mocha Pro offers a distinct advantage over doing this in After Effects, exporting etc. In fact, the Pro feature is called Insert Edit.

From these experts and my own beginner’s mind, I’ve tried to develop the simplest workflow using only two 2D layers for quick wigging. using only the Mocha AE CC 2019 plugin bundled with After Effects. So load After Effects, import your two layers, and try these steps:

1

Assemble Wig Hair file layer above the Actor movie layer.
The Hair file can be a PNG with alpha channel from Photoshop. It should occupy the entire HD frame either top to bottom or side to side.

2

Select the work area for the wig addition, and slide the wig file into the work area if it imported at the beginning of the timeline. Disable visibility of the gargantuan wig while tracking the movie layer. Make the movie layer active.

3

Load the MOCHA AE plug-in effect. The movie layer will display.  You’re ready to frame.

4

Invoke the RECTANGLE tracking tool, draw around Actor’s head movie and some of the chest, if included.

5

Invoke the SURFACE tool, which applies an additional blue outline, which you’ll position and stretch to define just the wig region on the actor’s head. Without the approximate surface defined within the tracking rectangle, your wig has no target destination, could go pretty much anywhere when you try to join them.  Mine did. For days.

You can activate Surface before describing the tracking rectangle, but it defaults to occupying the entire rectangle. Either way, you’ll need to adjust the blue Surface outline by moving the box and adjusting it via edge handles, to describe the wig area on the actor’s head.

6

Track the shot, test for smooth quality of motion. If the actor was tracked emerging from behind a curtain or opening a door, your tracking data will likely go awry at that point. You will have to hand-adjust the track for a smooth reveal. It can be time-consuming.

But in readjusting a track you’ll overwrite existing keyframes. And it’s very easy to start over by clicking Delete all Keyframes, button under the image 

Difficult tracks can be broken down into two or more sections, including tracking forwards and backwards.

7

When satisfied, Save project, and Exit Mocha.

8

Back in AE, find Mocha from its Effects panel if not already displayed in the Effects Control panel. Below the logo, disclose “Tracking Data.” Leave the various parameters as they are.

a- Click the Create Tracking Data button.
b. In the resulting export list, add a Cog  to the Actor movie layer. In this case, the only layer.
c. Export Option: Corner Pin
d. Link Export to: select the Hair layer
e. Click Apply button.

You’ve just instructed Mocha to 1) add the tracking data to the movie layer, and 2) add data to pin the corners of the wig graphic into the blue outline defined by the adjusted Surface tool.

You should instantly see the wig image shrink to fit in or float near the surface region you defined. It may not be perfect just yet, (especially if the anchor points in each layer are different). 

Hold on. Watch to see if the wig diverges, or tracks the talent in lockstep parallel. If it diverges, you need to readjust the tracking rectangle, usually by including more area with more features to track,  and try again.

If you see parallel, the only problem is gross alignment. You’ll do that next. First…

9

PRE-COMPOSE the Hair layer containing only the Hair clip with your final embedded Corner Pin tracking data.

10

Tweaks: Only to the external of the PreComp layer, apply Position, Scale, Rotation or selected Transform effect keyframe settings to align the wig any number of ways, including Skew. These adjustments are global, can be animated, and don’t affect the tracking data protected inside the pre-comp.

Shouldn’t require much work getting the wig right onto the actor’s head, and even accommodating slight turns with Scale Width, Scale Height and/or subtle Skew changes.

11

Curtains and door entrances or exits: as a final operation, you’ll animate a mask of the wig layer in synch with the curtain or door open. That can actually be fun. I use the Bezier Pen to draw a mask on the wig layer, moving the edge of the mask further and further until the wig is fully revealed, and then I park the mask offscreen on the final keyframe.

Render-Export for insertion into your show!

What an adventure!  It continues, but it works.

Additional comments welcome.

Hearty thanks again to Eric and Richard for reaching out stepping up.

Best, as always,

Loren

-Lor -
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines