Walk cycle along path WITHOUT feet-sliding!

If I make a walk cycle, how do I avoid its feet sliding when it has to walk along a path?

I searched youtube, but I can’t find anything blender-related, I found this one though, but it is for Maya, don’t know if the technique will work in Blender. A blender-friendly walk-along-path-without-feet-sliding is much appreciated!

1 Like

If you are using IK - parent the feet IK targets to a “root” bone (See the Rigify rig) - parent the major spine bone to the root bone - don’t move the root bone in the animation, only the feet IK targets and the major spine bone.

If you are not using IK - mmmmm more difficult!

Cheers, Clock.

What is meant by “feet IK”?

My character has its feet connected to the leg with inverse kinematics, the feet are controlled by control-bones, which is controlling the entire foot, it is not the deform-bone. Is this the IK bone? The only thing I specified with IK, is the leg, so when I move the foot-controller up/down the knee is bending accordingly.

Exactly: this is the Ik target specified in the overall leg IK constraint, sometimes that IS the foot, sometimes it is not - but it is still the IK target that controls the leg. Some people (me included at times) also add the foot to the IK chain, so to me it is the “Foot IK” whether it is really the foot deform bone or just an IK target for the leg.

So for your walk cycle - you move the IK target up and forwards, then forwards and down to mimic a step. If you only keyframe the start and end point the foot slides along the ground. So to stop this you also keyframe the IK target halfway along the step when it has raised the foot off the ground and bent the leg slightly (you should also turn the foot down a little so the toe is nearer the ground as that is the way 99.9% of humans walk - the rest fall over all the time). You could even keyframe several stages of the sep rather than just three - BUT - you must keyframe at least three to get the foot off the ground in mid step.

Does this make sense?

Cheers, Clock.

It’s not just Blender that causes sliding feet, it’s down to your animation itself. If your walk cycle is off, the feet will slide or the walk will jump. You need to work on the animation.

I guess you made a walkcycle in place already and you want to move the root bone along a path without food sliding.

So here i my solution.

  1. Make sure your walkcycle in place is without acceleration, it means linear interpolation in the graph editor.
  2. You need the lenght for one food step, its the y value of the IK food controler from max to min.
  3. You need the lenght of the path, this is easy with animation node addon (get spline lenght node)
  4. Make your walkcycle to an action so that you can reapeat it easy.
  5. Give your root bone a follow path constraint (Target is your spline)

Now we want to animate the follow path contraint OFFSET but how we know the right offset value for each frame?.

spline lenght / (frame info*(step lenght (its info 2.)/frames for one step (its the x value from max to min)=1

Offset is from 0 to - 100 so we need to multiply the formula above with -100

  1. Open a object attribute node in animation node and paste the data path from the follow path offset.
  2. Feet the value of 6. with the formula above and it should work.

The cool thing about this setup is.

  1. you can change the curve lenght
  2. you can change the walkcycle speed if you divide the lenght for one food step and the action scale with the same value
  3. you can bake the root bone action along the path.
  4. you can change the acceleration and animate it …but unfortunately cant bake this action ( nla stripes cant be repated with different scale …or i dont found a way).

Here is the blend file only with one leg…you need the animation node addon installed

Attachments

walkcylce_02.blend (721 KB)

Do you have a solution that does not involve third party addons, and which are much simpler than this?

Old, but it still may work for you. https://www.youtube.com/watch?v=6my-rTuUsEw Can’t really tell if you don’t put a specific blend in because it may be very dependent on how you have rigged it as Clock was alluding to.

People have already commented with good detailed descriptions.

But basically when you animate a walk on the spot. Where you have the foot sliding back while on the ground. You must have the curve set to a straight interpolation and not curved, so it slides back at a constant steady rate with no slow in or out.

Then copy and flip the straight liner part of the curve to the ( root ) or ( move all ) bone/controller of your character. Then in the cycling options. Change it from ( constant ) to ( liner extrapolation ) So it carry’s on in a diagonal straight line into infinity when viewed in the graph editor.

The root controller or bone will move forward at the same rate as the feet are sliding back. While carrying the whole character with it.
The character should appear to be walking forward while the feet are locked in place while on the ground.

Ok, I tried it, but it basically means that I have to position the legs/feet for the entire walk cycle. Say, if my character has to move 20 steps, I have to manually add these feet positions and spine bone movements… 20 times. Isn’t there a better and more efficient way of doing this, so I can at least copy the walk, and then go in and make manual tweaks later for variation?

I tried to copy and paste the foot positions but then the entire rig gets messed up, because it is based off location. Otherwise I will have to manually copy each Z and Y positions for the foot IK, and then i am back at manually position this tedious process. There ought to be a more effcient, precise and way faster method. I can’t believe if the industry is actually doing this manually btw.

This is what I did, using your method. As you see, it is pretty annoying process. Which method can I use to give me the same/better result way faster?


(I am looking for an industry-method).

There are two methods and thats the standard

  1. step by step without moving the root bone …what you do and tried.
  2. move the root bone with the same speed like ONE STEP of your local walkcycle.

Here is a good explenation how method 2. works …http://blender.stackexchange.com/questions/3736/how-should-an-animated-character-be-moved-while-repeating-a-walk-cycle
my solution is just addition to this method descriped in the link.

There is no one click solution…maybe my setup is more diffcult but its more flexible.

Thanks. I have yet another question: My character should walk on an uneven surface. Is there a super-fast method of making the pose stick to the surface, or do I have to manually place the feet on the ground? Which method would you recommend for this?

You can get the feet to track along a curved path - which could also take care of the rise and fall of the feet between steps. Then however you need to keyframe the movement along the curved paths so the feet move realistically - anyway you look at this there is NO quick and easy way to make a realistic walk animation that I have ever found.

Cheers, Clock.

If your ground is uneven i would recommend what clockmender told…the step by step way, because even if you know the the curve lenght and calculate the right root bone speed every non linear curve means non lienear speed=acceleration=food sliding.

Also walking along a path needs to be baked to adjust the movement…its just a starting point.

THAT IS THE SUPER EASY WAY…ANIMATION IS NNNNNNNNNNOOOOOOOOOOOTTTTTTTTTTT SUPER EASY …ITS DIFFICULT AND PAIN IN THE ASS…and you need a LOT of practice to be good.

In case anybody else is wondering how to do this, here’s what I’ve been doing. (animating a repeating walk cycle of a character Clamped to a path)

In the very first frame of animation, make a mark of where your character’s stationary foot is planted on the ground. (You can easily do this with the Annotation tool set to Surface).

Then, animate forward. Note how eventually the foot changes its position. Now your goal is to move the END frame of your animation in such a way that the stationary foot DOESN’T move (as much as possible) from its original position. Now, provided the other foot is animated symmetrically, your character is moving along a path with a constant speed, and constant cycle repetition, you’ve just adjusted EVERY single cycle of your animation to have the stationary foot not slide during the forward movement.

Note: if your character is accelerating or slowing down at any point, you will have to work with each same-speed segment individually, adjusting their respective end positions.