Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale affected by speed.

  • Darren Hardaway

    June 17, 2009 at 4:28 pm

    Assuming the speed of the object is controlled by it’s position or anchorpoint transformation use the pickwhip to call this value to the other layers scale property. The pickwhip is the little swirly button that appears when you open the expression editor of a property. Click and drag it to the position or anchorpoint value of the “speed” layer and then turn it into a variable, then call the way you want the speed to affect the scale. For example, if the object were to go from the left to right side of the comp you could make the scale of the object increase and decrease from 0 to 100 in a loop like this:

    x = thisComp.layer(“speed”).transform.position;
    Math.abs(Math.sin(x)*100)

  • Dan Ebberts

    June 17, 2009 at 4:35 pm

    You could do it like this:

    scaleFactor = 100;
    s = thisComp.layer(“Layer A”).transform.position.speed;
    value*(s/scaleFactor)

    You would increase the scaleFactor to reduce the effect.

    Dan

  • Darren Hardaway

    June 17, 2009 at 4:39 pm

    Hey, whats that little bit there at the end?

    .speed

    how does that work?

  • Dan Ebberts

    June 17, 2009 at 4:44 pm

    The position property has speed and velocity attributes. speed is just the magnitude, velocity is a vector that indicates the current direction as well as the magnitude.

    Dan

  • Darren Hardaway

    June 17, 2009 at 5:01 pm

    Okay, so it goes by the factor of After Effect’s time, uses pixels as units of measurement?

  • Dan Ebberts

    June 17, 2009 at 5:23 pm

    Yes, pixels per second.

    Dan

  • Joan Valdes

    June 17, 2009 at 7:12 pm

    Hey!

    Thanks guys! That .speed value was exactly what I was looking for. Worked perfectly!

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