Problem looping walking animation

I’ve made a walking animation but when i play it to see how it loops, the left arm sort of jumps when it’s supposed to start again. The first and last frames are exactly the same and it loops from the start frame to the one before the last one. I’ve attached the example.

I have no idea why this happens, but it’s not the first time it happens. Could you please tell me what i’m doing wrong? Thanks a lot.

robotestAnim19.blend (609 KB)

It happens because your inserting key frames outside the range of the animation, and you’re not aware of the effects of doing so. To understand what is happening, you’ll need to learn more about the f-curve editor. In between key frames, blender decides what a bone’s loc/rot/scale should be based upon a curve in the f-curve editor.

So here’s what happening, the key frames before the range you have set are influencing the f-curves for that bone. Likewise, the key frames you have set after the range are affecting the animation f-curves as well.

Delete those key frames from the mis-behaving bones that are outside of the preview range and the animation works without the glitch…

Randy

Thanks for the answer.

I’m sorry but since i self-taught me all i know i have a little trouble understanding some terms you used. What do you mean when you say that my key frames are outside the “range of the animation”? Is it the preview of frames i’ve selected to be played in the timeline? Because if that’s so, i added those frames at the end because the animation looped incorrectly and i’ve sometimes solved the same thing in Max by adding those extra frames outside the range for the frame selected in the timeline window.

I’ve erased the extra frames i added (and the default position i had in the frame number 0) and i does loop a bit better but i still feel the arms loop somewhat weird. I’ve also attached the new version so that you can check it out.

robotestAnim20.blend (603 KB)

Thanks again.

Test. Test. Test. Test.

No problems, I’m self taught too! Yes, by ‘range of the animation’, I meant the preview frames you had selected, (maybe not the best choice of words on my part). Max should work the same way, but the terminology is different. Are you familiar with blender’s graph editor, or the max equivalent? Since I don’t know how much you know, or don’t know, I’ll briefly describe how it works.

You create a pose on frame 5 and key frame it, create a new pose on frame 10 and key it. So how does the bone, (or anything else that can be key framed), know what to do between frame 5 & frame 10? Animation curves, which you’ll find in the graph editor. There are 3 types of animation curves in blender, constant, linear, and beizer. By default, blender uses beizer curves. The shape of a beizer curve at any key point, depends upon the key point before and the key point after the point you are looking at. Yes, I meant to say key point and not key frame, because beizer curves behave the same (mostly) in any software that uses them. Actually since I am talking about beizer curves, I think I should be say control point, and not key point. Anyhow, create a beizer curve in the graphics program GIMP and it acts the same way. You have control points that control the over all shape of the curve, and you have 2 control handles that will allow you to fine tune how the curve looks. Remember though, the shape of the curve is also influenced by the control point before and after the one you are working on. So I think your glitch in the animation of the first file was caused because of those key frames outside of the preview range was affecting the animation curves at the first and last key frames in the preview range.

Whew, I hope that made sense. If it didn’t, I’ll give you an example file showing it and describe it better.

Yes, I did you at your new file, yes it does appear a bit glitchy still. I think that is blender just looping from the last frame to the first frame. In your example file, in the dopesheet, select all the key frames from frame 10 to frame 45, (a-key till no frames selected, b-key to box select, shift-d to duplicate) and slide them over so the first frame of the copy is at frame 50. Now your last key frame is at frame 85, so subtract 1 since this is same pose as frame 5, and you want to set the end of the preview to frame 84. Now I don’t see any pause until blender returns to the start frame in the loop, and it’s making 2 loops at a time.

Does it make sense? Try it, please, and tell me your results.

Will be away from the net for a few days, but I’ll look this thread up when I can…
Randy

I tried what you suggested and it works. I still don’t get what exactly i did wrong but i guess that it’s some sort of glitch. I’m gonna try to double the frames if i ever have this problem again. Thanks a lot!

Ok, my plans changed and I returned home after work tonight, so I got a few minutes to spend on this…

I’ll explain what you did wrong. It’s not a glitch, or error, or anything like that, the only thing in the last file you posted that was causing problems was that it took blender a fraction of a second to go from the last frame to the first frame. So it looked like a disruption in the animation. Please back up and re-read my explanation of animation curves…

I said I’d post a file if you didn’t understand it, but I’m rendering something, so I can’t use blender. So do it yourself, start up blender with the default set up, a cube, a camera, and a light. Go to a top view in the 3d view, select the cube and insert a key frame on frame 1. Advance 10 frames, shift-up arrow, rotate the cube 90 degrees and insert a rotation key frame. Repeat this step again, now the cube has rotated 180 degrees. Do this 2 more times, advance 10 frames, rotate 90 degrees, insert rotation key frame. Now your cube should rotate 360 degrees over 5 key frames. Play the animation and notice what happens. The cube starts slowly turning and speeds up, then slows down as it completes the rotation. Now open up a graph editor, there are 3 curves there if you only inserted rotation key frames, before frame 1, the three curves over lap each other and it only looks like 1 curve. By by frame 11, the next key frame, the z-rotation curve should have a point set that is above/below the previous key frame. Look at that curve carefully and you’ll notice it’s not a straight line, but it’s slightly ‘s’ shaped. That sort of smooth rounded curve is what produces the slow spin up and the slow down of the cube as it completes the rotation.

It a biezer curve, and it’s shape of one control point depends on the control point before and after the one you are looking at. Since there are no more key frames after the last one, the curve goes horizontal. That affects the shape of the curve before that last key frame causing the slow down at the end. Select every point in the graph editor with the a-key, and in the key menu, find the interpolation mode, and set it to constant, instead of beizer. Now look at the curve, it should be a horizontal line, the a straight diagonal line, the continue on as a horizontal line. Now playback the animation, it should rotate at a constant speed once it starts to rotate, without any speed up or slow down. Now convert the curve interpolation mode to constant. Look at the curve, it should look like stairs. Now watch the animation, the cube rotates in steps, 90 degrees at a time.

This is why your key frames before and after the preview range was causing the glitch. They were affecting the shape of the curve at the first and last key.

Hope this gives you some insight into how the curves work, they are important if you are going to do any animation.

Randy

I’ve started a new animation and found a new problem. I discovered that some of the bones actually did have some curves starting and ending differently so i normalized them by making sure the position of the first and last frames were exactly the same. Everything worked out fine except for one bone, the left arm. The curves seem to be normalized but i have no idea why it goes waaay up at the start of the cycle. I’ve attached the example. Thanks for the help.

robotestWalkTEST15.blend (609 KB)

No one knows? I really believe it must be something really obvious to the trained eyes but i have no idea what it could be =S.

I turned Auto Keyframe in the Timeline off.
Then I deleted the Keyframes on frame 0 for arm_R and forearm_R.
http://www.pasteall.org/blend/26944

Thanks for your answer.

I not only, tried to do you what you said (and strangely enough i could not erase the left’s arm zero frame…) but the actual example you provided does not solve the issue. Look closely at the frame 15, the left arm is still going up.

Sorry, I got the wrong arm.

From your example, I noticed you had some of the rotation channels disabled in the F-Curve Editor for forearm_L and arm_L, W and Z.
Also I noticed the W channel was locked from editing.

I noticed the odd up movement, seemed to be near frame 3 to 6, because Quaternions used W rotation, it may be a bit odd to fix in the current state.
I couldnt really reanimate it, so I deleted the keyframes on frame 0 and 5, for the left arm, then duplicated the keyframes from frame 85 to 5.

I cant be sure if thats how you want it to be animated.
If its still incorrect, I would try reanimate arms, but make sure the channels are not locked first.
Heres a different example: http://www.pasteall.org/blend/26950

I also noticed with the armature in edit mode, the bone roll was a bit different for each arm, this may be causing problems in pose mode.
forearm_R.Roll -172.18, forearm_L.Roll 146.99.

Thanks again. This time it did worked! I have no idea why the W channel was locked, i might have locked it when i was trying to disable it (btw i disable both channels because i noticed that they had no change so i disable them to be able to work more confortable).

About the bone roll, they are different because i didn’t clone them i just made the rig very quickly because this was just a test.

Thanks a lot!