Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Time Remapping Expression – based on different layer

  • Time Remapping Expression – based on different layer

    Posted by Dan Turner on July 28, 2016 at 4:07 pm

    Hi guys, so I’m after an expression that will do the following:

    Where (thisComp) frame number and (otherComp layer 1) time remap value are the same,
    Make (thisComp layer 1) time remap value equivalent to (otherComp layer 1) time remap value

    Does that sound doable? Unfeasibly complicated explanation for the use case, but there is a good reason!

    Many thanks if anyone can help
    Dan

    Dan Ebberts
    replied 9 years, 9 months ago
    2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 28, 2016 at 5:34 pm

    You didn’t specify what happens if they’re not the same, but this should be close:


    if (timeToFrames(time) == timeToFrames(comp("otherComp").layer(1).timeRemap))
    comp("otherComp").layer(1).timeRemap
    else
    0

    Dan

  • Dan Turner

    July 28, 2016 at 6:48 pm

    Hmm, sorry I don’t think I’ve asked in the right way.

    I’ve now put everything into the same composition in order to make it a bit easier, but it’s a bit of a circular problem.

    Basically I have Layer 1 with Time Remapping applied – speeding up footage in curves.
    So at 03776 frames in (comp), the Time Remapping value of Layer 1 is 04247

    I want an expression on Layer 2 Time Remapping to say: at each Comp frame, look for the same value in Layer 1 Time Remapping, and use the related Comp frame number at that time as the Time Remapping value for Layer 2.

    So at 04247 in comp, the Time Remapping value of Layer 2 would be 03776.

    Essentially where Layer 1 is speeding up, I want Layer 2 to slow down inversely.

    This could potentially also be done with a slider?

    Many thanks indeed – this would be saving my life!

    Dan

  • Dan Ebberts

    July 28, 2016 at 7:45 pm

    Ah, that’s tricky. You might be able to take advantage of the characteristics of the curve you’re using for layer 1. For example, if it’s always increasing, your layer 2 expression could start at zero and cycle through layer 1’s time remapping values, frame-by-frame until you find the frame where layer 1’s time remapping value exceeds the current time. Something like that. It’s a bit of work, but it should be do-able.

    Dan

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