Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Time remap keyframes loop, then continue

  • Time remap keyframes loop, then continue

    Posted by Hiski Suomela on September 20, 2019 at 8:17 am

    Hi!

    This might sound weird but I’ll do my best to describe what I’m after.

    So, let’s say I have a precomp which has many layers with keyframes in them (like a walk cycle of a character). That walk cycle would only have keyframes for one cycle which I could easily loop with time remapping in the master comp.

    If in the walk cycle precomp I have animated the character to stop after that one cycle, is it possible to loop the walk cycle in the master comp for 10 times and then jump to the point where he stops?

    I’m asking this because I’d like to have only the essential movement of the character in the precomp and do the looping stuff with an expression.

    Let’s say the walk cycle starts at 0 seconds in the precomp and the stopping animation starts at 2 seconds. (this is made up, the point is to give some reference for the times).

    Please, ask if I wasn’t clear enough. 🙂

    Hiski Suomela replied 6 years, 11 months ago 2 Members · 4 Replies
  • 4 Replies
  • Andrei Popa

    September 20, 2019 at 10:27 am

    Try this

    dur = 1.5; //Duration of the cycle
    cycles = 5; //Cycles, obviously :D
    (time-inPoint < cycles*dur) ? (time-inPoint)%dur : (time-inPoint)-(cycles-1)*dur

    Andrei
    My Envato portfolio.

  • Hiski Suomela

    September 23, 2019 at 6:28 am

    Thanks, that works like a charm! Will be very useful.

    How about if there’s more than two different actions in the precomp? Like if theres the walk cycle, the character stop and lets say… some dancing and then waving hand? Is there a way to jump between different times in the precomp and loop them?

  • Andrei Popa

    September 23, 2019 at 8:41 am

    It is possible but it is exponentially more difficult.
    You need to create some arrays of intervals and see in which interval the time fits.
    Then you need to see which time from the precomp you need to use in the given interval.

    Andrei
    My Envato portfolio.

  • Hiski Suomela

    September 23, 2019 at 8:49 am

    Yeah, I thought that might be way more difficult.

    I’ve heard there’s a way to do that with markers too. I just have no idea of how. Also, could it be possible with keyframes if I added a keyframe to every start point of a new action and then looped that action from that specific keyframe?

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