Help! I broke my IK rig moving a joint

quick info on how i’ve got things setup.

Here you see my rig from above, in edit mode. Arms are there of course.

Most notably, at the elbow, there’s a long bone pointing backwards, perpendicular to the arm, and another litle bone floating behind it. The long bones are guiding tools for setting up pole targets, the little bones are the aforementioned targets.

The idea is pretty simple, i set things up so that those guide bones would always point at the pole targets (as well as they can with two-axis rotation anyway) because they point in the direction of the elbow. I generally hide the guide bones

This setup was working almost perfectly. But there was one problem

Anyways, here’s a quick look at how things were before i broke it:

http://i.gyazo.com/2767ca7c3154d1776c53984968eff0d1.png

Look at the angle of the upper and lower arm bones. As can be seen, they’re not a straight line. In practical use these bones would straighten up, resuling in my character’s arm bending slightly the wrong way, backwards a the elbow, which just looks wrong. I think i did this because i read somewhere that limbs should have a sligh bend in edit mode to make pole targets work.

Anyways, here’s what i did to fix it:
http://i.gyazo.com/6c611c3c7b8e3857a4116f52d2bb1a6b.png

I jus moved the elbow joint into line with he wrist, making the arm bones a more or less straight line. this seems like a tiny change and shouldn’t cause any problems.

But the result?

http://i.gyazo.com/5bd74e443ed44932273c241fc98a4ebe.png

These elbows are really screwed up. As can be roughly seen, the guide bones are still pointing at the pole targets, and so is the surface of the elbow, but the arm bend is clearly not. With a bit of testing i realised that it’s basically rotated 90 degrees from where it should be pointing.

I cannot fix this by changing the pole angle on the IK constraint. Although i can make the arm bend towards the pole target, it does NOT then point the elbow or the guide bones at that target, the arm is still now bending in a way which shouldn’t be possible

any idea what might be wrong? I’m suspecting that straightening up the arm is causing some confusion

Attachments


Do you have a .blend file for us?

https://mega.co.nz/#!k45HSL4Q!H_VpD8Awz9-R-sS4NTjEoH5XuXf_OyzQvQjPPjWXzq0

here you go.

This is saved before i broke it, i didn’t want to save a state that was non functional.

To replicate the fix i made:

  1. Select the armature in edit mode
  2. Select a wrist joint. Shift+S: Cursor to selected
  3. Select the equivilant elbow joint.
  4. Switch pivot mode to 3D cursor
  5. Scale, global Y axis, 0

X axis mirror is on so changing one side does both

I cannot download it, this site doesn’t seem to support linux, as it complains my browser isn’t up to date…

try this one http://www.mediafire.com/download/syy00xs3vrayof3/baseMale.blend

A number of observations:

  1. You ticked the Rotation in the IK bone constraint, which makes the IK solver try to turn your forarm such that its axes correspond to the axes of the target. In your setup, with IK target more or less perpendicular to the forearm, this gives unexpected results. I suggest you untick Rotation, and see if your arm behaves properly. Then, reorient the IK target, and tick Rotation, and see if it works properly.
  2. I believe your pole angles are off by 180 degrees.
  3. The purpose of bones from elbows, pointing towards pole targets, escapes me.
  4. I don’t understand why you have separate IK targets for hands and forarms

Hii

do you mean this box in the lower right? It’s not ticked…

  1. I don’t quite follow, i adjusted them until they looked right, which is how blender tutorials taught me

  2. Because the elbow is a vaguely defined patch of geometry on one side of the arm, it’s difficult to see, especially when the arm is deformed in any manner. The elbow pointing bones are guidelines only. I use them while adjusting the pole angle, because they point in the same direction that the elbow does, the pole angle is correct when those guide bones point at the pole target. Once they fill this purpose they’re hidden from view and not involved in animating.

  3. I don’t?
    Each arm has a single IK target, which is a tiny bone at the wrist. The large rectangular block on the hands is a helper object which i can grab and move, to move around the arm IK targets, and i can rotate, to rotate the hand around the wrist (can also scale it to curl/uncurl a fist)

I’m no farther forward so far :frowning:

  1. You are completely right, I must have broken something when playing with your rig…

  2. Select all bones, and do Pose>Clear Transform>All. Now, your armature is in a T position. Move the IK target to bend the arm into a V shape, then adjust the pole angle to make this V point towards the pole target. Your elbow target bone is now pointing up, while the V is pointing backward.

  3. You don’t need a separate bone for this, just follow 2. The elbow is hard to see, but you don’t need to see it, as long as the arm bends the right way.

  4. You are right that each arm has a single IK target, but you don’t need the large rectangular block to move the IK target. Make the IK target bigger, and give it a useful bone shape, and you’re done.

I assume you mean after doing the bone alignment fix. No this isn’t an acceptable solution.

I’m aware of the problem,but in that situation he guide bone is STILL pointing the direction of the elbow. The arm isn’ bending in he direction it should, but is instead bending a sort of sideways, on the forearm’s Z axis. I could fix the pole target to point the tip of the V in the correcty direction, but that will still look horribly wrong because the arm is twisted by 90 degrees, and the elbow will be on the upper side, not the tip, of that V

In that case, simply lock the rotation of the forearm, so it can only bend the right way…