Wednesday, October 24, 2007

Controls

All of my controls are NURBS circles. It looks faster than drawing the curve of each control, and it is usually pretty intuitive.
Maybe when I'll have more complex characters I'll draw arrows and such as controls...



Here is a list of the controls for my character skeleton:

ctlBody - Controls the body and is the base control for the whole character.
  • Parent of: The body joint.

  • Pivot point: The body joint.


ctlLeftFoot - Control the left foot.
  • Parent of: The foot IK, and the children foot controls ctlLeftToe and ctlLeftFingers.

  • Pivot point: The left ankle joint.

  • Attributes: I added a new attribute named "Use IK". This is a boolean attribute which controls the ikBlend attribute of the IK. That way you can specify in the control itself whether you want it to control the foot or do you want to control the foot using FK.
    The connection between UseIK and ikBlend is done using the connection editor (no expressions or driven keys).

  • Constraints: When I use FK, I want the control to follow the foot when it is rotating. That's why I added a point constraint and an orient constraint for the foot control according to the ankle joint.
    Since the control is controlling the IK, this will create a circular reference. The solution is to use the "Use IK" attribute to control the NodeState of the constraints.
    When UseIK = 0, the NodeState = 0 which means "Normal" - so when the IK is not used the control follows the foot. When UseIK = 1, the NodeState becomes "Blocking" which means the constraint is not active.

  • I just found out this solution is only good when you don't key any of those attributes. Once you key the IK position, it will not snap back according to the point constraint. Once you key the rotation of a joint, it will snap back to the keyed position as soon as you set "UseIK = 0". I'll have to figure out what is the *right* way to do IK/FK blending :(


ctlLeftToe - Controls the left toe.
Its pivot point is the left toe ball joint, and it is not a parent of anything. Instead it controls the orientation of the toe ball joint using an orient constraint. It can only rotate, translate and scale attributes are locked and hidden.

ctlLeftFingers - Controls the left fingers.
The same as ctlLeftToe, the pivot point is the left fingers ball joint, which is controlled by an orient constraint.

ctlRightFoot, ctlRightToe and ctlRightFingers are the same for the other leg.

I have the feeling there is yet a lot to learn about how to rig a biped, create IK/FK blend and so on. There must be some "text book solution" to these problems :/

No comments: