Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression to double scale based on z position

  • expression to double scale based on z position

    Posted by Mat Taylor on February 18, 2008 at 10:47 pm

    I’m trying to write an expression for the scale property of several text layers based on there z position. I want each layer’s scale to be 100% when z is 0 or lower and go up to 200% when z is -100.

    All of the text layers are parented to a null layer and spaced out on the z and y planes in a ferris wheel type fashion (they are 100 pixels from the null and the null’s z position is 0). When I animate the x rotation of the null, they spin around. The effect would look better if they would scale too.

    Anyone know how to do this? Thanks in advance for any help.

    –mat

    Mat Taylor replied 18 years, 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Mike Clasby

    February 19, 2008 at 12:03 am

    I think this is what you want but you need to test it on the wheel. It goes on each layer’s scale.

    s = linear(position[2],0,-100,200,100);
    [s,s,s]

  • Darby Edelen

    February 19, 2008 at 1:02 am

    Since you have the layers parented to a Null the expression should be:


    z = toWorld(anchorPoint)[2];

    s = linear(z, -100, 0, 200, 100);
    [s,s,s];

    Apply this to the scale property.

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Mat Taylor

    February 19, 2008 at 1:20 am

    Thanks everyone. The expression works great. I did need to add:
    z = toWorld(anchorPoint)[2];
    to get it to work right with the null.

    Thanks again.

    –mat

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