Ik lock doesn't work

I need to control a leg where the thigh is splitted into bend bone and twist bone. The idea is that the bend bone rotates xz and the twist bone rotates y. This is needed to relax the skin.

Now I lock y on the bend bone but it seems it doesn’t work. That is, when I move the goal (that’s the foot) both the bend and the twist bones rotate in y. Any idea what’s wrong ?

Explanatory image ik-lock.jpg and test file ik-lock.blend included.

ik-lock.blend (119.0 KB)

IK lock doesn’t work on the root of the IK chain when using a pole. It works on other bones and when not using a pole.

Your best option here is make your upper thigh bone non-deforming, make a deforming duplicate, and have the duplicate damped track the original’s tail.

2 Likes

Yes I had a feeling that blender didn’t get it.

Anyway your suggestion works great thank you. I can use a deform bone with copy rotation where I turn off y and it works perfectly. A little clunky but working.

Thank you again Bandages also for the quick answer, I’d never get it myself without your help.

edit. Nope copy rotation doesn’t always work, I see now that damped track is the one to use as you suggested.

edit. On more tests copy rotation works fine. But I have to use euler on the deform bone. While the ik bone uses quaternion to avoid gimbal locks. Then for my purpose copy rotation is better because damped track tends to relax the skin too much. But it can be a good solution too depending on the purpose.

@bandages, I’d also like your comment about copy rotation vs damped track, if you don’t mind it would be useful to me.

And below is where it is used. Credits to @bandages of course.

No. Use damped track.

Think about copy rotation XZ from an XYZ Euler bone at 180,0,0. Now think about copy rotation XZ from a bone at 0,180,180. Those are the exact same orientations. Your constraint knows only the orientation, not the raw transform numbers. The way Eulers work, axes aren’t these nice independent things; they spill over into each other. And it doesn’t matter what transform mode either bone is in. It only matters how the constraint works. (See the “order” field in the constraint: it’s always Eulers, although you can pick between all 6 varieties.)

You can test this out pretty easily, with apply visual transform, to see exactly how the Euler axes “blur”.

Copy rotation (and limit rotation) are some of the least intuitive constraints. There are times that they’re okay to use, but they are definitely “expert-level” constraints, and you should try to use damped track and locked track to do what you want instead. They’ll behave much more like you expect.

Thank you. The real case we work with (see the link) gets a main rotation for x and a secondary rotation for z, so euler yzx covers it fine enough without gimbal lock. Then the ik bone is quaternion so it should minimize rotations anyway. The issue with damped track is it relaxes the skin too much.

But I’ll pass the information to Thomas who’s the plugin developer. Thank you so much Bandages for taking your time to reply.

It doesn’t matter what the bones are set to. The constraint doesn’t care about that one bit. Your axes can blur regardless of that, and regardless of transform locks.

“Relaxes the skin” is a weird way of putting it-- a damped track is a rotation, that’s all (the smallest rotation it can make to point its Y axis at the target.)

Obviously, you can do whatever you want with your project, but the worst part of these problems is that they’re really easy to miss until you hit the orientations that cause large, visible problems. So you don’t even know that there’s an issue until you’re animating, or, worse, rendering, and see it in an interpolation you didn’t notice before.

I believe I get it. I was trying to mimic what I did with a fk pose. So damped track of course finds a “better solution” to my fk pose thus the more relaxed skin.

I directed Thomas here but I believe I now understand what you mean. Thank you again for recommending the right solution.

@bandages Nope. On more tests I see what damped does is to also use the twist channel on the bend bone. That’s how it relaxes better. But we can’t do it because we have jcms driven by the bend bone. As explained in the first post we need the bend bone to only rotate in xz. So we need copy rotation to lock y.

Thank you for your time this discussion is very interesting and useful to me.

damped

I’m afraid I don’t know what jcms is.

Once you have something with any rotation, twist is a matter of perspective. Is that 180,0,0 bone twisted? It has no Y rotation, so it’s not, right? But it’s the exact same as the 0,180,180 rotation bone, which has 180 degrees of Y axis rotation. So it is twisted. But wait, that doesn’t make any sense. Do you see what I’m saying? There isn’t really any such thing as “single axis” angles in 3D, and there isn’t any such thing as double axis angles in 3D. There are multiple XYZ Euler angle descriptions of any single orientation, and none of them are preferable to each other in any way except arbitrarily as standards.

Here’s a file. It demonstrates a few things:

dampedvscr.blend (127.5 KB)

I have a control bone on the right-- an IK target-- and a single bone, Y locked, IK tracking that bone. Then I have two bones copying rotation from that bone, one in YXZ Euler order, one in YZX Euler order. Move the bone around-- notice how the two copy rotation bones don’t have the same roll as the locked IK bone. Notice how they don’t even have the same roll as each other. (If one of these was without twist, which would it be?)

On the left, there’s a similar setup, but I’m comparing an IK bone to a damped track bone. Notice how the damped track behaves exactly like the Y locked IK bone. The control is set up to copy transforms from the left control, so you can see the disagreement on the right and the agreement on the left in the exact same positions more easily.

Sorry, jcms is joint controlled morphs in daz studio, that’s bone driven shapekeys in blender. The plugin by Thomas imports daz studio. I understand what you say and I know that euler can meet gimbal locks, thus copy rotation may flip, as it happens in your example.

The issue is that the bend bone doesn’t twist in daz studio, that’s what the twist bone is for. While damped track makes the bend bone twist, thus causing “bad” deformations in the skin. Where bad means they are different in daz studio.

If we keep copy rotation within the gimbal lock limits it works fine, and we avoid the bad deformations. Since daz studio uses eulers this is straightforward to do.

Below it’s damped track (red arrow) vs copy rotation. You see the deformations are different. In this case copy rotation works the same as daz studio. But damped track seems not too bad either though it’s different, and of course it’s much more stable than copy rotation as your example clearly shows, so Thomas may decide to use it.

damp-vs-rot

Again thank you for your time. Your comments are extremely interesting to me.