Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How do I scale a photo from composition width to height over 5 seconds?

  • How do I scale a photo from composition width to height over 5 seconds?

    Posted by Chance Turcotte on January 22, 2011 at 6:03 am

    Hi there. Expression noob here. I’m looking for an expression for my slideshow photos.

    The photos switch every 5 seconds. When the photos appear I want them to fill my composition horizontally (1920 pixels wide), and over 5 seconds zoom out until they fill my composition only vertically (1080 pixels high). I want the photos to maintain aspect ratio.

    Thanks! 🙂

    Chance Turcotte replied 15 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    January 22, 2011 at 6:46 am

    Assuming that you have your layers trimmed to 5 sec and sequenced, something like this should work:

    s1 = (1920/width)*100;
    s2 = (1080/height)*100;
    t1 = (index-1)*5;
    t2 = t1+5;
    linear(time,t1,t2,[s1,s1],[s2,s2])

    Dan

  • Chance Turcotte

    January 22, 2011 at 6:53 am

    Thank-you sir for the quick reply!

  • Chance Turcotte

    January 22, 2011 at 6:56 am

    This is the one I ended up figuring out:

    startScale = thisComp.height/height*100
    endScale = 100
    scaleUpTime =4

    s = ease(time,inPoint,inPoint+scaleUpTime,startScale,endScale);
    [s,s]

    I’m learning quickly on Google there are many ways to accomplish expressions in After Effects lol.

    I love this! Such a neat and tidy zoom!

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