Archive for April, 2010
Maya: Joint Placement of the Shoulders
by Administrator on Apr.13, 2010, under 2010 Production, Technical Production Notes
After creating 5 characters for animation, I have found a problem with many of the skeleton set-up’s out there, when it comes to the shoulder joints. While it may not sound too sexy of a topic. Trust me…if when your character moves his arm and the shoulders deform horribly, you will see that nice shoulders are quite sexy. ;)
When putting skeleton joints in the shoulder and arm many tutorials just have you put the shoulder joint right down the center…that will lead to hours of reconstruction in the future. Position the joint higher up towards the top of the shoulder mass. Just like it is in your own body…go figure!.
Maya Finger Rigging Script (MEL): create attributes and set-driven keys
by Administrator on Apr.12, 2010, under 2010 Production, Technical Production Notes
If you have rigged characters before, rigging the fingers probably conjures
up memories that make you twitch… If you rigged multiple characters, that is probably when you started drinking heavily. Below is a MEL script I tossed together which will set-up the attributes, rotate & create the set-driven keys for all the joints.
Fairly well commented with some directions for naming conventions and variable setting at the top of the script.
Enjoy.
- Michael
//Finger Attribute and Set-Driven Keys : Rigging Script
//written by Michael Swertfager 2010
//
//This script is designed to work with the following naming conventions
// - Control Curves –> [part]_[character abbreviation]_CTRLCurve_[Hand} EX. Wrist_B_CTRLCurve_L
// - Joints --> [Finger]_[Hand]_[Character abbreviation]Skel EX. Wrist_L_BSkel
//update these 3 varibles as you run this script for each hand of each character
$CharShort=”B”;
$Hand = “L_”;
$Curve = “Wrist_B_CTRLCurve_L”;
$Char = $CharShort+”_”;
//The name of each finger, update as needed. Note: If you used a different name for Thumb, you will also want to update the hard coding for the section “Thumb X Twist ATTRIBUTE” below.
string $Fingers[] ={”Thumb”,”IndexFinger”,”MiddleFinger”,”RingFinger”,”PinkyFinger”};
//JOINT CURL ATTRIBUTES
for ($MyJoint in $Fingers)
{
$MyCharHandJoint=$Char+$Hand+$MyJoint;
$MySkelJoint1=$MyJoint+”_1st”+”_”+$Hand+$CharShort+”Skel”;
$MySkelJoint2=$MyJoint+”_2nd”+”_”+$Hand+$CharShort+”Skel”;
$MySkelJoint3=$MyJoint+”_3rd”+”_”+$Hand+$CharShort+”Skel”;
//**Create Empty Attribbutes**
$MyaddAttr1=$MyCharHandJoint+”_1st”;
$MySetAttrCurve1=”\|”+$Curve +”.”+$MyCharHandJoint+”_1st”;
$MyaddAttr2=$MyCharHandJoint+”_2nd”;
$MySetAttrCurve2=”\|”+$Curve +”.”+$MyCharHandJoint+”_2nd”;
$MyaddAttr3=$MyCharHandJoint+”_3rd”;
$MySetAttrCurve3=”\|”+$Curve +”.”+$MyCharHandJoint+”_3rd”;
addAttr -ln $MyaddAttr1 -at double $Curve;
setAttr -e -keyable true $MySetAttrCurve1;
addAttr -ln $MyaddAttr2 -at double $Curve;
setAttr -e -keyable true $MySetAttrCurve2;
if ($MyJoint != “Thumb”)
{
addAttr -ln $MyaddAttr3 -at double $Curve;
setAttr -e -keyable true $MySetAttrCurve3;
}
//print “Testing Key Varible Values”;
//print $MyaddAttr1;
//print “ “;
//print $MySetAttrCurve1;
//print “ “;
//print “ “;
//**Create Set-Driven Keys: Assign joint rotation to attribute**
//Set Driven Keys for 1st Joint
setAttr ($Curve+”.”+$MyCharHandJoint+”_1st”) 0;
setAttr ($MySkelJoint1+”.rotateZ”) 0;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_1st”) ($MySkelJoint1+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_1st”) 75;
setAttr ($MySkelJoint1+”.rotateZ”) -75;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_1st”) ($MySkelJoint1+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_1st”) -45;
setAttr ($MySkelJoint1+”.rotateZ”) 45;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_1st”) ($MySkelJoint1+”.rotateZ”);
//Set Driven Keys for 2nd Joint
setAttr ($Curve+”.”+$MyCharHandJoint+”_2nd”) 0;
setAttr ($MySkelJoint2+”.rotateZ”) 0;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_2nd”) ($MySkelJoint2+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_2nd”) 75;
setAttr ($MySkelJoint2+”.rotateZ”) -75;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_2nd”) ($MySkelJoint2+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_2nd”) -45;
setAttr ($MySkelJoint2+”.rotateZ”) 45;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_2nd”) ($MySkelJoint2+”.rotateZ”);
//Set Driven Keys for 3rd Joint — Thumb only has 2 joints so it needs to skipped here for the thumb joint.
if ($MyJoint != “Thumb”)
{
setAttr ($Curve+”.”+$MyCharHandJoint+”_3rd”) 0;
setAttr ($MySkelJoint3+”.rotateZ”) 0;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_3rd”) ($MySkelJoint3+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_3rd”) 75;
setAttr ($MySkelJoint3+”.rotateZ”) -75;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_3rd”) ($MySkelJoint3+”.rotateZ”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_3rd”) -45;
setAttr ($MySkelJoint3+”.rotateZ”) 45;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_3rd”) ($MySkelJoint3+”.rotateZ”);
}
//print “\n\n** Test Printing Values for Set-Driven Keys.\n”;
//print ($Curve+”.”+$MyCharHandJoint+”_1st”);
//print “\n”;
//print ($MySkelJoint1+”.rotateZ”);
//print “\n”;
//print ($Curve+”.”+$MyCharHandJoint+”_1st”);
//print “\n”;
//print ($MySkelJoint1+”.rotateZ”);
//print “\n”;
//Actual Reference from Maya for Set-Driven Keys
//setAttr “Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd” 75;
//setAttr “IndexFinger_2nd_L_BSkel.rotateZ” -75;
//setDrivenKeyframe -currentDriver Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd IndexFinger_2nd_L_BSkel.rotateZ;
//setAttr “Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd” -45;
//setAttr “IndexFinger_2nd_L_BSkel.rotateZ” 45;
//setDrivenKeyframe -currentDriver Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd IndexFinger_2nd_L_BSkel.rotateZ;
}
//SPREAD FINGERS ATTRIBUTES
for ($MyJoint in $Fingers)
{
if ($MyJoint != “Thumb”)
{
$MyCharHandJoint=$Char+$Hand+$MyJoint;
$MySkelJoint1=$MyJoint+”_1st”+”_”+$Hand+$CharShort+”Skel”;
$MyaddAttrSpread=$MyCharHandJoint+”_Spread”;
$MySetAttrCurveSpread=”\|”+$Curve +”.”+$MyCharHandJoint+”_Spread”;
addAttr -ln $MyaddAttrSpread -at double $Curve;
setAttr -e -keyable true $MySetAttrCurveSpread;
//Set Driven Keys for all fingers - Spread
setAttr ($Curve+”.”+$MyCharHandJoint+”_Spread”) 0;
setAttr ($MySkelJoint1+”.rotateY”) 0;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_Spread”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_Spread”) 25;
setAttr ($MySkelJoint1+”.rotateY”) -25;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_Spread”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve+”.”+$MyCharHandJoint+”_Spread”) -25;
setAttr ($MySkelJoint1+”.rotateY”) 25;
setDrivenKeyframe -currentDriver ($Curve+”.”+$MyCharHandJoint+”_Spread”) ($MySkelJoint1+”.rotateY”);
}
}
//Thumb X Twist ATTRIBUTE
$MyaddAttrTwist=$Char+$Hand+”Thumb_Twist”;
$MySetAttrCurveTwist=”\|”+$Curve +”.”+$Char+$Hand+”Thumb_Twist”;
$MySkelJoint1=”Thumb”+”_1st”+”_”+$Hand+$CharShort+”Skel”;
addAttr -ln $MyaddAttrTwist -at double $Curve;
setAttr -e -keyable true $MySetAttrCurveTwist;
//Set Driven Keys for Thumb - Twist
if ($Hand == “L_”)
{
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) 0;
setAttr ($MySkelJoint1+”.rotateY”) 0;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) 50;
setAttr ($MySkelJoint1+”.rotateY”) -50;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) -35;
setAttr ($MySkelJoint1+”.rotateY”) 35;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
}
else
{
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) 0;
setAttr ($MySkelJoint1+”.rotateY”) 0;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) -50;
setAttr ($MySkelJoint1+”.rotateY”) 50;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
setAttr ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) 35;
setAttr ($MySkelJoint1+”.rotateY”) -35;
setDrivenKeyframe -currentDriver ($Curve +”.”+$Char+$Hand+”Thumb_Twist”) ($MySkelJoint1+”.rotateY”);
}
//Actual Reference from Maya for Set-Driven Keys
//setAttr “Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd” 75;
//setAttr “IndexFinger_2nd_L_BSkel.rotateZ” -75;
//setDrivenKeyframe -currentDriver Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd IndexFinger_2nd_L_BSkel.rotateZ;
//setAttr “Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd” -45;
//setAttr “IndexFinger_2nd_L_BSkel.rotateZ” 45;
//setDrivenKeyframe -currentDriver Wrist_B_CTRLCurve_L.B_L_IndexFinger_2nd IndexFinger_2nd_L_BSkel.rotateZ;
Teachers Bundle: The Tell-Tale Heart (updated)
by Administrator on Apr.09, 2010, under Uncategorized
I have updated the feature list for teachers bundle ( http://thetell-taleheart.com/blog/teachers-bundle/ )… lesson plans, online games, The Tell-Tale Heart video trivia, etc.
Note: For non-teachers the contents for the individually sold DVD’s are also listed on the blog page.
If you would like to see a feature in the teachers bundle or as an extra on the DVD, I would like to hear your comments.