I have what seems to be a fairly common problem (From what I've seen while searching) that I can't quite seem to solve. I'm trying to make a character walk down a street. This is the first proper walking animation I've attempted in Blender (Did a couple in 3DS Max and Maya years ago). I've created a walk cycle action called walk which repeats perfectly in place. I've also created a moveForward action which moves the character forward. This works fine with a Cyclic F-modifier as long as I keep the action as a keyframe animation, the character will keep walking down the street indefinitely. This is great for time saving but not so great for control and general animation. My problem comes as soon as I try to make it into a looping action that I can layer into another animation. The character will move through 1 loop and then jump back to his starting position.

The way I have the animation set up: bones animated for the walk cycle (walk action) The whole armature object moved forward (keeping the supporting foot in place - as per Jjannaway3D's Sintel Walk Cycle Youtube videos) for the moveForward action.

My biggest problem with following that tutorial exactly is that he duplicates the forward motion keys for every loop, however my animation is 90% walking for 2 min 30 punctuated for a few seconds here and there by other actions that need smooth transitioning, which would be better served by layering actions.

I've looked, on and off, for a couple of days and the best answer I could find was from this question How should an animated character be moved while repeating a walk cycle? (basically the same problem) but it doesn't appear to work for my situation.

The walk cycle is 27 frames long. I've taken a snapshot of my Blend file setup on frame 28, once using just a the Cyclic F-modifier and once using the same animation as a repeating action.

Frame 28 - Keyframes only - Character is continuing forward

Frame 28 - Repeating action - Character snaps back to origin

As you might be able to tell, in the 2nd image the character has snapped back to origin 1 frame after the first animation loop. I'm sure there's a simple solution but I can't seem to find it.

Any help would be greatly appreciated.

Edit: Updated to reflect Phip's suggestion.

New set up: same armature + root bone parenting pelvis and IK targets Walk action: same as before Forward action: moves the root bone forward, keeping the supporting foot in place to prevent slipping. First and last frames are set to linear interpolation and the forward action is F-modifier'd.

I can upload my blend file somewhere if that'd help?

Still slipping

I'm far from experienced with animation, but as you've not had an answer yet; I'll try to help.

In the images you provide I cannot see a root bone for your rig, a root bone should not be keyframed at all in your walk cycle, and should be the parent of your armature.

When you translate your walk cycle into your animation, it should be keyframes on the root bone that control the position of your armature in world space, and your action strips that control the movements of the bones of your model. These separate actions need to be well synchronised to prevent slippage of your character in your animation, this is discussed in the latter portions of the videos you refer to, and also the question you referred to posted by stacker.

If any of the keyframes in your walk cycle control the world position of your rig, then this is the reason your character has snapped back to the beginning.

  • Thanks for that. I added a root bone and animated that instead of the armature object but unfortunately it still snaps back as soon as I convert the action into a track on the NLA editor. I'll update my question to reflect my progress with your answer. – drent Mar 22 '14 at 0:52
up vote 2 down vote accepted

Oh dear, I feel kind of stupid but also so glad I worked it out.

So this is the setup that works.

Action 1: walk - in-place walk cycle

Action 2: moveForward - moving the root bone in time with the feet to avoid slipping. F-Curve modifier set to repeat with offset.

Convert both animated actions to action strips on the NLA editor. Here's where I was going wrong and what to do right. I was setting the repeat value on both strips. This worked for the walk cycle which has the same start and end frame so the "snapping back" isn't noticable but caused the character to walk forward then snap back at the end of each forward motion cycle. In essence it was only repeating the first F-Curve and ignoring all the future repeats with offset. To fix this I set the repeat value on moveForward to 1 and then set the end frame to what I wanted. This then allows the character to keep moving forward, applying any extrapolated future F-curve repeats to the motion. This also allows for extra animations to be layered on top.

For example if you have a walk cycle that's 25 frames long and you want the character to walk straight for 10 seconds (assuming 25 fps) you can set the walk action repeats to 10 and the end frame for the moveForward action to 250 frames (leaving the repeats and scale to 1).

I now realise that this is pretty much exactly what Adhi said in the other question I linked to but it didn't quite make sense to me for some reason. Anyway. I hope this will prove a useful tip for anyone else stuck on a similar looping animation problem.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.