# Walkcycle - A few Qs

I’ve managed to design a nice robot, texture him and give him an armature with IKs on the legs and arms. I’ve given him an NLA walkcycle and attached him to a path. I ‘think’ I’ve correctly calculated the stride pattern as he is definately stepping in the right direction, however his feet still slide a bit. The stride pattern must be right as when I make the number lower his feet end-up sliding backwards as if he’s walking on banana skins. If the number is higher his feet slide forwards as if he is ice skating. Unfortunately I can’t get them to stay still… they move slightly forwards and then slightly backwards. I’ve searched a few posts and can’t find the answer. I’ve tried a few different rig set-ups and it’s always the same. I think this thread might say something about it but it’s too complicated for my beginers brain.

I’ve also tried to bend the path but I can’t get him to actually face the way he is walking. For example, if the path is shaped like a U bend then he walks forward, slides sideways and then moonwalks backwards.

Any help would be very much appreciated!

Try with this one:
https://blenderartists.org/forum/viewtopic.php?t=23137&start=45

It’s not complicated, you have to mathematically match the lenght of the path with the stride of the action.

Env

Hey, I don’t know how could I missed that interesting discussion on you Dinosaurs thread…

Another way to find out the lenght of the stride is by getting the X/Y (whatever the characters is heading to in the action editor) locations of the feet in its “contact” pose. Just select the bone and press N to find out. Then the difference between these two numbers is the half-stride.

Looks like slikdigit have found a nice way for path calculations

I have to take a good look at it and write something about it…

Cheers.

malefico.

It’s not complicated, you have to mathematically match the lenght of the path with the stride of the action.
Well, my brain hurts, so it’s complicated for me!

The length of my path is 43.6516, my stride length is 7.

43.6516 / 7 = 6.2359428 (This is correct as he does take about 6 steps)

The default time IPO of the path is 100, so 100 / 6.2359428 = 16.036067 (The time of each step). The problem is I don’t know what to do with this figure. Where do I have to put 16.036067???

I’ve also looked at the other method. The length of my cycle is 41 frames. 41 * 6.2359428 = 255.67365. If I change the time of the path to 255.67365 what else do I have to change to make him walk better?

Sorry if I’m being thick! Thanks for helping!

Another way to find out the lenght of the stride is by getting the X/Y (whatever the characters is heading to in the action editor) locations of the feet in its “contact” pose. Just select the bone and press N to find out. Then the difference between these two numbers is the half-stride.
Cool… my armature is round the wrong way so you have to go into front view (1) to see it sideways. But you are right LocY on the front foot is -5 and on the back foot it’s 2… a difference of 7. So if 7 is my half stride then 14 is definately the correct number to put in the stride! The feet still slip a bit tho!

The length of my path is 43.6516, my stride length is 7.

43.6516 / 7 = 6.2359428 (This is correct as he does take about 6 steps)

The length of my cycle is 41 frames. 41 * 6.2359428 = 255.67365. If I change the time of the path to 255.67365 what else do I have to change to make him walk better?

According to slikdigit’s method, I think that’s it. However I have problems with some confusing use of terms… For instance, I call the stride= two steps = 1 cycle. So, if your cycle (complete, thus 2 steps), is 41 frames, and your stride is 14.000(I found very strange the stride being so exact), you should have:

43.6516 (lenght of path) / 14 (stride lenght) = 3.1172

41 frames/cycle * 3.1172 cycles = 127.8075 frames to cover full path

So, you should edit IPO curve and move the last node to X=127.8075 Y=1.0

Now, if you still have problems, it might be that the problem is in your walkcycle. All these calculations assume you have constant speed. So, you character’s feet should displace at constant pace during the cycle, check it out. Beware of ease in/out of IK bones at the first and last frames of your walk action.

Cheers.

malefico.

Hmmm… I pretty much think I am doing this right but it’s still not working exactly how I’d like… Here’s a blend of it. - It’s all been stripped away except for the armatures. Layer one is the walk cycle, layer two is the walk cycle parented to the path (this is where the sliding motion occurs) and layers three and four are an arm rig which I’ve also been playing with.

I think it could be the ease-in and ease-out of the bones on the IPO curve but when I edit this manually I get in a right mess!

Hi,

Well I have take a look at your blend and it’s a nice mess you got there

Anyway, I reset your armature (named bones with .L/.R convention, set center of armature in the middle (it was displaced), align armature axis, recalc roll bones, and change a copy location constraint).
After all that, I fixed most of the problems. I made a new walkcycle (now paste flipped pose works), edit IPO curves as I told you, and parent to a path. Finally, edited IPO curve for the path to match speeds and that’s it.

Must say that it still slides a little, a very subtle sliding, but I think the problem there is the walkcycle itself (made it in a rush).
The resulting blend I could email it to you. If you want it, please drop me a line.

Cheers

malefico.

Malefico,

You are a legend! Thank you! Yes please, e-mail me the new version (I’ll PM you)… I will have a go at it myself and try and match what you have done else I won’t learn anything. If I run into problems, which I’m sure I will, I’ll carry on adding to this post!

Thanks again!

Elye

I got rid of all sliding retouching the walkcycle itself. Problem is like this:

Since the armature is “walking” at constant linear speed I had to make sure the feet were indeed moving linearly at constant speed. So I edited IPO curves for Y location (the axis I’m moving forward) for the feet bones so they do not change speed during the cycle. Otherwise, the feet would accelerate at some point producing the sliding effect. I had to take extra care with the “high point” poses, where the feet start to lift and detach the floor.

To avoid feet keep sinking down the floor, I edited the IPOs and scale all keys for Z location to a constant value everywhere the feet keep touching the floor.

Of course, this only works for straight (and almost straight) paths. For very curvy paths, you are screwed , unless you use constraints to keep feet fixed at certain locations… but that’s another story… (a cumberssome one BTW)

You’re welcome

Okay, I’m trying to do some of the things you have but am not quite sure how to do them…

Reset armature
How do you do this? Do you mean you delete all actions and get it back to the condition in which I modelled it? or is there a special button? I know about the Rest Armature button but if this is enabled I cannot move the armature or copy it… When I un-rest it my bones move all over the shop!

EDIT: I think I’ve just figured this out. You have to select one bone at a time and return all values in the transform properties window to zero!?!

Set center of armature in the middle
Is there a way to do this like there is when modelling? I couldn’t find one so I had to move all the bones!

Align armature axis
Don’t know how to do this or why it is important?

Recalc roll bones
Is this done by pressing CTRL+N? If so, I’ve done that but can’t see any difference.

I’m sure I’ve read somewhere about the steps needed to set an Armature up before animation, but I can’t find it!

Yeah, well, most of these things are written in the Online Docs (plus all tutorials around) but, don’t worry, I have a pure heart :Z

Reset armature: I meant, re-setup. So, since you had your armature’s center displaced, bones named in a wrong way, etc. I renamed bones, and recenter.

Recentering armature: No way to do it automagically like meshes (and I have asked and begged and all I got was new themes for interface… :< ) . So, erase half of the bones. Move central bones to center (you can help yourself placing the cursor at armature’s center, then select bones and scale X/Y (pick what corresponds) to zero referring to cursor position till you 're done.). Then duplicate bones and mirror them. Rename them. TADA !!!

Align axis: If armature object axis are not aligned to world, ugly things will occur which I don’t dare to describe. Select armature object, rotate it so in frontal view you see it frontally, then CTRL+A (Apply size/rotation-> YES !!!)

Recalc roll bones: CTRL + N, yes sir. Just in case.

Anything else ?

Cheers.

malefico.

PS: Seyacat gently allowed me to host the sample file at his site:

http://www.seyacat.com/niel

PS: Print all this and put it under your pillow !

You hit upon the core problem in walk cycles; the path anim moves the object at a constant linear speed, yet a real human does not; there is an acceleration as the back foot pushes off, then a deceleration as the front foot makes contact (the brain is setting the foot and adjusting the ankle tension to take the weight), etc. Watch someone sneak up on you to see the exaggerated body motion.

What I did is to move the whole armature back and forth (in side view) in the Action setup (setting a Loc key for the lower back bone) and have no foot slipping (ice skating) after tweaking. There is a thread post about setting foot constraints but is very complicated and requires planning out where each foot step is gonna go.

Also be aware the whole body moves up and down as well, and shoulders rotate from side to side opposite the hips, and arms swing -all need to be there for a convincing animation. Pigeons have a really interesting head strut too. %| so many things to model, so little time…

Keeping your camera focused/centered on mid-body at head height will also take the viewer’s eye off any foot slippage anyway.

PS: Print all this and put it under your pillow !

I’ve just printed it!

I’ll give it 100% over the weekend and see how I get on… Fingers crossed I’ll have something good to show on Monday!

EDIT: I’ve just had a sneaky go at it while i’m at work! :Z It’s close, but the feet still slide backwards a tiny bit. I’ve done everything you said like tidying up the armature and changing the IPO curves to linear. I haven’t done any manual tweaking yet though as it’s taking me a while to figure out which line does what! %|

I haven’t got the same ‘rolling of the feet’ action as yours but hey, I’m a beginer! Have a look if you want…

I think I fixed your sliding issue.
Here’s the deal.

Go to the Action Editor
open WALK action in by clicking the scroll menu and selecting it
then highlight IK_FootL

Go to IPO window, select type action
use K key to see keys
select & delete the key at frame where the slide occurs

do the same for IK_FootR

Then go back to the Action Editor and ‘X’ the walk cycle. This means you’ve finished editing the cycle and the NLA will have control of it once more.

Ok… I’m trying to put into practice what I’m learning here so I have applied my walkcycle to a robot I’ve designed (see below). It isn’t a normal walkcycle as the robot has, and always will have, flat feet that don’t need to rotate or bend when they hit the floor. Anyway, I’ve made an armiture with IKs and am happy that I have skinned it properly… I have given him the stationary 41 frame walkcycle and I am happy with that. However, when I convert this walkcycle to an NLA strip his legs start bending the wrong way!!! What am I doing wrong??? :<

Any chance you haven’t bent robot’s knees enough in edit mode ? They should be a little forward to ensure proper articulation.

Nice robot BTW.

I dunno? I’ve made a walk cycle and as far as I’m concerned it should be the same when you convert to NLA??? Here, have a look… It looks nice but convert it to an NLA and it all goes pear shaped!

Thanks Malefico, I owe you 5!!!

OK, yes, the problem is what I told you. Do this:

Put your armature in rest pos. Enter edit mode and select the bone root/tail at knee location (just the bone end, not the entire bones) for BOTH legs. Move them a little “forward” in the side view. Done. If it still doesn’t work, you need to move them a little more.

Remember, you need to set up your knees/elbows in an angle to avoid crazy rotations ( a Blender little limitation). Do not set articulations “straight”. OK ?

Now you owe me 6 !

Yippee! I’ve done it! I’ve finally got something that I’m happy with! Take a look and let me know what you think! It’s a WMV and it’s about 2.5 MB… I could touch it up by adding small dust clouds when his feet hit the floor and some better sound. But this was a quick job to show you the walk cycle!

I can’t thank you enough Malefico! You’ve been a BIG help! If, as I plan, I manage to get this into a 3 or 4 minute video for my band ZARK7 then I will definately add you to the credits!

Thanks to everyone else who helped on this thread! Blender and Elysiun rule!

Hey, that’s looking goo d ! Congratulations !