Help! IK angle limits not working

So i’m rigging IK for an arm at the moment;


As can be seen above, i’ve put some IK angle limits on the shoulder joint.
I ALSO have a limit rotation constraint on it (which is currently disabled) and thats why it’s glowing green. i’ve tried removing that completely and it doesn’t affect this problem, so it would seem to be irrelevant.

Anyways, the angle limits are simply being ignored. The shoulder joint moves wherever the hell it wants to, like the below image. I can easily twist the arm into positions like this, which should simply not be possible:


Also seen in the lower right of that image, is the bone constraint for the forearm, which is the main IK bone here, it has a target and a pole target, and it is working just fine. The chain length is set to 3 which should include itself, the upper arm, and the shoulder, that’s what i want.

I’m just trying to set some limits to prevent things going into wacky positions here. The shoulder movement is essential, but i only need to move it a little bit, and i want to hard limit it to prevent it going farther than that. I have the limits set just right. Why aren’t they doing anything?

Farther demonstration: http://i.gyazo.com/bc5280c26f59d5dabe9b991cc80ad6c7.gif

I am not sure what is going on with your rig, but here below is an example that works as you would like - I think!

ik-limit.blend (444 KB)

Just move bone “crank” to operate. Hope this helps you.

Cheers. Clock.

Update:

BTW Rotational Limit constraint is totally irrelevant here, as IK constraint doesn’t use it, so remove it.

Further Update:

Have you put a slight bend in your arm bones when at rest? if not, do so, or they will wander and bend all over the place.

her’es my .blend, maybe someone could have a peek and figure out what’s wrong?

There’s a rig on layer 15 with the chain length set to 3 (its not attached to a model right now, but that’s not relevant)
The IK angle limits on the shoulder bone are already set and enabled. I removed the pointless Limit Rotation constraint too

Where’s your blend file?

aaaah oops >.< i forgot to place the link

http://www.pasteall.org/blend/33764

Clockmender, i tried your posted file, and it does indeed work perfectly. But i can’t figure out why. I canmt seem to find any relevant differences in the system, except that mine is parented to a disconnected bone. I tried doing that in your file though and it doesnt break anything.

I remember seeing some old thread where IK limiters stop working whenever a pole target is in use. I wonder if this could be the same problem/bug? Basically if no pole target is in use, everything stops where it should when hitting the extents of set limits. Once the pole target is applied, then the limits may as well not even be there. Should be easy to test if that’s the case and this problem is a couple versions old (from 2.6x something). I recall having this problem too, so it’s probably not that uncommon.

Wow hey, you’re right. it magically started working when i removed the pole target from the lowerarm.

however this is really not satisfactory

I have to say no, this doesnt seem right. In this case, the pole target is on my elbow, but it’s the shoulder joint i’m trying to apply limits to.

must i add a pole target to the upper arm as well? I’d really rather not.

The problem with pole targets is that they force one specific solution, whereas an angle limit gives a range within which many valid solutions exist. imo this is more flexible. While i do want the elbow to point in a specific direction, i don’t have any such specifics for the shoulder, and i’d rather define a range for it which is what i’m trying to do here :frowning:

oh also to add, i have definitely had a pole target and angle limits working together before, on the same bone.

In this case they’re on two seperate bones in the same chain, could that be the issue?

this really seems like a bug. is this a bug?

i am presently attempting to add a pole target for a shoulder joint, and failing horribly.

How do you even do two IK solvers with two pole targets, in the same chain? all i seem to get is a twisted mess.

Sorry I couldn’t get to this when I saw it earlier…

The last line on the bottom of the wiki page says,
“Note that, if a Pole Target is used, IK locking will not work on the root boot” <(typo).
http://wiki.blender.org/index.php/Doc:2.6/Manual/Rigging/Posing/Inverse_Kinematics

That sentence is easy to miss. It should say IK limits don’t work either, and the Stiffness setting has an effect (IIRC) but doesn’t really work either. Not on the root bone of an IK chain.

The new manual is being worked on so get the same for now…
https://www.blender.org/manual/rigging/posing/inverse_kinematics.html#bone-ik-panel

BTW… last paragraph in Description section about IK and the Limit Rotation constraint.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Constraints/Transform/Limit_Rotation

The IK pass is done last and knows nothing about that constraint or the axis locks.

Ref your last:
You could use a second IK constraint if you want to control it with a target bone. Biped shoulders usually have FK controls only.

Edit: I read that wrong. OK that’s what you are trying (2 IKs). Sorry gotta go now.

-LP

hi larry, i found that too. Looks like this is intended behaviour
http://archive.blender.org/development/release-logs/blender-246/inverse-kinematics/index.html

To be clear, i don’t WANT it to rotate the entire chain towards the target. Only the last two parts of said chain.

I am stuck. What do i do? I can’t seem to get the second IK constraint working.

How the hell do you rig up an arm and shoulder? how does everyone else do it?

Funnily enough by coincidence, I’m having shoulder trouble at the moment too, having rigged a simple FK shoulder that works fine from the T-pose, but as soon as I start doing things like raising the arm over the head, and trying to get the elbow pointing in the right direction, it all goes pear shaped. It seems that compound rotations that don’t twist the flesh of my own shoulder around much apply a lot of stress to the mesh. It’s a complicated joint, much more so than the thigh-hip. I’m beginning to wonder about doing the Rigify thing of having two bones equivalent to each real arm bone to get the full range of twisty-on-the-Y-axis goodness without the mesh going all funny on me.

You definitely did not ever have both angle limits and pole targets working in the same chain. Your memory is faulty.

You cannot have two IK targets in the same chain either. You can have two chains that are connected sequentially, but their influence/chain length cannot overlap. IK shoulders are just like IK legs. If you are using pole targets you cannot set limits.

As I’ve said elsewhere it usually is a bad idea to set hard limits on highly flexible body parts in organic character rigs. Animation often demands more posing flexibility than is realistic. Motions in animation are often exaggerated even when the result is primarily realistic. The only rotation limits I ever set in a rig are on the finger bones, and even there it’s only on the controller bone. I can go in and pose them unrealistically individually if the animation requires it. Forget the limits. Just make the rig easy and friendly to pose. If you don’t want to allow the arm to raise above the level of the shoulder just don’t pose it that way.

Here is a new version of the demo file I gave you in another thread, updated to show how to do IK arms. Mr_Genericlimbs.blend (460 KB)

Nope, yours is

http://i.gyazo.com/3ce7dcc2b00fec21d7291bbff170d6d3.gif

This is working perfectly, however as i mentioned the pole target and angle limit are on the same bone here. The problem i’m having with the shoulder is that they’re on different bones. And more specifically, the angle limit is on the root bone, i think that’s the only part that doesn’t work. i’ll need to test it farther but the documentation so far indicates that angle limits plus pole targets in an IK chain work fine except on the root bone of the chain.

I do see your point, and i agree with you mostly, but not in this case. The shoulder is a special case, being that it’s movement is utterly necessary to many arm positions, but that it also has a very small range of acceptable motion.

Just using IK and a pole target, the IK solver far too easily moves the shoulders into unrealistic positions, that require correction in order to not look utterly silly.

http://i.gyazo.com/ef918a9ccd54ee21766c14e1a1421894.gif

here i’m just trying to put the arm down by his side

i’ll check your file. iirc you mentioned leaving the shoulder as FK. i’ll probably do that, but i’m still putting angle limits on it :stuck_out_tongue:

Oh addendum, regarding angle limits. There does seem to be some dislike for them, but i’d consider it a matter of personal preference in most cases. For me, angle limits are something i will personally predefine, through trial and error, based on what looks good for my mesh. to avoid odd deformation, twisting, etc. I’ll usually set them somewhat higher than what an actual human skeleton can do

Once i have personally established the limits of what i think looks good, those technical limitations then prevent me from accidentally going over that line. Giving me complete freedom to pose things in any valid position without worrying how it will look.

Your mileage may vary. lots of people have different workflows

If you’re using FK in the shoulder you can put limits on it. I use limits on FK all the time. Leave the shoulder as FK. It’s usually not a good idea to have more than a 2 bone IK chain, and it’s a particularly bad idea if the two joints don’t bend in the same direction. A shoulder bends in a completely different direction from the elbow, and so should not be part of the same ik chain.