Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions “scale” depending on “position”

  • “scale” depending on “position”

    Posted by Gunnar Kordestani on January 31, 2009 at 7:15 pm

    hi everybody,

    I have a rolling title here. Each line is a single textlayer.
    I would like each line to get bigger when being in the middle of the screen (x=720, y=540 in this case). Getting smaller, when getting/coming to/from the edges.

    I wonder what an Expression for the “scale” property should look like.

    any suggestions out there?

    thanks a lot
    Gunnar

    Dan Ebberts replied 17 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    January 31, 2009 at 8:57 pm

    Something like this should get you started:

    minScale = 100;
    maxScale = 200;

    centerY = thisComp.height/2;
    dist = Math.abs(toWorld(anchorPoint)[1] – centerY);
    s = ease(dist,0,centerY,maxScale,minScale);
    [s,s]

    Dan

  • Gunnar Kordestani

    February 5, 2009 at 6:34 am
    minOpac = 50;
    maxOpac = 100;
    
    centerY = thisComp.height/2;
    dist = Math.abs(toWorld(anchorPoint)[1] - centerY);
    s = ease(dist,0,centerY,maxOpac,minOpac);
    [s,s]

    hi Dan,

    thanks. that exactly does it. As I am trying to understand whats going on I experimented a little. Trying to use it for other properties.

    When using it for “Opacity” I get an error “Expression result must be of dimension 1, not 2. Error occured in line 0.”

    I don’t get it. What’s the problem here? Of course I have to admit, that I am not relly too experienced with expressions and need to build up with the basics still.

    thx
    Gunnar

  • Dan Ebberts

    February 5, 2009 at 6:40 am

    This should do it (haven’t tried it, but it looks right):

    minOpac = 50;
    maxOpac = 100;

    centerY = thisComp.height/2;
    dist = Math.abs(toWorld(anchorPoint)[1] – centerY);
    ease(dist,0,centerY,maxOpac,minOpac);

    Dan

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