Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Repeat Y position animation with hold

  • Repeat Y position animation with hold

    Posted by Matt Ratcliffe on September 27, 2010 at 3:11 am

    Hi,

    I’ve been struggling with this expression for a while (nothing new to me…), I’ve seen a post on here from a while ago which may produce the same or a similar result but I can’t seem to get it to work for me (at all…). (https://forums.creativecow.net/thread/227/15017).

    What I’m trying to figure out is how I would express animating the Y position of a 400 line text layer to nudge up into a window (track matted) to show only the first line of text (10 key frames), hold for 15 keys, and then to repeat Y movement by nudging the text up to reveal the 2nd line of text. this cycle would repeat in 1 sec (25 frame) intervals to eventually display ever line of text.

    If anyone has a solution for this I would be very greatful!

    Thank you,

    Matt.

    Yotam Rozin replied 10 years, 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 27, 2010 at 9:59 am

    It’s probably going to look something like this:

    f = timeToFrames(time);
    line = Math.floor(f/25);
    pix = Math.min(f%25,10);
    value – [0, line*10+pix]

    Dan

  • Matt Ratcliffe

    September 28, 2010 at 12:09 am

    Dan, your a life saver!!! this expression is exactly what I need. Thank you so much!

    In order to use it perfectly in my comp order I’ve made the following updates:

    f = timeToFrames(time);
    line = Math.floor(f/25);
    pix = Math.min(f%25,10);
    value – [0, 6.4*((line-5)*10+pix),0]

    I’ve multiplied Y in the array by 6.4 to increse the line spacing per movement.

    I’ve added Z to the array for functionality as a 3D layer.

    I’ve subtracted 5 from the line variable to delay the initial 1st position. I could have just shifted down the text but I have a 5 sec animation of the text which links up with this 1st postion, so the 1st 5 secs of the expression layer are hidden.

    This is all working fantastic for me and I’m very grateful for your assistance.

    Thank you!

  • Yotam Rozin

    December 15, 2015 at 5:18 pm

    Hey guys,
    real great job on that expression, I’ve been looking for something like this for hours! Is there any way to ease the movement created?

    Thanks!!!

    edit:

    eased it:

    f = timeToFrames(time);
    line = Math.floor(f/25);
    pix = Math.min(f%25,10);
    pixe = ease(pix, 0, 10, 0, 100);
    value - [0, (line*100+pixe)-time]

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