CDIKTools
CDIKTools
6+
CD IK Tools is a plugin suite of tools and expressions for character rigging and animation. It works
with or without the Mocca module. The specialized expressions in CD IK Tools will allow you to easily
build a stable, predictable character rig. Each expression uses the Attributes Manager interface,
making manual set-ups quick and easy. All of the expressions parameters are accessible through
Xpresso and can be animated. The expressions are designed to be used on any type of object,
so you are not restricted to creating a rig using only bones or joints.
The components of CD IK Tools plugin suite are:
Command Tools:
CD Add Root Null
CD Add Tip Null
CD Add Tip Effector
CD Add Tip Goal
CD Zero Global Rotation
CD Add Hand Tag
CD Hand Pose Copy
CD Hand Pose Save
CD Hand Pose Load
CD Setup Tool
CD IK Handle Tool
Expressions:
CD Limb IK
CD Quadleg IK
CD Finger
CD Hand Tag
CD Spinal
CD Spline IK
CD Dual Target
CD Smooth Rotation
CD
CD
CD
CD
CD
CD
Foot IK
Mech IK
Thumb
Rotator
Linkage IK
Piston IK
Command Tools
The command tools are designed to help make setups quick and easy.
hand pose will be added to the end of the pose list in the CD Hand tag. If the setup in the hand
pose file does not match the setup of the target CD Hand tag, you will get a message dialog
informing you that the setups do not match and the loading will be aborted.
CD IK Setup
This command tool is designed
to automatically set up the CD IK
Tools expressions for you. It uses a standard Non-Modal dialog interface which
can be tabbed and docked in any of your
Cinema 4D layouts. In the Expression Type
section you choose what type of expression to set up for the selected object. The
options that are available in the next section will depend on which type of expression is selected in the Expression Type
section. The Pole Axis option is a pop up
menu that allows you to choose on which
axis the Pole Vector Object will be set.
This option will be available for all of the
expression types that are based on a rotation plane solver. The Line Target option is
a popup menu that will allow you set the
target of the line that is drawn from the Pole Vector object to the bone. The line can be set to target
the root position of the object or the tip position of the object. This option is only available for the CD
Limb IK, CD Quadleg IK and the CD Rotator expressions. The Spinal Axis option is only available
for the CD Spinal tag and it determines along which axis the objects will be aligned. The Number
of Spline IK Targets option allows you to set how many Target Objects you want to create to control
the shape of the spline object used in the CD Spline IK expression. This option is only available
when Spline IK is selected in the Expression Type section. The No. Bones in Chain option allows
you to set the number of objects in the chain that will be affected by the expression. This option
is only available when Rotator, Spinal, Spline IK or Piston IK is selected in the Expression Type
section of the Setup dialog. The Setup IK Chain button will set up the expression on the selected
object according to the selected options and the selected expression type.
CD IK Handle Tool
This Viewport Editor Tool is a companion tool to
set up the CD IK Handle tag on a chain of joints or
bones. To use the tool you first select the root joint of the
chain in the viewport and then select the tip joint of the chain
in the viewport. The tool will then setup the CD IK Handle
tag on the root joint according to the options set in the
tool's Attributes Manager dialog. The Radius option sets the
viewport selection radius of influence. The IK Solver option
determines the type of IK solver will be selected in the CD IK Handle tag. The choices are IKRP
Solver, IKSC Solver and IKHD Solver. The Pole Axis option determines which pole vector direction axis will be set in the CD IK Handle tag. The choices are +X, +Y, -X and -Y.
Expressions
What is a Rotation Plane Solver?
The IK expressions are based on a Rotation Plane Solver which
restricts the objects in a chain to a plane of rotation making the
object chains movement stable and predictable. Looking at Figure
2.1, youll see that the plane of rotation is defined by three position
points, which are the global positions of a Pole Vector object, IK
Handle object and the chain's Root object to which the expression
has been assigned. The plane is constantly redefined as the Pole
Vector and IK Handle objects change position. The plane is oriented
to either XZ or YZ with the planes Z axis always pointing to the IK
Handle object. The axis pointing to the Pole Vector object can be set
to +X, +Y, -X or -Y. If any of the three objects are at the exact same
position, then the expression will have no effect on the object chain.
This is due to a safeguard built into the expression that prevents the
calculation result to be zero, which would cause the object chain to
collapse.
Pole
Vector
Root
IK Handle
Figure 2.1
IK/FK Blending
All of the IK tags have an IK Blend slider in the Attributes
Manager, which is used for IK/FK Blending. When the IK
Blend slider is at 100%, then the solution is in full IK mode, and
when the slider is at 0%, the solution is in full FK mode. IK/FK
blending gives you smoother transitions than IK/FK switching.
When the slider is set to a percentage less than 100%, there
will be lines drawn in the view port to show where the bones
would be located if the IK blend was in full IKmode. This gives
you a guide while in FK mode, so that you can adjust the positions of the IK Handle and Pole Vector objects to the positions
of the bones, and set a key for them before blending back to
IK mode. An interesting thing about the IK Blend slider, is that
if you set the blend to a percentage between 0% and 100%,
and then animate the IK Handle and Pole Vector objects, you can get a sort of fake dynamic effect.
the volume of the skin. By setting the curve points so that the curve is high in the center and low on
the ends you can make the volume change more in the center of the skinned mesh.
CD Limb IK Expression
This expression is a simple 2 bone expression useful for setting
up a characters arms and legs. There are two object links that
will be used for the RP Solver calculation. These links hold the
Pole Vector Object and IK Handle Object, and they will accept
any basic object.
Up Vector
IK Handle
bone in the chain, then there must be a tip effector at the end of the second bone. Otherwise the
expression will have no effect.
Tag Properties Tab
Use IK turns the IK calculation on and off. When IK is
off, the object in the IK Handle Object link will be locked
to the tip position of the second bone, and the object
in the Pole Vector Object link will be locked to the first
bone at its current position at the time when the Use IK
switch is turned off. This parameter will check down the
hierarchy to see if a CD Foot IK tag is also used and
link both Use IK switches together. The IK Blend slider
is used for IK/FK blending as described above in the
IK/FK Blending section. This parameter will also check
down the hierarchy to see if a CD Foot IK tag is also used and link both IK Blend sliders together.
Show Lines will display lines between the IK Handle Object, the Bone and the Pole Vector Object, and
also lines through the center of the bones. The Pole Line can be set to target the Root or the Tip of
the Bone. Line Color allows you to change the color of the lines that are drawn. Pole Axis is a pop-up
menu allowing you to choose which axis will point to the Pole Vector (+X, +Y, -X or -Y). The Twist attribute allows the IK to be calculated at an angle rotated around the vector between the root bone and
the IK Handle Object. Zero Angle Damping is for smoothing out the snap into position that happens
when the limb is fully extended. The amount of damping can be set from 0% to 100%. Higher values
are good for arms but a value of 30% or lower should be used for legs. Keep Bones Connected keeps
all of the bones affected by the expression connected, while Keep Next Connected keeps the next
bone down connected to the last bone affected by the expression.
CDQuadLeg IK Expression
This expression is a 3 bone expression useful for setting up quadruped
legs. There are two object links that will be used for the RP Solver calculation. These links hold the Pole Vector Object and IK Handle Object
and they will accept any type of object.
Important Note: The third bone needs a child to perform the IK calculation, so if there will be no child bone after the third bone in the chain,
then there must be a tip effector at the end of the third bone. Otherwise
the expression will have no effect. This Tip Effector object is automatically added if needed when using the Setup Tool.
Up Vector
IK Handle
CD Foot IK Expression
This expression is also a 2 bone expression specifically
designed for a foot toe bone set up. There are three
object links in this expression. The Pole Vector Object
link holds the Pole Vector object that is used for the
rotation plane calculation. The Bone 1 Target link holds
the Foot bone target object and the Bone 2 Target link
holds the Toe bone target object
Bone 1 Target
Pole Vector
Bone 2 Target
CD Spline IK Expression
This expression aligns a bone chain to a spline object, which is useful for many things such as: a spinal
rig, a tail rig, a long neck rig, etc. There are three object links that need to have an object assigned
to them before the Spline IK will function. These three links are the Up Vector Object link, the Spline
Object link and the Target 1 link. The other links in the Controllers tab hold additional controller
objects for the spline (up to 20 controllers). You can add and subtract controller links by using the Add
Goal and Sub Goal buttons. The Target links hold the spline controller objects and will accept any
Up Vector
Target 3
Target 1
Target 4
Target 2
base object. The Target 1 link will always be the tip end of the spline object. The other Target links
are set up to be used in order from the tip to the base. Each Target link also has a Banking check
8
box which is used in conjunction with the Banking parameter in the Tag properties tab. This option
allows the target objects which have their Banking switch enabled to control the twist of the bone chain.
There are 3 types of Interpolation for the twist: Shortest, Average and Longest. Shortest will only interpolate between -180 and +180. This is the most stable of the interpolations. Average will interpolate
between -360 and +360, and Longest gives you infinite twist interpolation. The Up Vector Object link
holds the Up Vector object that is used for the rotation plane calculation. The Spline Object link holds
the spline object used for the expression and will only accept an editable spline object. Any of the spline
Types available in the splines Object Properties can be used, but the B-Spline type seems to give the
smoothest motion when animating.
Tag Properties Tab
Use IK turns the IK calculation on and off. When IK is off the bones no longer align themselves to
the Spline Object, but the objects in the Controllers tab links will still control the shape of the Spline
Object, except for the Target 1 controller, which will be locked to the tip of the bone chain. The IK Blend
slider is used for IK/FK blending as described above in the IK/FK Blending section. Show Line will display a line from the Up Vector Object to the first bone, and also lines through the center of the bones.
Line Color allows you to change the color of the lines that are drawn. No. of Bones sets the number of
bones in the chain that will be affected by the Spline IK expression. Up Vector Axis is a pop-up menu
allowing you to choose which axis will point to the Up Vector (+X, +Y, -X or -Y). Banking is a pop-up
menu allowing you to set how the rest of the bones in the chain will be aligned to the first bone. The
menu choices are Use Up Vector, Use Rotation and Use Targets. Use Up Vector aligns the bones to
the Up Vector Object. Use Rotation transfers the first bones Bank Rotation to the rest of the bones
in the chain. Use Targets allows the target objects to control the banking according to which targets
have their Banking switch turned on. Keep Bones Connected keeps all of the bones affected by the
expression connected, while Keep Next Connected keeps the next bone down connected to the last
bone affected by the expression. Use External Control disables the control of the spline points by the
controller objects. This allows a dynamic spline to be used for the IK. The Use True Spline IK option
makes the spline IK behave like regular IK, in that when you pull on the tip controller the bone chain
tries to straighten out. The objects in the rest of the Target links can still control the general shape of
the spline. This is useful when you want to rig a bone chain with a spline IK but want the tip of the chain
to stay fixed to the controller.
CD Spinal Expression
This expression is specifically designed for rigging a character's spine. It makes spinal rigging simple
in the fact that it only needs two controllers to allow complete control over an S-shaped spine. It is
designed to function very similar to the Isner Spine for XSI. In the Controllers tab there are two links
for Tip and Base. These links can hold any type of object you want to use as a control object. Each
controller has a Depth setting that will determine how much of the spinal bone chain the controllers will
affect from the ends toward the middle. A line is drawn from the center of the control objects to give
you a visual representation of the Depth in the editor view. Each controller also has a twist parameter
that can be used together to control the twist of the entire bone chain. The Use Controller Twist allows
the twist of the bone chain to be controlled by the rotation of the controller objects. When this option
is enable, each controller's twist parameter is disabled. With the Include Tip Twist enabled, the twist is
calculated from the tip of the last bone in the chain, otherwise the twist is calculated from the root of the
last bone in the chain. There are 3 types of Interpolation for the twist: Shortest, Average and Longest.
Shortest will only interpolate between -180 and +180. This is the most stable of the interpolations.
Average will interpolate between -360 and +360, and Longest gives you infinite twist interpolation.
Tag Properties Tab
Use IK turns the IK calculation on and off. When IK is off, the base controller object's position is locked
to the base of the bone chain and the tip controller object's position is locked to the tip of the bone
chain. The two controller objects can be still rotated, though. The IK Blend slider is used for IK/FK
blending as described above in the IK/FK Blending section. Show Line will display lines through the
center of the bones. Line Color allows you to change the color of the lines that are drawn. No. of Bones
sets the number of bones in the chain that will be affected by the Spline IK expression. Spinal Axis
is a pop-up menu allowing you to choose along which axis the bones will be aligned. Keep Bones
Connected keeps all of the bones affected by the expression connected, while Keep Next Connected
keeps the next bone down connected to the last bone affected by the expression.
10
CD Finger Expression
This expression is designed to control a finger set up using sliders for Spread, Bend and Curl. The
Up Vector Object link holds the Up Vector object that is used for the rotation plane calculation. The
Spread slider controls the side to side motion of the finger at the first knuckle. The Bend slider
controls the bending motion at the first knuckle. The Curl slider controls the bending motion of the rest
Up Vector
Root Bone
of the knuckles in the finger. The Damping slider controls the amount of Curl damping for the finger tip
bone. Enabling the Combine Bend and Curl switch disables the Curl slider and allows the Bend slider
to control both bend and curl.
Tag Properties Tab
Show Line will display a line from the Up
Vector Object to the root bone, and also
lines through the center of the bones. Up
Vector Axis is a pop-up menu allowing you
to choose which axis will point to the Up
Vector (+X, +Y, -X or -Y). Line Color allows
you to change the color of the lines that are
drawn. Left Hand designates whether the
finger is on the left or right hand. With this enabled the finger is determined to be a left hand finger
and when it is disabled it is determined to be a right hand finger. When the finger is in left hand mode,
the Spread slider works in the opposite direction. This is useful for posing the left finger to match the
pose of the corresponding right finger because the left finger sliders will now have the same values
as the right finger for the same pose. Keep Bones Connected keeps all of the bones affected by the
expression connected. With the Include Tip Curl parameter enabled, all bones after the last bone in the
finger, as shown in the example image above, will be included in the Curl slider's control. This allows
you to have control over the fingers of creature characters that have more bones in their fingers than
a normal human hand.
Range Tab
In the Range tab you can set the minimum
and maximum range of the Spread, Bend
and Curl sliders, so you can customize the
slider ranges for different characters.
11
CD Thumb Expression
This expression is designed to control a thumb set-up and works similar to the CD Finger expression
but with added sliders for Grip and Twist. The set-up of the bones is a bit different here. There must be
a Root Bone, preferably a Null bone, at the base of the thumb bone chain. The next bone in the chain
will be controlled by the Grip, Twist and Spread sliders. These three sliders are essentially controlling
Up Vector
Root Bone
(null)
the rotation around the three axes of the bone. The Bend slider controls the bending motion at the
first knuckle. The Curl slider controls the bending motion at the second knuckle (the tip of the thumb).
Enabling the Combine Bend and Curl switch disables the Curl slider and allows the Bend slider to
control both bend and curl. The Up Vector Object link holds the Up Vector object that is used for the
rotation plane calculation.
Tag Properties Tab
Show Line will display a line from the Up Vector
Object to the Root Bone Object, and also lines
through the center of the bones. Up Vector Axis
is a pop-up menu allowing you to choose which
axis will point to the Up Vector (+X, +Y, -X or
-Y). Line Color allows you to change the color of
the lines that are drawn. Left Hand designates
whether the thumb is on the left or right hand. With this enabled the thumb is determined to be a left
hand thumb and when it is disabled it is determined to be a right hand thumb. When the thumb is in
left hand mode, the Twist and Spread sliders work in the opposite direction. This is useful for posing
the left thumb to match the pose of the corresponding right thumb because the left thumb sliders will
now have the same values as the right thumb for the same pose. Keep Bones Connected keeps all
of the bones affected by the expression connected.
Range Tab
In the Range tab you can set the minimum and
maximum range of the Grip, Twist, Spread,
Bend and Curl sliders, so you can customize
the slider ranges for different characters.
12
CD Rotator Expression
This expression is designed to control the hierarchical rotation of a bone chain using another object as
the controller. The Control Object link holds the object that will control the bone chains rotation
Figure 8.1
This first bone then passes its local rotation on to the next bone. If the first bone has no parent, then
its global rotation is its local rotation. If the first bone has a parent, then its local rotation is relative to
its parents rotation. For example: if you rotate the Control Objects pitch 90 so that its Z axis is pointing straight up, the first bones global rotation will be 90 pitch. If the first bone has no parent, then its
local rotation is also 90 pitch and that will be passed on to the next bone. If the first bone has a parent
13
and the parents global rotation is also 90 pitch, then the first bones local rotation is 0 pitch and that
will be passed on to the next bone. With this in mind, it is always a good idea that the first bone in a
hierarchal rotation set-up has a parent when using the CD Rotator expression.
14
CD Hand Tag
The CD Hand tag is designed to work with the CD Finger and CD Thumb expressions to combine all
of these two expressions relating to the individual hand into one convenient interface.
Tag Properties
This is where you create the links for the CD
Finger and CD Thumb expressions of the hand.
To add and subtract links, use the Add Finger
and Sub Finger buttons. These links will only
recognize CD Finger or CD Thumb expressions
and they will also distinguish between the two.
The names of the links will assume the names
of the expression tags dropped into them. You
can change the name of any expression tag by
renaming it in the Basic tab of the tags Attributes
Manager.
Controllers
This tab will hold the sliders to control the individual
expressions. The controllers are created automatically when you drop an expression into one of
the links created in the Tag Properties tab. Each
set of sliders is created according to the type
of expression to which it is related and placed
in a foldable subgroup. These subgroups also
assume the names of the expressions to which
they are linked. The Left Hand switch controls the
Left Hand switches of the linked CD Thumb and
CD Finger tags.
Pose
In this tab you can save and mix poses, which
are sets of slider values for all of the expressions
associated with the CD Hand tag. Use Mixer is
the main pose blend slider which blends between
stored poses and the current slider values in the
Controllers tab. Add Pose will add new poses
to the bottom of the pose list. Remove Pose will
remove poses from the pose list starting from the
bottom of the list. The Base Pose is a permanent
pose which can not be removed and is considered the basic rest state or "bind pose" of the hand. Each
pose has 3 buttons: Set, Edit and Restore. The Set button stores the current slider values into the pose.
The Edit button restores the saved slider values and "unsets" the pose so that you can edit the pose and
then "reset" the edited pose with the Set button. The Restore button simply restores the saved slider
values. Each additional pose has a name field so you can name the pose and also has a Mix slider so
you can blend between poses. The Mix slider will assume the name of the pose.
15
CD Mech IK Expression
This expression is a 3 bone expression useful for setting up a mechanical arms and legs. There are two object links that will be used for the
RP Solver calculation. These links hold the Pole Vector Object and IK
Handle Object, and they will accept any basic object.
Important Note: The third bone needs a child to perform the IK calculation, so if there will be no child bone after the third bone in the
chain, then there must be a tip effector at the end of the third bone.
Otherwise the expression will have no effect.
Pole Vector
IK Handle
legs. Keep Bones Connected keeps all of the bones affected by the expression connected, while Keep
Next Connected keeps the next bone down connected to the last bone affected by the expression.
Lock Upper Limb will lock the second and third bones to a rotation plane that is perpendicular to the
parent of each bone (see figure 2.2). Root Angle sets the angle of the root bone in relation to the IK
Handle Object direction. At 0 the root bone is perpendicular to the IK Handle Object direction. Root
Flip reverses the perpendicular direction of the root bone so that it can be used for setting up the other
side of the character. Both the Root Angle and Root Flip parameters are only available when the Lock
Upper Limb parameter is disabled. The Enable Lower Limb Slide parameter allows the tip effector of
the chain to slide up and down along the third bone's Z axis, while the Min and Max parameters set the
clamping limits of the tip effector's sliding. These parameters are only available when the Lock Upper
Limb parameter is enabled.
CD Smooth Rotation
This expression tag is designed to smooth out the interpolation between animation keys of an objects
HPB tracks to eliminate the wobble caused by gimbal lock problems.
Tag Properties
The Use Smooth Rotation parameter can be used to turn the tag's smoothing function on and off.
CD IK Handle
This expression tag is a multi-joint IK solver initially designed to be compatible with importing IK constraints through the CD FBX Import/Export plugin. It supports the features, supported by the FBX SDK,
that other 3D applications would support for importing and exporting IK constraints.
Tag Properties
Use IK turns the IK calculation on and off. The IK Blend
slider is used for IK/FK blending as described above
in the IK/FK Blending section. Show Lines will display
lines between the IK Handle Object, the root bone
and the Pole Vector Object, and also lines through the
center of the bones. The Pole line can be set to target
the Root or the tip of the first Bone. Line Color allows
you to change the color of the lines that are drawn. IK
Solver is a pop-up menu allowing you to choose the
type of IK solver. The choices are IKRP Solver (rotation plane), IKSC Solver (single chain) and IKHD Solver (history dependent). The Unlock Root option
will enable the root bone to be free floating. Pole Axis is a pop-up menu allowing you to choose which
17
CD Linkage IK
This expression tag is designed for rigging mechanical linkages that convert linear motion into circular
motion, for example as would be needed for a crank shaft and connecting rod in a steam engine or
gasoline engine. NOTE: The expression works in the opposite way that a real engine would work. In
other words where a real engine would convert linear motion to circular motion by the piston pushing
the connecting rod to turn the wheel or crank shaft, the CD Linkage IK tag converts circular motion into
linear motion by allowing the rotation of the wheel or crank shaft to pull the connecting rod and piston.
Tag Properties
Show Lines will display lines between the Goal
Object, the root bone and the Pole Object,
and also lines through the center of the bones.
Line Color allows you to change the color of
the lines that are drawn. Pole Axis is a popup menu allowing you to choose which axis
will point to the Pole Vector (+X, +Y, -X or -Y).
Keep Bones Connected keeps all of the bones
affected by the expression connected, while
Keep Next Connected keeps the next bone
down connected to the last bone affected by
the expression. Pole Object is a link that holds
an object to control the pole vector. The pole vector determines which axis the root joint will rotate
around. Goal Object is the target object which determines the direction of the converted linear motion.
CD Piston IK
This expression tag is a multi-joint prismatic IK solver specifically designed for rigging telescoping
hydrolic pistons. The tip joint will be locked to the IK Handle object while all of the joints between the
root joint and the tip joint will adjust their position according to a percentage mix of the total distance
between the root and tip.
18
Tag Properties
Show Lines will display lines between the IK
Handle Object, the root bone and the Pole
Vector Object, and also lines through the
center of the bones. Line Color allows you to
change the color of the lines that are drawn.
Pole Axis is a pop-up menu allowing you to
choose which axis will point to the Pole Vector
(+X, +Y, -X or -Y). Position mix will dynamically create Mix sliders for all of the joints in
between the root joint and the tip joint. The Mix
sliders allow you to set the positions of the in
between joints as a percentage of the total distance between the root joint and the tip joint.
Pole Vector Object is a link that holds the pole
vector object. IK Handle Object is a link that holds the IK handle object.
19
These functions and symbols provide C.O.F.F.E.E. with access to layer properties in R10 and up,
and provide the CallButton() function for pre R11 versions.
Symbols for layer parameters:
LAYERDATA_SOLO;
LAYERDATA_VIEW;
LAYERDATA_RENDER;
LAYERDATA_MANAGER;
LAYERDATA_LOCKED;
LAYERDATA_GENERATORS;
LAYERDATA_DEFORMERS;
LAYERDATA_EXPRESSIONS;
LAYERDATA_ANIMATION;
[bool] LayerOn([BaseList2D] bl, [int] id);
Enables an object's layer property.
Returns TRUE if successful
Parameters
BaseList2D bl
int id
BaseList2D bl
int id
BaseList2D bl
int id