IK snapping backwards in certain poses [Solved]

I have a character with 2-bone limb IK, and in some animation frames those limbs bend backwards suddently

compared to normal

Limbs were pre-bent in Edit mode and pole angle was adjusted to work correctly in most situations

Can those errors be avoided completely, or Blender IK is just that bad?

They can be avoided with two things- you should have a slight bend in your IK joints in rest mode. If your IK chains are straight, you’ll get the error. You can also use pole targets on your IK bones

1 Like

Unfortunately, I’ve already used these tricks. 3rd screenshot shows the rest pose of the skeleton, and both types of targets are specified for IK constraints. It works as expected in most cases, and I have no idea why it suddently can break

It looks to me that it’s because the root of the chain has rotated past the pole target. With the settings you have, that bone’s -Z axis will always point at the origin of the pole target. Move the pole target.

2 Likes

No, even if I put the target far behind (like, between knee and tail), IK still gets deadlocked. Looks like @joseph was right after all. It is weirdness of “preferred IK angle” calculation. Even when I thought the limbs are bent enough, IK constraint didnt agree :frowning: I moved shoulder joints a bit forward and it seems to have solved the issue for now

Not to the rear of the model. Given your pole angle, which implies certain axes to your bones, to the front and top of the model:

Rest:

Bad pose:

Good pose:

The pole target and angle is chosen to support being in front of the IK bones. If it moves behind the IK bones, the IK bones will roll 180 degrees to point at it. If it stays in front of the IK bones, the IK bones won’t roll.

The pole target is not a static bone; it exists to be posed, to control the angle of the IK.

1 Like

Thanks for the explanation, but I know how to animate with IK. The problem joint is supposed to work as an “elbow” so it needs to bend backwards. You can see how it snaps from the *.gif. As I said before, it was some Rest pose-related nonsense

It needs to bend backwards sometimes. Other times, as in your rest pose, it needs to bend forwards. That’s not a problem that you can solve with rest pose changes alone. The bone needs to be posed, in pose mode, to indicate the bend to Blender:

This rotation needs to occur at the time of maximum extension to avoid any IK twitch.

It’s not my intention to give any offense. I don’t know what you know or don’t. But I know that there’s something you don’t know, or else this question wouldn’t exist. And I know that when people don’t know something, they very frequently don’t know exactly what it is that they don’t know. We all take pride in how much we’ve learned, we probably couldn’t do otherwise even if we wanted, and when somebody suggests that maybe we don’t know something that we thought we did, it’s irritating. But when it comes to conversations like we have here on the support boards, I don’t see a way around that problem.

1 Like

No offence taken. I am sorry if it looked that way. I was merely explaining the situation. During these specific poses where the leg froze, it ignored the pole target almost completely. I’d upload the file if it wasnt too big.

If you want to upload the file, all we need are the bones, and only the bones under consideration. But if you’re happy with what you’ve got, that’s all that matters.