-
Parenting in an Expression
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!