Bury my Sanity at Broken Knees...

Hi. Sorry to ask such an embarrassingly basic question…

I’m VERY new to rigging, and my model’s knees are driving me crazy - with just a simple parent relationship, the joint acts like a ball-and-socket instead of a hinge (like a real knee). When I move the foot the knee buckles in all sorts of directions.

I’ve looked at a few real rigs, but can’t quite figure out the best way to do it. Is there an easy way to constrain the thigh-shin connection to behave like a knee joint? Or is it a matter of setting them to point to some external bone, maybe parented to the feet?

I’d be really grateful if anyone could give me a tip, or point me towards a tutorial or something.

Many thanks!

You can either set the joint to have rotation constraints (select the bone you want to constrain, look in the buttons menu in pose mode for ‘lock X rot’ (or Y or Z) - you can also limit them (just below that button). The constraints limit will appear in the 3D window as red/blue/green arcs (like the x,y,x axes). Watch you get the right axis (you’ll figure it out)

Other method which is probably more useful for a lot of things is to make a floating knee bone (the ‘con’ (=connect) button needs disabled for this bone to detach it) with a ‘track to’ constraint for the thigh toward the knee, and put an IK constraint on the foot (or the whole leg will just end up pointing to the knee). The IK will keep the leg pointing toward a foot target and the track to will keep the thigh pointing towards the knee.

Parent the knee to the master bone rather than the thigh to avoid a cyclic dependency

it’s all at http://wiki.blender.org/index.php/BSoD/Introduction_to_Character_Animation issues

ypoissant built a rig for the Blender Bootstrap Animation Class, for the Blendot puppet. There are still some minor glitches in the rig, with foot position and a cycle dependancy, so I am working on learning rigging to see if I can fix these glitches. I’m still working on it, but here’s what I have so far:

Following a human model for naming the sections, there is a body, a hip (joint), a thigh, a knee (joint), a shin, an ankle (joint), an arch (of the foot), a ball (of the foot) (joint), and the toes.
The deform bones are connected in a strict hierarchy:
Body
Thigh
Shin
Arch
Toe



Since the body bone is going to affect the orientation of the body mesh, we want another bone in the chain to locate the robot in space. This master bone is sometimes called the Root, or the Center of Gravity, or is named after the character. Since this bone will only affect XYZ location, it is the Position bone. With more than one character in a scene, I’d rename it to Position-character, with character replaced by the actual name of the character.
It is not a deform bone, but is the beginning for all the bone hierarchies connected to the rig for the character.
The bone hierarchy now begins with the Position bone, followed by Body and the rest.
In pose mode, the Scale and Rotation transforms are locked for the Position bone, so it cannot be accidentally scaled or rotated during animation. The remaining bones have Scale and Location transforms locked, so they can only be rotated. This is done in the Transforms Properties panel, accessed with hot-key N.


Some of the joints bend in impossible ways – specifically, the knee and the ball of the foot allow the shin and the toes to rotate in Y and Z, which are physically impossible for those joints. This is fixed easily enough by locking the shin and toe rotations for Y and Z in the Transforms Properties panel for those bones.
A more complicated problem is this – when the body bone is rotated to tilt the body to the side, front or back, the leg rotates along with it. Normally, you’d want the leg to stay pointing toward the ground as the body tilted.
Making the Thigh into a hinge joint fixes this problem, but introduces a new one – when Body rotates in Z, Thigh (and the rest of the leg and foot) remain pointing forward. Looks awkward. We don’t want to inherit X and Y rotations from the Body, but we do want to inherit Z rotations. We fix this with a Copy Rotation constraint on the Thigh bone, to copy only Z rotation from the Body bone.


Now we want to make the rig easier to animate, by adding IK to position the leg.

Add a new bone at the ankle joint, Ankle, and add an IK constraint to Shin, target Ankle, chain length 2, so that Shin and Thigh point at Ankle.



Duplicate Thigh, point the new bone straight at Ankle’s root (so it’s tip is behind Thigh’s tip a bit) name the new bone Leg, give it a Stretch To constraint to point at Ankle, and then add a small bone in front of the knee, parented to Leg, called IKKnee.


Give Thigh an IK Constraint to point at IKKnee, with a chain length of 1, Chain copies Rotation of target.


This rig is solid, no cyclic dependancies, no awkward rotations or bone flippings. It doesn’t have any work done on the foot, yet, which is where the problems cropped up on the Blendot rig. The foot on this rig is still completely FK, with the foot location controlled by Ankle, and the foot rotations controlled by Arch and Toe.

to fix body / leg rigging problems:
flip position bone around. Have body as a child but offset, not connected.

Have separate root bone which position and foot IK are children of.

Have uploaded my latest mannekin (very basic rig) to here which shows what I mean: (note some bones on bone layer 2, disable custom bone shapes if you want to look at the full rig)

In the rig I posted above, there are no body/leg rigging problems to fix. The rig is solid. It is very close to the manikin rig – my Position bone is manikin Master bone; my Body bone is manikin Pelvis bone; my Ankle bone is manikin Foot_control bone.

The main difference is the knee follows the rotation of the leg, in manikin the knee follows the rotation of the body.

The manikin design is more straightforward, since it is designed for posing rather than animation.

In the animation rig, the knee is kept in line with the leg, so as the leg is animated, the knee will move correctly without being animated separately. This adds an extra bone (the Leg bone) and a couple of extra constraints, to save the animator the trouble of moving the knee targets by hand in situations where the leg and body rotations don’t match.

Doncuan,

Many thanks - that external knee-bone thing was one of the solutions I had in mind, but didn’t know how to implement. Your explanation, plus your rig as an example, is a great help. Tomorrow I’ll see about fixing my poor model’s broken knees!

The wiki link also looks very helpful.

Thanks again!