3D Rigging: Difference between revisions
Karljahnke (talk | contribs) |
Karljahnke (talk | contribs) |
||
| Line 17: | Line 17: | ||
===[[Primitive Maya CV Curves]]=== | ===[[Primitive Maya CV Curves]]=== | ||
Link to MEL script library to create useful primitive CV curves | Link to MEL script library to create useful primitive CV curves: | ||
[[Primitive Maya CV Curves]] | |||
=== Quick Curve Duplication For Joints === | === Quick Curve Duplication For Joints === | ||
Revision as of 11:00, 15 January 2026
Maya Rigging Concepts
Introduction
[Grouping, Parenting, Combining]
[Maya – Introduction to Joints and Bind Skin]
Maya Rigging Tools
MEL scripts
Usage demo for CV Curve Duplication and Quick Parent Constraints.
Link to MEL script library to create useful primitive CV curves:
Quick Curve Duplication For Joints
Control curve duplication and place at selected joints pivot center
Usage: Select all the joints you want to duplicate a curve and place at the joints center, then select the curve which you want to duplicate last. Then execute the script. I recommend placing this script as a shelf tool.
// Get selection in order
string $sel[] = `ls -sl`;
if (size($sel) < 2)
{
warning "Select one or more joints, then a curve LAST.";
}
else
{
// Last selected object is the curve
string $curve = $sel[size($sel) - 1];
// Validate curve transform
if (`nodeType $curve` != "transform")
{
warning "Last selected object must be a curve transform.";
}
else
{
// Loop through selected joints
for ($i = 0; $i < size($sel) - 1; $i++)
{
string $joint = $sel[$i];
// Skip anything that isn't a joint
if (`nodeType $joint` != "joint")
continue;
// Get joint pivot position (world space)
float $pivot[3] = `xform -q -ws -rp $joint`;
// Duplicate curve
string $dup[] = `duplicate -rr $curve`;
// Move duplicate to joint pivot
xform -ws -t $pivot[0] $pivot[1] $pivot[2] $dup[0];
}
}
}
Quick Parent Constraints
Parent constraints applied to joints en masse.
Usage: Select a control curve which will be the driving constraint, then select the joint to be constrained. Repeat the selection in order, curve then joint, for as many joints are going to be constrained. Then execute the script.
// Get ordered selection
string $sel[] = `ls -sl -o`;
int $count = size($sel);
// Need at least one curve-joint pair
if ($count < 2 || ($count % 2) != 0)
{
warning "Selection must be in pairs: curve, joint, curve, joint, etc.";
}
else
{
// Step through selection two at a time
for ($i = 0; $i < $count; $i += 2)
{
string $curve = $sel[$i];
string $joint = $sel[$i + 1];
// Validate types
if (`nodeType $joint` != "joint")
{
warning ("Skipping pair: " + $curve + " → " + $joint + " (second object is not a joint)");
continue;
}
// Apply parent constraint (curve drives joint)
parentConstraint -mo $curve $joint;
}
}
Alternative Quick Parent Constraint Using Distance
Similar to the above quick parent constraint, instead of using the ordered selection method, the script takes the distance between the joint and the curve into account and applies the constraint based on the closest pair.
// Get selection
string $sel[] = `ls -sl`;
string $curves[];
string $joints[];
// Separate curves and joints
for ($obj in $sel)
{
string $type = `nodeType $obj`;
if ($type == "joint")
{
$joints[size($joints)] = $obj;
}
else
{
// Accept transform nodes with curve shapes
string $shapes[] = `listRelatives -s $obj`;
if (size($shapes) > 0 && `nodeType $shapes[0]` == "nurbsCurve")
{
$curves[size($curves)] = $obj;
}
}
}
// Validation
if (size($curves) == 0 || size($joints) == 0)
{
warning "Selection must contain at least one curve and one joint.";
}
else
{
// Loop through curves
for ($curve in $curves)
{
vector $curvePos = `xform -q -ws -t $curve`;
float $minDist = 1e10;
string $closestJoint = "";
// Compare against all joints
for ($joint in $joints)
{
vector $jointPos = `xform -q -ws -t $joint`;
vector $diff = $curvePos - $jointPos;
float $dist = mag($diff);
if ($dist < $minDist)
{
$minDist = $dist;
$closestJoint = $joint;
}
}
// Apply constraint
if ($closestJoint != "")
{
parentConstraint -mo $curve $closestJoint;
}
}
}
Parent Constraint
Point Constraint
Orient Constraint
Aim Constraint
Pole Vector
[Maya – Pole Vector Constraint]
Maya Rigging Assignment Demonstrations
Unicycle Rig Demo
[Download of Maya Unicycle File]
Bipedal Character Rigging
[Starter Maya File For Bipedal Rig]
[Character Rigging Part 1 – Placing Bones]
[Character Rigging Part 2 – Mirroring Bones]
[Character Rigging Part 3 – Custom Control Curves]
[Character Rigging Part 4 – Creating Leg IK (Left)]
[Character Rigging Part 5 – Creating Leg IK (Right) and Pelvis Controls]
[Character Rigging Part 6 – Creating Spine Controls]
[Character Rigging Part 7 – Creating Hand and Arm Controls]
[Character Rigging Part 8 – Creating Hand and Arm Controls (Right)]
[Character Rigging Part 9 – Fixing Mistakes, Linking Spine to Center of Mass]
[Character Rigging Part 10 – Adding Attributes for Knees and Elbows]
[Character Rigging Part 11 – Blendshape Eyes (Concept)]
[Character Rigging Part 12 – Blendshape Eyes (Left)]
[Character Rigging Part 13 – Blendshape Eyes (Right)]
[Character Rigging Part 14 – Controllers for Brow]
[Character Rigging Part 15 – Binding Skin for the Brow]
[Character Rigging Part 16 – Renaming Bones]
[Character Rigging Part 17 – Bind Skin to the Head]
[Character Rigging Part 18 Bind Skin to the Shoe (Left)]
[Character Rigging Part 19 – Bind Skin to the Shoe (Right)]
[Character Rigging Part 20 – Skin Bind to the Leg (Left)]
[Character Rigging Part 21 – Skin Bind to the Leg (Right)]
[Character Rigging Part 22 – Skin Bind for the Pants]
[Character Rigging Part 23 – Skin Bind for the Shirt]
[Character Rigging Part 24 – Skin Bind for Arm (Left)]
[Character Rigging Part 25 – Skin Bind for Arm (Right)]
Miscellaneous Topics
Using IK for Robot Arms and Legs
[Maya – Rigging – Creating and Using IK Robot’s Arms and Legs]
Solution to Wrist Collapsing
[Solution to wrist collapsing ]
Rig a Flip Flop
[How to Rig Flip Flops and Feet (part 1)]
[How to Rig Flip Flops and Feet (part 2)]
Object/World Controller
[Maya – Object/World Controller]
Controller to Swap Between Objects (pick up/drop objects)
Double Link Look For Alternate Demo Video [[1]]
Mouth Texture Swap
[Maya – Rigging/Shader for Mouth Texture Swap ]
Cartoon Eye Shader Rig
[Maya – Rigging/Shader for Eye Rig]