Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Loop out defined set of keyframes

  • Cutter Johnston

    April 25, 2017 at 1:44 am

    Dan,

    Is there a clear line/script that can be added to the loopOut expression that will stop the cycle at a marker or frame number? I tested convert expression to keyframes but that is not efficient.

    The solutions in the Stop loopOut [Nov 2009] post did not seem to work.

    Cutter

  • Cutter Johnston

    April 25, 2017 at 2:41 am

    To Be Clear:

    The loopOut in the script below works beautifully:

    a=wiggle(thisComp.layer(“Slider Controls Body”).effect(“Pelvis X Amp”)(“Slider”),thisComp.layer(“Slider Controls Body”).effect(“Pelvis X Movement”)(“Slider”));
    b=wiggle(thisComp.layer(“Slider Controls Body”).effect(“Pelvis Y Amp”)(“Slider”),thisComp.layer(“Slider Controls Body”).effect(“Pelvis Y Movement”)(“Slider”));
    loopOut(“cycle”,7) + [a[0],b[1]] – value;

    The goal is to have the (“cycle”) stop at frame or marker “?” to frame or marker “?” and change the movement between designated markers or frame numbers. Then pick up the original (“cycle”) again from frame or marker “?” to frame or marker number “?”.

    If it is simpler to edit comps together so be it.

  • Dan Ebberts

    April 25, 2017 at 3:18 am

    I’m having a hard time picturing what you’re describing.

    Dan

  • Cutter Johnston

    April 25, 2017 at 11:28 am

    Scenario:

  • A rigged character is dancing to an audio track for 1100 frames [timeline set to frames] using loopOut in the slider expression you assisted with.
  • At frame 299 I want the loop to stop for 100 frames [300-400] and change the movement.
  • At frame 401 the character picks up the initial loopOut movement for another 300 frames.
  • Then again at frame 702 the loopOut stops again for another 100 frames and the movement changes again.
  • This pattern continues through to the end of the audio track.
  • The frame numbers provided are just for illustration. Markers can be used if it is simpler. There are seven characters in the animation and they need to move as a group. It would be VERY efficient to “cut and paste” an expression into the characters 6 controller layers of each characters comp timeline. That way, refinements/changes to the movement will be confined to the sections of the timeline where the loopOut has been disabled and will not effect the overall timing of the choreography as their timing needs to be in sync. I often mistakenly shift keyframes.

    I hope this helps. I have a manually keyed clip if you need it.

    Cutter

  • Cutter Johnston

    April 27, 2017 at 10:21 pm

    Scenario:

  • A rigged character is dancing to an audio track for 1100 frames [timeline set to frames] using loopOut and the slider expression you assisted with.
  • At frame 299 I want the loop to stop for 100 frames [300-400] and change the movement
  • At frame 401 the character picks up the initial loopOut movement for another 300 frames
  • Then again at frame 702 the loopOut stops again for another 100 frames and the movement changes again.
  • This pattern continues through to the end of the audio track.
  • The frame numbers provided are just for illustration. Markers can be used if it is simpler. There are seven characters in the animation and they need to move as a group. It would be VERY efficient to “cut and paste” an expression into the characters 6 controller layers of each characters comp timeline. That way, refinements/changes to the movement will be confined to the sections of the timeline where the loopOut has been disabled and will not effect the overall timing of the choreography as their timing needs to be in sync. I often mistakenly shift keyframes.

    I have a manually keyed clip if you need it.

    Cutter

  • Cutter Johnston

    April 27, 2017 at 10:22 pm

    Sorry for the late reply…this sat in the Preview Window for days!

  • Dan Ebberts

    April 27, 2017 at 11:18 pm

    During the non-loopOut parts, what controls the movement (other keyframes?)? How do you make sure there isn’t a jump in the motion if you stop or start in the middle of a loop?

  • Cutter Johnston

    April 27, 2017 at 11:45 pm

    The keyframes ONLY happen every 6 frames in all instances of every layer through out the animation. [Done to keep in sync with the beats per minute of the audio track] Ideally the stopping of the loopOut will be set to occur at the proper frame or marker. If this is not possible I will replicate/key-in the required keyframes for a smooth stop. But mathematically this seems very possible. I just do not have high enough understanding of expressions.

    I read a post on CC that loopOut could be stopped at a frame or marker but I have been unable to add that expression or parts of it successfully. Below are the expressions from that post:

    stop = marker.key(marker.numKeys).time;
    loopDur = key(numKeys).time;
    if (time > stop){
    stop%loopDur;
    }else{
    loopOut();
    }

    And the other variation in the same post

    loopOut(type = “cycle”, numKeyframes = 0)
    stop = marker.key(marker.numKeys).time;
    loopDur = key(numKeys).time;
    if (time > stop){
    stop%loopDur;
    }else{
    loopOut();
    }

    Thanks!

  • Dan Ebberts

    April 28, 2017 at 1:43 am

    My guess is that this is tricky but do-able. I think there are still too many unknowns though to be able to launch into it and get it right.

    Dan

  • Cutter Johnston

    May 1, 2017 at 12:48 pm

    No problem…I will proceed with the seamless editing I have been using. Look for the finished product soon. Thanks!

    Cutter

  • Page 2 of 3

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