0
$\begingroup$

So I have this rig of three mesh objects and five bones. The last bone is the controller of the IK chain, while the first one is out of the IK chain, and parented to an empty. Rig What I need to fix is the jumping from one position to another, as without a pole target, the IK solver doesn't know in which direction to bend the rig. However, from my understanding if I use the pole target, the rotation constraints get overwritten by it and the bones rotate in all directions, as opposed to only rotating on the x axis.

Here's the problem.

it is important to note, that in some cases the second and third bone would also need to bend up, depending on the location of the empty object. Like this: enter image description here

Here is the project file (WeTransfer Link)

Please let me know what you think, and also if I've missed anything important to point out.

Thanks in advance!

UPDATE:

Followed @Nathan 's steps, here a screenshot. enter image description here

Nathan's answer did indeed provide a more stable rig, not ideal, still hard to manage, but comparably, a way smoother IK chain.

$\endgroup$
2
  • $\begingroup$ The linked video/gif does not show any animation. For me, it's just a static image. A few questions: Why don't you use a root bone instead of the empty? Why is the IK target in a separate Armature object? Can't you have an all-in-one rig? I would choose a rest position that is aligned to the global axis if possible, add a root and pole bone, join the IK target bone to the deformation armature, and parent pole target and IK target to the root bone. $\endgroup$
    – Blunder
    Commented Dec 12, 2023 at 11:57
  • $\begingroup$ @Blunder Hey there! The video on imgur does play for me, but if there is any other place I could upload it to that you could think of, I will. Also, I would be incredibly thankful if you could show me the steps you would take, to make it work? I'm an absolute beginner to rigging, so I would be very appreciative of your help. $\endgroup$
    – imdcookie
    Commented Dec 12, 2023 at 12:06

1 Answer 1

1
$\begingroup$

I want to be clear, I am not an expert in 3-chain IK. I tend to do character stuff, with what are essentially two-chains. Part of the reason I encouraged you to ask this question is because other people on this site might have better answers than me-- both of us might benefit from hearing what they have to say!

So, sometimes, continuous rotation is mathematically impossible. Not just hard, but impossible.

enter image description here

The two bone chain on the top cannot ever change the bend of the "knee", because it needs to rotate through the straight, but it cannot reach the IK target when it's straight. It will jump between the left and right rotations to reach the IK target because the straight is impossible. Same goes for the bottom one: to change the bend, it has to rotate through an impossible straight. If we want to smoothly change the bend in an impossible situation, we have to cheat: move the IK target, drop to FK control for a moment, move or scale the bones, or rotate through an axis that we don't generally want our IK to bend (a human knee isn't a perfect hinge, it's got a bit of tolerance.)

Still, there are times when a continuous solution is possible, but Blender will never give it to us, no matter how many iterations we tell it to use:

enter image description here

We're changing the direction of the bend of your third bone. On the right, we can see what Blender's IK gives us: totally discontinuous. On the left, we can see that there is a continuous solution to this problem.

We could eventually tune everything on the IK system to give us this continuous solution, carefully rotating bones, carefully timing where we keyframe-- but man, what a pain!

So what am I doing on the left to generate a continuous solution here? I've just added a few extra, non-deforming bones into the IK chain:

enter image description here

I've sandwiched in two extra parents, the "mch" bones to the original "def" bones. Check the outliner for hierarchy if you don't know what I mean by sandwiching. These bones have no rotation relative to their parents-- I've created them by duplicating their parents and snapping to tails-- so they can rotate either direction; they retain the axis locks of the rest of the structure, so their children maintain the same proper rotation we want. They act to kind of give their children bones negative IK stiffness, and rotation that is bend-agnostic: some of the IK rotation can be applied to these bones instead of the deforming bones, rotating smoothly through transitions that Blender can't handle otherwise.

You can see that I've only animated these mch bones. I animated two, but the second was just to match, as closely as reasonable, the final orientation of the original armature; you can probably get what you want by rotating only a single of these bones. And if you'd rather, you can rotate the def bones instead, it still works smoothly.

And I want to be clear that this isn't a silver bullet. You can still find positions for the IK target where the angles needed to smoothly transition between bend directions are just too large for this to handle-- usually, when the IK target is very close to the root of the chain. But adding these extra bones to loosen the angles, and to make them not care about the bend, makes a life a lot easier in typical situations.

$\endgroup$
11
  • $\begingroup$ Oh @Nathan , blessed be the blender gods who sent you, to help us, mere mortals. No, really, I'm so happy to see this comment. I just woke up and saw it, my brain is not yet ready to process this information, so I will carefully read a couple of times while having my morning coffee and I'll try my best not to ask stupid questions after. However, like the human knee, I hope you have some tolerance. $\endgroup$
    – imdcookie
    Commented Dec 13, 2023 at 6:53
  • $\begingroup$ Alright, I think I'm doing something wrong here, here are the steps I took: I moved the cursor to "ik1def"'s tail, duplicated "ik1def" and snapped it to the cursor, did the same thing with "ik3def" (duplicated it and snapped the duplicate to the original's tail, now the duplicates are the "mch" bones) I then added the IK in the same way like before, to the last two bones, and adjusted the chain length. This doesn't seem to smooth out the movements of the IK chain. I've read your comment a couple of times now, and by a couple I mean many, but apparently I'm misunderstanding something(?) $\endgroup$
    – imdcookie
    Commented Dec 13, 2023 at 8:42
  • $\begingroup$ I've also un-ticked the deform for the added bones, forgot to mention that. :) $\endgroup$
    – imdcookie
    Commented Dec 13, 2023 at 8:43
  • $\begingroup$ Did you set up parenting as shown? $\endgroup$
    – Nathan
    Commented Dec 13, 2023 at 15:08
  • $\begingroup$ I have parented "ik2mch" to "ik1def" and "ik4mch" to "ik3def" Also, I've parented them to "Bone, Relative" I'm about to make a screenshot and post it as an update. $\endgroup$
    – imdcookie
    Commented Dec 13, 2023 at 16:11

You must log in to answer this question.

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