Skip to main content
Participant
March 7, 2024
Answered

Help looping a Time Remap for a linear value of another property

  • March 7, 2024
  • 2 replies
  • 410 views

Hi !

 

The short version:

 

I'm desperately trying to link time remaps and make it so that time remap B loops every X frames of time time remap A.

 

Basically, what I'd like to do is, when TR A plays, say, 15 frames, TR B plays it's full length, then when TR A plays another 15 frames (raching frame 30), TR B loops again. It doesn't have to be a number of frames, percentages will do. Percentages will probably be more helpful.

 

And then, I'd like to be able to apply the expression to a TR C linked to TR B, then TR D linked to TR C, etc

 

Hopefully I've somehow managed to convey my issue. Thanks in advance !


More details:

 

I'm trying to do an animated rotating number counter with a big, big number. It goes from hundreds to million. The rorating numbers are animated in a precomp, so far so good, but I just cannot have a long enough timeline to link loop the animation in the precomps and then link and speed the time remaps in a parent composition.

This topic has been closed for replies.

2 replies

V35924264qwyaAuthorCorrect answer
Participant
March 8, 2024
Mylenium
Legend
March 7, 2024

The modulus operator is your friend. Could be as simple as

 

time%framesToTime(15)

 

Mylenium

Participant
March 7, 2024

Hey, thank you for your reply.

 

I've never used this expression, could you give me advice on how to set it up?

ShiveringCactus
Community Expert
Community Expert
March 8, 2024

Hold ALT and click on the stopwatch of your B layer's time remap.  Use the pickwhip to select your A layer's time remap property, then add the following code to the end of the expression:

alayer.time%framesToTime(15)

The bit before the % should be generated for you by the pickwhip.  

 

Personally, I'm never 100% confortable with modulus, I like it more spelled out, so linear would also get you there:

linear(alayer's time,0,100,0,15)

 That takes the A layer's time in seconds, and if it is 0 seconds, set B time's to 0, and if it's 100 seconds, set B to 15 (and map the range of values inbetween accordingly).  It's more long-winded and you have to know the final time for A, but I think it spells it out more when you're learning.