Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions control time remap by position of another layer

  • control time remap by position of another layer

    Posted by Tzur Livne on January 10, 2012 at 9:03 am

    hi
    i want to control a layer’s time remap property using the position of a null in another comp.
    its for playing animation controled by a graph (the null is moving along the graph with keyframes).
    i need to be able to play the animation back & forth in changed speeds, acording to the null’s position.
    i tryed with “linear” expression but i get errors, or the timeremap property stay on a fixed value that is one frame after the animation ends.

    here is what i did:

    comp GRAPH:
    a null has keyframes of position follows along the graph.
    comp MAIN:
    animation layer has on the timeremap:
    open=0;
    close=152; //frame#, when i tried with seconds i got “; expected error //
    linear(GRAPH null position,302,448,close,open)

    the resault was timeremap valu stuck on 300. the last frame is 299, so the layer i invisable at 300.

    help?

    thankes,
    tzur

    Tzur Livne

    Tzur Livne replied 14 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 10, 2012 at 2:24 pm

    Time remap does expect values in seconds, not frames. Assuming you are using movement of the null along the x axis to control the time remap, I think it will look something like this (not tested):

    open=0;
    close=152*thisComp.frameDuration;
    x = comp(“GRAPH”).layer(“Null 1”).transform.position[0];
    linear(x,302,448,close,open)

    Dan

  • Tzur Livne

    January 11, 2012 at 9:17 am

    thanks, worked just fine.

    Tzur Livne

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