Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link scale to z axis

  • Link scale to z axis

    Posted by Mark Johnson on April 17, 2009 at 12:56 pm

    Is there and expression that I could use to link scale to z position? I have to 2d track that I want to fake 3d with. The track (using x, y, and scale) is good, but I want to be able to move something on the z axis. Is there a way I could link the scale to just the z axis of a layer?
    Does that make sense?

    Mark Johnson

    Mark Johnson replied 17 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 17, 2009 at 2:39 pm

    I don’t think you’ve provided nearly enough information, but it might look something like this:

    minScale = ???;
    maxScale = ???;
    minZ = ???;
    maxZ = ???;

    s = thisComp.layer(“your tracked layer”).transform.scale[0];
    z = linear(s,minScale,maxScale,minZ,maxZ);
    [value[0], value[1], z]

    where you’d have to supply the appropriate layer name and fill in the ???.

    Now that I think about it though, you may need an exponential relationship between scale and z. That’s a different story.

    Dan

  • Mark Johnson

    April 17, 2009 at 4:06 pm

    I found a different workaround to my problem, but I will give this a try to see if it works for me..

    thanks

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