Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions y Position move with hold keyframe

  • y Position move with hold keyframe

    Posted by Olly Bea on February 2, 2010 at 1:51 pm

    Hey guys, I had a go at this, but I think its beyond my limited knowledge. There are just too many variable I need to concentrate on!!! Can anyone help?

    1. I have a layer I would like to move up the screen in the y axis (the x does not change)

    2. I would like the layer to move like a “hold” keyframe ie. not continuously, and the amount of time in between each move I can set.

    3. Finally I would like the distance moved would initially be 9 pixels but this would also be adjustable.

    Is this doable or am I being greedy?

    Any help would be superb, otherwise I am going to have a keyframe marathon, and we all know keyframes are frowned upon!!!

    Cheers

    Olly

    Jk Patel replied 9 years, 4 months ago 4 Members · 13 Replies
  • 13 Replies
  • Dan Ebberts

    February 2, 2010 at 2:17 pm

    Try this. Add sliders named “amount” and “delay” to your layer (be sure to set them to something other than zero) and apply this position expression:

    amount = effect(“amount”)(“Slider”);
    delay = effect(“delay”)(“Slider”);
    t = inPoint;
    y = 0;
    while (t < time){ y += amount.valueAtTime(t); t += delay.valueAtTime(t); } value - [0,y]

  • Olly Bea

    February 2, 2010 at 2:26 pm

    Thats amazing, thank you, speedy response as well, much appreciated. You tha man!

    Cheers

    Olly

  • Olly Bea

    February 3, 2010 at 5:49 pm

    Another thought regards this really good expression, if I may…

    Can the delay slider work in frames per second? I am having trouble trying to accurately control it over time when its on a 0 – 100 increment.

    Cheers

    Olly

  • Dan Ebberts

    February 3, 2010 at 5:58 pm

    This should make your delay slider work in frames rather than seconds:

    amount = effect(“amount”)(“Slider”);
    delay = effect(“delay”)(“Slider”);
    t = inPoint;
    y = 0;
    while (t < time){ y += amount.valueAtTime(t); t += framesToTime(delay.valueAtTime(t)); } value - [0,y] Dan

  • Olly Bea

    February 3, 2010 at 7:02 pm

    I thought my head might explode trying to work that one out!

    Thank you very much

  • Fernando Almeida

    March 26, 2010 at 3:22 pm

    Hi All, I have similar question?
    I would like to do a stop motion animation.
    My idea is skip frames using Hold keyframes.
    Is it possible to do with expression?
    I would like to apply this expression for rotation and position.
    Regards, Fernando.

  • Dan Ebberts

    March 26, 2010 at 6:01 pm

    I’d start with posterizeTime(). You supply the desired fps. So, if you wanted 12 frames per second, it would be like this:

    posterizeTime(12)

    You’d apply it to each property you wanted to affect.

    Dan

  • Fernando Almeida

    March 26, 2010 at 7:29 pm

    Hi Dan, I try insert your expression in rotation property but a warning massage appear.
    I have 2 key frames start rotation and end rotation.
    When I press Rotation stopwatch with option(alt) a small code appear.
    I remove it and insert your code, but not worked.
    Look the image.
    Image

    transform.rotation

    posterizeTime(12)

  • Dan Ebberts

    March 26, 2010 at 7:44 pm

    Ah yes, sorry. Try this:

    posterizeTime(12);
    valueAtTime(time)

    Dan

  • Fernando Almeida

    March 26, 2010 at 8:05 pm

    It works!
    Thank you very much!
    Time is money 😉
    Cheers

Page 1 of 2

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