Limbs in mid-walk cycle keep twitching

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
MacCraw
Posts: 14
Joined: Fri Apr 05, 2019 8:50 am

Limbs in mid-walk cycle keep twitching

Post by MacCraw »

I'm attempting to follow a guide on YouTube for how to make a walk cycle. The more "extreme" movements where my character's legs are stretched all the way out in the front and rear work just fine, but whenever I go to add detailed motions like feet turning, knees bending, etc., the parts in question will twitch and convulse and whatnot for a few frames and then snap back into place. I don't know how to stop them from doing that so I can have the motion of walking (and eventually running) be flawless. What do I do to fix this problem?
User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Limbs in mid-walk cycle keep twitching

Post by Greenlaw »

It's how IK works; you see this happen even in 3D animation rigs when a limb is being compressed and there's no clear direction for the IK to turn towards.

In Moho, the trick is the give the limb a preferred bending direction. To do this, give the limb's joint (i.e., knee or elbow) a slight bend in its rest pose (frame 0.) It can be a very small amount that might still appear visually straight, but angled enough so that the IK will always try to turn in that direction. This will prevent the 'indecisive' twitching.

But what do you do when you want the IK to change direction? That's easy: when the bone reaches its straightest point, click and drag the bone to force a rotation keyframe in the opposite direction. This will change the preferred IK direction as if you had done it on frame 0.

If the character is positioned too low for the legs to completely straighten, you can keyframe the length by clicking and dragging on the end of the bone. This is also a good way to foreshorten the limb, and make the animation a little more realistic.

Another trick that might help is to enable Squash and Stretch Scaling and increase the Max IK stretching a bit. This can make it a little easier to switch the IK direction and prevent unwanted popping, and also allow you to overdrive the animation when you need it.

Hope this helps. I can post an example later, if you need it.
User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Limbs in mid-walk cycle keep twitching

Post by Greenlaw »

One more tip: When dragging across the bone to change the rotation, drag in the opposite direction you want the joint (i.e., knee or elbow) to point to. It might seem counter-intuitive but if you remember this, it becomes easy to animate the change in IK direction smoothly.
Post Reply