Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Parenting in an Expression

  • Parenting in an Expression

    Posted by Blane Granstaff on October 1, 2008 at 11:05 pm

    Lets say for example I am trying to remove three zits on someone’s face in every frame of a twelve second long piece of footage.

    First I motion track the area of the face that contains blemishes and apply that data to a null.

    Then I use the clone tool on the zit in the footage, After effects records the position of the source area (x,y) and the position of the destination area (x,y).

    Then I create an expression in the position data of the source and destination and link it to the position data in the null.

    x= thisComp.layer(“Null 1”).transform.position[0];
    y= thisComp.layer(“Null 1”).transform.position[1];
    [x, y]

    Unfortunately this causes the source and destination area of the clone to shift to the position of the Null. Normally I do a little math and cancel out the offset that the Null caused in order to put the positions back where they were.

    x= thisComp.layer(“Null 1”).transform.position[0];-100
    y= thisComp.layer(“Null 1”).transform.position[1];+76
    [x, y]

    If the footage contains many blemishes then this means I would have to make these calculation over and over again for every paint effect. Which is time consuming.

    What I am trying to figure out is how to keep the position of the source and destination area of the clone where they are while still following the movements of the Null.

    Is there an expression that simulates using a parent pickwhip inside of an expression.

    Please Help!

    Blane Granstaff replied 17 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 2, 2008 at 3:04 am

    I’m thinking something like this should work:

    N = thisComp.layer(“Null 1”);
    value + N.transform.position – N.transform.position.valueAtTime(0)

    Dan

  • Blane Granstaff

    October 2, 2008 at 3:23 am

    You sir are THE MAN!
    It was exactly what I needed.

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