0
$\begingroup$

I'm trying to animate a simple walk cycle based on this tutorial, However one of my foot dips for some reason and the other moves perfectly along y axis. How do I fix this?

Editor Screenshot

Editor Gif

$\endgroup$
2
  • $\begingroup$ Well, there already is an answer but if I were you I would have simply compared the keys of the correct leg bones to the incorrect bones on their corresponding frames where they are in the similar position and check which differences there are. Or just copied the flipped animation from the correct leg to the other... $\endgroup$ Commented Sep 5 at 18:13
  • $\begingroup$ @GordonBrinkmann I actually did try flipping and pasting the animations from the correct key frames but I still got the same error, so I posted here to maybe get the root cause of this problem :) $\endgroup$
    – cak3_lover
    Commented Sep 6 at 0:59

2 Answers 2

1
$\begingroup$

It would appear that there is a slight dip in the FootBoneIK.L curve as seen in the Graph Editor. When I adjust the Z location keyframe at frame 20.0 and increase it slightly (or delete it), the foot no longer descends goes below the 0.0 elevation.

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you this work! However I can't figure out why this happened in the first place and will this be a reoccurring issue? $\endgroup$
    – cak3_lover
    Commented Sep 6 at 0:56
1
$\begingroup$

You asked how this happened, well to answer that we needed to know how you created the walk cycle in the first place and how you copied one pose to the other. But at the very end I will make a guess how it happened and what you could have done differently.

Now just as an illustration and alternative solution, instead of slightly adjusting the Z location or deleting the keyframe, there is something quite simple how to get both legs move the same - exactly, not somehow.

As I said in my comment, I would simply look at the curves and see in which way they are different. Only the Z location seems to be the problem here, so I take a look at them on both feet:

comparing both curves

Both have two local extrema, a maximum and a minimum, they are both at the same height and the same distance apart. But the blue curve of the correct cycle starts and ends with keyframes which are building a saddle point between the cycles, i.e. they have horizontal tangents, resulting in a saddle point 10 frames behind the peak. But the purple, incorrect walk cycle curve does not have a saddle point behind the peak.

If I now repeat the curves like in a walk cycle and match them on top of each other, the difference becomes obvious: where the blue curve "rests" a while in a certain Z location, the purple curve comes in later and goes immediately further down - and this is where it is dipping below the ground.

overlaying both curves

The keyframe in question is the one 10 frames behind the peak, so if I compare the one from the correct walk cycle to the one of the dipping walk cycle, you can see the correct one has horizontal handles.

The correct walk cycle (I just show the end keyframe, but the one at the start has horizontal handles as well):

horizontal tangent

And the dipping walk cycle with the tilted handles:

tilted tangent

But so much for the explanation why you theoretically can immediately see on the curves where the problem lies. As I said in the beginning, there is a very simple solution to this and the result is not less accurate then the other answer (even more, it is exactly accurate as I will show afterwards, but this might be coincidence depending on how these handle placements came to be in the first place).

The solution is: select the keyframe, press S Y 0 to scale it vertically down to 0 and that is it.

scale down to 0

And why is this the exactly accurate method in this case? In the images above where you can see the values of the Active Keyframe in the sidepanel, you see one is on frame 20, the other on 40 (the X location, so to speak) and both have a value of 36.8 (the Y location).

If I now set the locations of the keyframes as the respective origin (0, 0) on their individual coordinate system, I can set the handle positions relative to those:

relative handle positions

Obviously they are both the same distance away from their center in X direction, while the tilted handles are offset up and down in Y direction, but to the same amount so they are still centered on the keyframe. And so scaling them to 0 in Y direction makes them perfectly horizontal and exactly the same as the others from the correct walk cycle. Although as I said, this could be coincidence, if any handle would have been changed manually they might not be exactly the same.

A possible reason why this happened and what you could have done differently: I would guess, you might have copied the start or end keyframe of the correct curve and pasted it at its according position after the peak keyframe on the other curve.

Now the Handle Type is set to Auto Clamped. This type will keep the offset from the keyframe in X direction when you paste it, but might change the Y position to get a smoother interpolation between the previous and the next keyframe.

And therefore when you paste it between the peak and the valley, it will not have horizontal handles, but tilted to better match the sloping curve between peak and valley. That is the why the X offsets are still the same like the original horizontal handles, but the Y offsets are not.

To avoid this automatic interpolation and keep the original handles you have to do the following:

  1. Select the correct keyframe which you want to copy.
  2. Change the handle type by pressing V and choose Free or Aligned (sometimes Free works better).
  3. Copy the keyframe with Ctrl+C.
  4. Select the other foot bone and the Z location curve and go to the frame where you want to paste the keyframe.
  5. Paste it with Ctrl+V.

handle type free

After pasting the keyframe you could switch the handle type again if you do not want it to be Free (which means the handles could be moved independently), but do not use Auto Clamped as it will change them again to the incorrect tilted state. Use the Aligned interpolation instead.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .