Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale Expression

  • Posted by Tim Hook on September 2, 2006 at 2:38 am

    You know how you can magnify the icons on the dock during a mouse-over on Mac OSX? Is it possible to set up an epression that would be centered in the middle of the comp, so when I keyframed the position of my text left to right, the letters would scale up/down accordingly.

    Almost like they were going over a hill, but not like a displacement map where it would bend, I want the individual letters to scale.

    Does this make sense?

    Tim Hook replied 19 years, 8 months ago 3 Members · 3 Replies
  • 3 Replies
  • Zuktoor2

    September 2, 2006 at 5:31 am

    create a scale animator of one character an animate the offset

  • Mike Clasby

    September 2, 2006 at 5:33 am

    Methinks jj gifford’s Scale expression is what you want. There is an aep to download:

    https://jjgifford.com/expressions/geometry/length.html

    Anyway, if you position the “Drag Me” Layer in the Center of your comp, then animate your text layers (or his ai layers) moving them across the Drag Me, then their scale builds as they approach, and decreases as they move away. Turn off the eyeball for Drag Me and they just scale off the center of the comp )or wherever you position the now invisible Drag Me. Here’s the expression:

    // Point1 is Letter layer, point2 is control layer named “Drag Me”
    point1=this_layer.position;
    point2=this_comp.layer(“Drag Me”).position;

    // Find the vector between the 2 points
    delta=sub(point1, point2);

    // Now find the length
    distance=length(delta);

    //Use linear() to remap distance to range of 40 to 0
    linear(distance, 0, 80, [250,250], [75,75]);

    I changed some of the explanations (the stuff after the //) because they explain a Blurry effect (same principal as the scale, just driving a Blur with closeness to the “Drag Me” layer).

    It’s setup so at 80 pixels from the “Drag Me” layer the letter scales from 75% up to 250% at 0 pixels from “Drag Me” (or right on top of “Drag Me”. If you wanted it to Start scaling up 150 pixels away and reach that 250% 50 pixels either side of Drag Me(so it stays at the max 250% for 100 pixels, 50 each side of “Drag Me”), the last line would be:

    linear(distance, 50, 150, [250,250], [75,75]);

    The letters have to be on individual layers if you want them to scale individually.

  • Tim Hook

    September 2, 2006 at 4:35 pm

    Of course… thanks, that was stupid easy.

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