Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 360º incremental layer rotation with pauses

  • 360º incremental layer rotation with pauses

    Posted by Mac Morgan on February 19, 2024 at 10:40 pm

    I have spent days researching this:

    I have a circle with 40 numbers (years 1984 through 2024) equally distributed around its perimeter.

    I can keyframe this circle of numbers to:

    Rotate -9 degrees for 12 keyframes;

    Stop and hold rotation for 24 keyframes;

    Then repeat from last rotation value to continue 360º of the 40 numbers.

    I am using a null as the control layer but cannot cobble together an expression to achieve this using valueAt Time etc.

    Thank you for any tips or articles you can share.

    Example: https://motionmission.wistia.com/medias/n3m55rl74f

    Brie Clayton replied 2 years, 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 19, 2024 at 11:38 pm

    This is just a rough stab at it, without actually seeing what you’re doing, but I think it’s going to look something like this:

    r = thisComp.layer("r_control").transform.rotation;
    val = 0;
    if (time >= r.key(2).time){
    n = Math.floor((time - r.key(2).time)/(r.key(4).time - r.key(2).time));
    t = (time - r.key(2).time)%(r.key(4).time - r.key(2).time);
    val = r.key(4).value*n + r.valueAtTime(t + r.key(2).time);
    }
    val
  • Mac Morgan

    February 19, 2024 at 11:58 pm

    Dan, Thank you for the concept. I will study it, learn from it, try it. I read your post on time control in your blog which was also most educational, particularly in reference to the easing aspects of the range.

  • Mac Morgan

    February 20, 2024 at 6:27 pm

    It worked perfectly.

  • Brie Clayton

    February 20, 2024 at 8:39 pm

    Thank you for this solve, Dan!

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