Animation Jittering (Probably something about IK)

Hello, I’m rather new in animation.

I have noticed legs in my runing animation jitters when I parent camera to hips if I don’t do that it looks much smoother but it’s still there.

I experienced ik bones tend to jitter when they are fully open but this seems different.

Also slower animations like walking seems fine and smooth. Animation is still a rough one, I didn’t polished it, but this amount of jitter makes me think I’m missing something or making something wrong.

I feel like it’s about IK bones but why does walking animations are fine i can’t really understand
Anyone has experience with something like this? Jittering is after 00:12

I’m not quite sure but it may be famous IK issue like pop ups of knees when hips are going too far from feet and back. Sorry for my English - hope you understand. Best way to fix this behaivour is to use “soft IK” chain. At least for me it solved most problems with IK chain. Using “soft IK” will slightly scale your IK chain in Y axis when hips are going “too far” from feet, but you won’t have any popups\jittering - animation will be very smooth. Hope this helps. This is DanPro tutorial how to build soft IK limbs:

1 Like

Angle limits are most common source of IK jitter-- in Blender, it’s best to avoid them.

Your video, the main thing I notice is the hyperextension of the lower leg-- following full extension, the knee bends backwards. Getting IK to do this is normally pretty hard, but if you have poorly placed bones, that don’t really match with the mesh, you can do it accidentally, at the cost of some twitch. So that’s the first thing I’d check out.

1 Like

Thanks for the help. I remember trying angle limits at one point and it was beyond my control, so i removed them. If angle limits are what the right side of the picture is then i guess it is not the issue.

I haven’t notice that with the knee tbh, I was trying to be carefull too becouse hyperextension makes joints pop in and out. Do you think angle of bones in leg rig is fine like this? Making them straight have some issues with IK but maybe i should try to reduce the angle as much as possible ro modify the mesh, what would you suggest?

This was a great suggestion, I have implemented this for left leg now hyperextensions (joint pop-ins and pop-outs works better). But overall jitteryness didn’t improve. But thanks, it was very useful nevertheless.

1 Like

First video angle was a bad by accident, this one is more clear. Seems like upper leg moves a direction then moves in the opposite direction. Also added motion paths for leg and foot. Foot path is smooth but leg paths isn’t and because it is IK i can’t control it directly. I tried moving pole target to a far distance to see if it was that, i guess it wasn’t that.

Looking at that picture, yeah, I think there’s a chance that the bones aren’t placed properly. It’s good to have a bend like that for IK, but not if the mesh doesn’t support it. Your rest pose leg mesh is straight or even hyperextended, while your rest pose leg bones are bent.

Place the bones appropriate for the mesh (and possibly clean up weights), ignoring the IK bend. Then, if that’s too straight, or even hyperextended, you can rotate the shin bone in pose mode to create the bend. Blender’s IK uses the transformed bones to determine the IK behavior, not just the rest pose.

That’s kind of a pain sometimes, because then you can’t just alt-r clear rotation on the whole armature without it screwing up. There are other possibilities (like an FK/IK switch style, where the straight-leg deforming bones copy transforms from a bent IK chain). The best thing is to model the bend into the mesh. But if the mesh doesn’t have it modelled, there’s only so much you can do to cheat it.

(If you need the hyperextended look, the best way I’ve found to do that is to separate deform and IK chains, and then have the deform bones stretch-to a marker that orbits the IK chain knee. That way, the foot stays in the same position, and if you need to swing the weight around to hyperextend, you can do so without popping. Still have to control the hyperextension by hand though.)

1 Like

I think i can bend knees a bit, apply armature, fix bones, and set it as new rest pose before adding a new armature modifier. That would fix this.
Probably this wouldn’t cause the jittering this is more like a slight armature-mesh mismatch. But I will definitely fix this after finding the jittering solution. Thanks for the tips and insights.

Hi, yea that’s a classic. it emerges naturally from the “simplistic” nature of IK, it reaches a point where the speed at which the bones involved extend tends to infinity. More generally an IK chain made of two bones has a single solution, since it’s just two rigid bones rotating there’s only one way they can be arranged so that they reach the target (the foot) given a fixed rotate plane (the plane into which the leg folds).

In reality we have all sorts of dampeners in our joints… also in our limb extension there is some sliding involved, which adds all sorts of degrees of freedom. Tendons help smooth out limb extensions, acting as rotational dampeners of sorts. The closest we have to this to my knowledge in Blender is “IK stretch” in the IK chain’s bones properties, you can set it to .001 or a similar value on all the IK bones.

And this

I second

1 Like

You might be surprised. (I was able to see that from the original video, right? Because I’ve tried to cheat hyperextension by doing similar things, and came to the conclusion that it’s just not a good idea.) But if you want to rule it out as a cause, a quick way would be to look for your “jitter” with only the armature visible, no mesh. If the armature jitters, it’s not from this bone/mesh mismatch. There may be something that I’m not seeing in the original video, because I wouldn’t describe the problem I see as jitter.

1 Like

You are right! It’s better to just check the rig. I slowed a little bit more to make it more apperent. I guess movement of knee joint in armature is what I think wrong. Maybe jitter is not the right word for it, knee joint time to time goes back or forward during animation causing little shakings, and not flowing like feet.

The parent bone of hips also move up and down and forward, not consistently but according to run, still it has a nice motion curve so I thought it should be okay. IK bones are not parented to to any bone to make them keep on ground while body is moving. Maybe i messed something up with the rig i will try the rigify rig to see if i messed it up somewhere.

@Hadriscus
Thanks for the explanation I took my notes about hyperextension and fix them later but I guess hyperextension is my second problem here, I would be grateful if you have any ideas about this jittering knee motion.

It does look a bit twitchy. If you you upload a file, I’ll see if I can figure anything out.

1 Like

AnimationCycles.rar (777.3 KB)

Thanks! It would be great.

There are some half baked things like my first attempt rig script and other half baked animations. Hope they won’t distract you. Also left leg has a stretch ik so it is a little different but works as it should be i think.

Also there is another running animation which works fine RunCycle2 you may want to check that one. Other run animations are just backups. The RunCycle4 which is problematic is much faster and has more movement.

This is probably pretty subjective, but I think it just has to do with the animation, not the rig.

Look at the difference between frame 8 and 9. During that period, it’s clear that the calf is pushing the entire body up (and forward). But that inertia doesn’t continue into frame 10, because GLO_COG actually loses altitude between frames 9 and 10. This means that you knee changes velocity sharply, as you can see on your motion path. And I mean velocity-as-a-vector there: the speed’s the same, but it’s suddenly at right angles to its old velocity.

(Edit: and the hips, which should rotate to absorb a bit of that inertia-- it doesn’t all fall onto COG.)

I’d also say that I think your foot_IK changes speed kind of dramatically-- the higher knee speed during 18-20 is caused by the higher speed of the foot during that period. From what I can see, looking at slow motion runners on Youtube, there isn’t much change in speed for the foot during the cycle, it’s pretty steady.

I also don’t think it’s a big deal. I’ve looked for issues with the IK setup and it all seems pretty reasonable to me.

1 Like

I think it should be that too. I’m a beginner at animations, so messing up a lot of things and trying to keep hips out of equation and only focusing on some aspects might at last made animation break.

Thank you again for all of your helps.