Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Applying Motion Tracking Data to Eraser Paths

  • Applying Motion Tracking Data to Eraser Paths

    Posted by Austin Baur on April 11, 2014 at 9:31 pm

    Hello,

    First off a huge thank you in advance to anyone who can help me out! I am compositing a shot that involves a moving camera and a matte painting. Everything in the comp has gone great so far but I have run into a snag: I am blending together the ground on the matte painting and the ground on the background plate with the eraser tool. (I prefer the eraser over masks because the eraser allows me to randomize the opacity and get a very very organic blend between the two ground textures, as opposed to the mechanical nature of masks.) The camera move is simple, the camera tilts up to the sky. I need to animate the position of the eraser paths to match the motion of the ground in the comp. I have tracked the footage and created two null objects, one with X and Y data and one with Y data only. The problem I am having is that when I link the position property of the eraser stroke to the position property of the null object (either one), the eraser stroke moves to the exact position of the null object as opposed to staying put and then following the track data. I think to myself that surely there must be an expression that would allow me to keep the initial position of the stroke the same and then simply add the y values of the track data to the stroke.
    I am pretty unfamiliar with expression language, but what I am looking for is basically the equivalent of the following if anyone thinks they can figure out how to code it:

    position[X VALUE = CURRENT COMP, Y VALUE = CURRENT COMP +/- TRACK DATA OF Y NULL OBJECT]

    Thanks so much!

    Austin Baur

    Austin Baur replied 12 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 11, 2014 at 11:56 pm

    I haven’t tried it, but something like this should work:

    nullPos = thisComp.layer(“Null 1”).transform.position,
    value + [0,nullPos[1] – nullPos.valueAtTime(0)[1]]

    Dan

  • Austin Baur

    April 12, 2014 at 2:17 am

    Thanks! I’ll have to give that a try, although I ended up finding an alternative way to do it: I rendered out a still frame of frame 1, went into Photoshop and applied a layer mask and started painting out the ground with a low-opacity custom brush and then converted the values to grayscale. Then I brought that back into AE and used it as a Luma Matte and parented the Matte to my Null objects, which worked great if anyone runs into the same problem.

    I’m definitely going to give that expression a try though as it would make the workflow all around a bit easier.

    Thanks, Dan.

    Austin Baur

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy