Home Animation Showcase & Critiques

Any tips or tricks on how to properly Loop animation cycles?

polycounter lvl 9
Offline / Send Message
Blond polycounter lvl 9
So as you probably know, in most production, whenever we make certain in-game motions, you usually start with a ''starting motion'' that starts with the ''idle pose'' for example, then after that starting motion, you directly follow it with a loop
into which both starting frame and ending frame are the same pose, and then after the loop, we finish the motion with an ending motion.

For exmaple, a character looking at his watch or a map:



Frame 1: idle pose
Frame 1 to 24: raises arm to check his watch pose

Frame 24 to 56:Is looking at his watch(that would be the loop)
(so frame 24 and 56 are the same pose)

frame 56 to 74: goes back to idle pose


Pretty common and asic stuff right however....

My biggest problem when making these is the looping part...

Sure making the first and last pose of the loop is easy but there's still some jankyness in the animation whenever you look at it. And that's essentially because the tangents of both keys aren't the same. If you do try making the tangnets the same, it doesn't smooth in and out correctly with keys that are before and after....

Here's a pic hoping you understand what I mean...



So Am I doing sometinhg wrong? Is there a better workflow for animation cycles? A script?

Thank you for your help!



Replies

  • LiamReynolds
    Offline / Send Message
    LiamReynolds polycounter lvl 3
    I will just say what i do. Which, could be wrong haha and i may learn the proper method when someone responds with a solution.

    So when i have my start and end pose the same i turn on curve infinity and have it cycle loop which looks like you have on at-least. (cycle may not be possible if you've inserted a loop into the middle of an animation obviously) but when i tweak the end keys, i select both and then select the same tangent on each key and move them. That way each tangent is being moved to line up during the transition.

    Some people have different views on the next part but your 24 and 56 keys are playing twice so you hold that pose for a frame as it loops back creating a hold and a feeling of a pop - have you tried maybe doing 24 to 55? that way it plays the pose frame once.

    I would also go through and do this on every key i have. (moving the end and start keys' tangents together at once so in the infinity curve it looks smooth - but as yours in the middle of an animation that's harder to judge)


    quick edit - dont just have the tangents of the keys on auto, they might be 'flat' and ease in and out which might not work, hence moving the individual tangents together gives it a seamless curve rather than it slowing in and out.
  • AGoodFella
    Offline / Send Message
    AGoodFella polycounter lvl 5
    Could you maybe first have the looping part on its own without any other anims. That way, you can have the infinity curves cycle the  looping part.

    Then bake down the anim and have the before section blend into the looping part as best as you can. Same for the after section.

    Not sure if that's a solution.
  • Hito
    Offline / Send Message
    Hito interpolator
    you could grab the loop frames, set them to flat tangent so they're matched, then adjust the start/end tangent handles simultaneously.

    you could copy/paste the first frame to the last in the loop, that copies the tangents as well. then adjust the breakdown in the transition from look loop to idle loop.

    Tim Borrelli has a script that smooths out loop frame tangents github code is little further down. I think it's meant for self contained cycles, but worth a try.

    you could blend the transition in game to smooth it out. probably easiest, if not the best looking, option in a case like this.

    In the end I think for the case you're describing, you have to redesign the overall action so you don't have weird overshoots in the middle loop points, you have to compromise a little with the in/out transitions by making them more linear.
  • Blond
    Offline / Send Message
    Blond polycounter lvl 9
    I will just say what i do. Which, could be wrong haha and i may learn the proper method when someone responds with a solution.

    So when i have my start and end pose the same i turn on curve infinity and have it cycle loop which looks like you have on at-least. (cycle may not be possible if you've inserted a loop into the middle of an animation obviously) but when i tweak the end keys, i select both and then select the same tangent on each key and move them. That way each tangent is being moved to line up during the transition.

    Some people have different views on the next part but your 24 and 56 keys are playing twice so you hold that pose for a frame as it loops back creating a hold and a feeling of a pop - have you tried maybe doing 24 to 55? that way it plays the pose frame once.

    I would also go through and do this on every key i have. (moving the end and start keys' tangents together at once so in the infinity curve it looks smooth - but as yours in the middle of an animation that's harder to judge)


    quick edit - dont just have the tangents of the keys on auto, they might be 'flat' and ease in and out which might not work, hence moving the individual tangents together gives it a seamless curve rather than it slowing in and out.

    Good advice my friend but unfortunately, I know all of this already.

    ''So when i have my start and end pose the same i turn on curve infinity and have it cycle loop which looks like you have on at-least. (cycle may not be possible if you've inserted a loop into the middle of an animation obviously) but when i tweak the end keys, i select both and then select the same tangent on each key and move them. That way each tangent is being moved to line up during the transition. ''


    See, this is exactly what I do when my whole animation is a loop. Everybody knows the old ''show infinity''+ ''curve/post-infinity/cycle''. And yes, whenever doing this I manually adjust the tangent of start and ending frames..however for a loop insert between 2 motions in the timeline, this will not work...:(



    Could you maybe first have the looping part on its own without any other anims. That way, you can have the infinity curves cycle the  looping part.

    Then bake down the anim and have the before section blend into the looping part as best as you can. Same for the after section.

    Not sure if that's a solution.

    That's definitely a solution to my problem..although, I expected something more simple and easy..I guess, I'm have to do it this way...
  • Einar
    Offline / Send Message
    Einar polycounter lvl 5
    So lots of smart tips here, but what i would do if i were you is to make good use of animation layers in this case, set the pose in the bottom standard layer (No Animation), but all of the animation for the loop should be done in the "WatchIdle" Layer. With the animation on it's own layer you can offset your cycle, work around tricky curves, cycle it properly, then blend it in and out with the weight for the actual transition.

    Hope it helps.

    Edit: I just tested, and this is very hard to do if you didn't make a different layer for each animation from the start unfortunately. Still might work if you export your layers.
  • brucemoose
    Offline / Send Message
    brucemoose polycounter lvl 3
    The quick and dirty way is say you have a 24 frame cycle then simply select all your controls and shift left click frames 1-23 go to 24 and paste, works a charm. Rinse and repeat for however long you want your cycle.

    If you use quicktime pro it's very easy to extend loops seamlessly on there as well with the crl c a commands.

    None of this would work if you were animating the camera as well, the best way to do that would be in anim layers, well probably the trax editor but I haven't used this feature that much to comment on it.
  • tholmes3d
    Offline / Send Message
    tholmes3d polycounter lvl 11
    Hito said:
    In the end I think for the case you're describing, you have to redesign the overall action so you don't have weird overshoots in the middle loop points, you have to compromise a little with the in/out transitions by making them more linear.
    From what you've described, I think you could fix the issue with choreography like Hito said and in this case I don't think you'll need to flatten the curves. You could design the system so that the intro has the arm raising up slightly higher than necessary and then settling down into the loop for a few frames. The loop would then start on a downward motion. This will be a natural continuation of the intro motion, as well as making it so that your loop ends with the arm moving down which will blend well into your exit. 

    Another thing to consider is what are the condition for the player to exit this loop? If it's based off a system where it plays the loop X amount of times, then this work will be worth it. If this needs to feel responsive and the player can break out of this loop at any time, forcing the exit anim to play, then there's little benefit in making the transition from idle to exit super smooth. In this case you'd just want to make sure your in-engine settings use enough interp to cover the gap between wherever the hand is in the loop, and the first frame of the exit. 
Sign In or Register to comment.