ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Time remap keyframes loop, then continue

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hiski Suomela
Time remap keyframes loop, then continue
on Sep 20, 2019 at 8:17:45 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. :)


Return to posts index

Andrei Popa
Re: Time remap keyframes loop, then continue
on Sep 20, 2019 at 10:27:51 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.


Return to posts index

Hiski Suomela
Re: Time remap keyframes loop, then continue
on Sep 23, 2019 at 6:28:02 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?


Return to posts index


Andrei Popa
Re: Time remap keyframes loop, then continue
on Sep 23, 2019 at 8:41:36 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.


Return to posts index

Hiski Suomela
Re: Time remap keyframes loop, then continue
on Sep 23, 2019 at 8:49:51 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?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]