Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Delaying a layer start point based on x position

  • Delaying a layer start point based on x position

    Posted by Gabriel Aronson on January 15, 2016 at 11:54 pm

    Hi all,
    I am making an animation in the style of a credit sequence or endless scroll, vertically.
    All the objects on the scroll are moving vertically at a speed based on a simple slider control:

    [value[0],time*comp(“Master”).layer(“Speed Control”).effect(“Slider Control”)(“Slider”)+value[1]]

    The items in the scroll are are precomps with animation inside.

    I want to keep the speed of the entire comp flexible, so I can change the overall rate of the scroll with the slider, but I don’t want to change the speed of the animation within each scrolling precomp (hence cannot timeremap entire comp).

    I’m looking for a time remapping or time delay expression that will start the layer once the layer has passed x height 0 so that it’s triggered once it enters the frame. Any idea how I can delay a layer so that it is triggered based on an x-height threshold?

    Thanks!

    Gabriel Aronson replied 10 years, 6 months ago 2 Members · 5 Replies
  • 5 Replies
  • Gabriel Aronson

    January 15, 2016 at 11:59 pm

    Sorry guys, I meant the y-value, the vertical value, not x.

  • Dan Ebberts

    January 16, 2016 at 12:37 am

    It will probably be something like this:


    if (transform.position[1] > 0){
    t = time;
    while (transform.position.valueAtTime(t)[1] > 0){
    t -= thisComp.frameDuration;
    }
    time - t;
    }else 0

    Dan

  • Gabriel Aronson

    January 16, 2016 at 12:43 am

    Thanks Dan! This works like a charm, while waiting and playing around I used

    if (transform.position[1]<1) (1/30) else transform.position[1]/thisComp.layer(“Speed Control”).effect(“Slider Control”)(“Slider”)

    because I wasn’t aware of thisComp.frameDuration

    QUESTION ON TOP OF THIS

    Probably nothing for it, but after doing all this I am getting errors because i’m using particular in my precomp. Anyway to get around these errors? Like an alternative to time remapping?

  • Dan Ebberts

    January 16, 2016 at 1:01 am

    What kind of errors?

    Dan

  • Gabriel Aronson

    January 16, 2016 at 1:30 am

    Particular cannot work on a time reversed layer. I usually only get the error when the time remap is less than 0 but sometimes I also get the error that particular can’t work in a time remapped comp.

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