I guess I didn’t explain the problem clearly enough. This is not a knee-flipping problem, this is a knee-bending problem. In your average character, the knee will bend towards the hip. If the upper and lower leg are the same length, this will eventually put the ankle in exactly the same location as the hip (this is the way ik tries to solve any 3-joint chain).
My character’s leg is bowed (hierachy1.jpg), so that the knee does not bend toward the hip. Instead, it bends toward the area beside the hip. If using FK, a bend on the knee would never align the ankle with the hip - the ankle would end up next to the hip, but they would never share the same location.
However, when I try to apply IK to this 3-joint hierarchy with an offset hip, the IK tries to force a new rotation plane onto the knee. This would emulate a normal chain (ankle moves to hip), but results in unnatural twisting and bending of the knee joint. (see 3joint.jpg)
The solution (not yet found) would most likely include two hips. The first hip (Hip_A) would be positioned at the true pivot for the hip of the leg, while the second hip (Hip_B) would be offset from that pivot to align itself with the rotation plane of the knee. (see 4jointA.jpg, left side) When IK is applied to the section between Hip_B and the ankle, the bending of the knee joint behaves naturally (see 4jointA.jpg, right side).
Again… however, while the knee is bending properly when the ikHandle moves vertically, the relationship between Hip_A and Hip_B is breaking, regardless of where the ikHandle moves (see 4jointB.jpg, left side). In order to maintain natural behavior on the whole of the leg, two things must happen. First, Hip_A and Hip_B must have identical rotation planes. This allows the true hip pivot to carry the rotations for that section of the leg, which helps the natural motion of the skin on that joint. Second, the distance between Hip_A and the knee must always remain constant. If that distance changes, the result mimicks that of the upper leg stretching. Keeping the rotation planes of the hips identical will keep the distance between Hip_A and the knee constant. — see joint4B.jpg, right side.
Despite my best efforts, I have not been able to solve this dilemma. Given the time, I’m sure the solution will eventually come to me. But, I really don’t have that kind of time. I’ve got other things that demand my attention right now, so I’m passing the puzzle on to the forums. If anyone has a bulletproof solution, I’d like to see it.
I didn’t realize the picture attachments on this post don’t carry their filenames onto the web. Just assume that they are posted in the order in which they are referenced.