Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Creating an expression to scale layer over time per each images start/end

  • Creating an expression to scale layer over time per each images start/end

    Posted by Tim Vaughan on September 20, 2005 at 3:06 pm

    Hi
    My goal is to create an expression where the scale of a still image would be x and over 4 seconds/120 frames would be x+10 (55% to 65%). I have hundreds of pictures, and have comped them into a overlapping sequence with cross dissolving into each succeeding image over a period of 4 seconds. (Selected all the pictures from the bin, dragged over to new comp selection, and checked the sequence layers, still duration of 4 seconds, and cross disolve.
    As each still begins 1 second under the preceeding, and all images have been scaled to the same height, I now need to put the finishing touches on this with scaling the image over a set time. So far, I have been able to do this from a few archived posts, but they all require adjusting the time to where the image begins and ends on the timeline. (If one image begins at 1 second and ends at 5, the script would require the time to begin at 1 and end at 5, with every script needing its own personal time adjustment). Is there any way to have the image begin scaling at the beginning of its personal clip begin and ending at the end of the clip to specified values without having to account for exact time on the composition? Thanks, and I hope this makes sense….:)

    Dan Ebberts
    replied 20 years, 7 months ago
    3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    September 20, 2005 at 3:23 pm

    As an example, this expression will increase a layer’s scale by 10% over the time between its In Point and Out Point:

    linear(time,inPoint,outPoint,value,value+[10,10])

    Dan

  • Tim Vaughan

    September 20, 2005 at 3:28 pm

    Thanks Dan!! That works perfectly!! Thanks!!

  • Guy

    September 20, 2005 at 8:03 pm

    hey Dan, how would you do the same thing, but with opacity, fading up a layer over 10 frames, then out for 10 frames based on IN/OUT edits?

    curious.

    thanks

  • Dan Ebberts

    September 20, 2005 at 11:35 pm

    Something like this should work:

    f = thisComp.frameDuration*10;
    Math.min(linear(time,inPoint,inPoint+f,0,100),linear(time,outPoint-f,outPoint,100,0))

    Dan

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