Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Determining Parent Layer Control

  • Determining Parent Layer Control

    Posted by Y. Bar on January 16, 2010 at 4:38 pm

    Hello,

    I have a Camera Layer which is parented to a Null layer which contains rotation and position keys. Is there a way that I could make the Null layer affect the Camera layer, in the same timing, but a little less magnitude ? (for example to move half the way the null layer moves)

    Thanks, Y.

    Will Skinner replied 16 years, 3 months ago 3 Members · 9 Replies
  • 9 Replies
  • Dan Ebberts

    January 16, 2010 at 6:35 pm

    Here’s an example for position. First you need to specify a point of reference (in this case I used the parent layer’s positon at time zero).

    ref = parent.transform.position.valueAtTime(0);
    delta = parent.transform.position – ref;
    factor = .333; // move one third as far as parent (max value = 1.0)

    value – delta*(1-factor)

    Dan

  • Y. Bar

    January 16, 2010 at 7:25 pm

    I guess I should remove the parenting from the camera first if I want the expression to work?
    Cause with the parenting on it stays as before.
    How should I reference the ‘motion’ layer once I remove the parenting ?

    Thanks, Y.

  • Dan Ebberts

    January 16, 2010 at 8:30 pm

    No, the expression assumes the layer has a parent. You need to create keyframes moving the parent around before the expression has any effect.

    Dan

  • Y. Bar

    January 16, 2010 at 9:55 pm

    The parent layer indeed has keys in it, and so the camera layer moves, but always in the same motion as the parent layer, even though I entered that expression and modified the factor value to values between 1 and 0.001 – the motion is always constant..

  • Dan Ebberts

    January 16, 2010 at 11:46 pm

    I don’t have a clue. It works for me.

    You have the camera parented directly to the null, the null moves via position keyframes, and the camera motion is unaffected by expression, is that correct?

    Dan

  • Y. Bar

    January 17, 2010 at 7:04 am

    That’s correct, I have the camera parented to the Null, and it moves according to the Null layer’s movement, regardless of the value I put in ‘factor’.

  • Dan Ebberts

    January 17, 2010 at 7:08 pm

    Sorry, I don’t have a clue.

    Dan

  • Y. Bar

    January 17, 2010 at 7:47 pm

    Okay, thanks, I will try again to get your example to work.

  • Will Skinner

    April 11, 2010 at 9:50 am

    Hi Dan

    I have used this expression successfully for the position, but i can’t get it to work for Rotation. Was it intended for Rotation aswell or does that require a different expression ?

    Thanks!

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