NavHeader
journalHeader
Showing posts with label Mel Scripts. Show all posts
Showing posts with label Mel Scripts. Show all posts

Thursday, August 26, 2010

Bake Custom Geo at 360 degrees for 3 seconds...

...and you get fully working custom facial geo with no wrap deformers to slow things down. As you might have guessed, the custom facial geo baker is complete. So now you can...

The short of it:

  1. Import your new beard/gotee whatever
  2. Position it where you want it in relation to a ZEROED out Morphy face
  3. Select your custom mesh, then his face mesh
  4. Source and run script
  5. Go grab some candy. Preferably dark chocolate.
  6. Come back and animate.
The long of it:
For those of you interested, here's how I go about tackling things like that. First I figure out what I want the script to do. Here's my original "plan" notes:

  • Process to be scripted
    • Select $customGeo followed by deformingMesh
    • Create wrapDeformer 
    • Get blendshape channels into array
    • For loop
      • for each blendshape channel on the deforming mesh (limit by facial region?)
        • Get input connector value and put in $driverArray
        • Break the connection on the blendshapeChannel
        • turn channel value to 1
        • duplicate $customGeo to freeze it
          • Add new geo name to $bakedCustomGeo string array
        • position new geo
        • reconnect the connecter value with data from $driverArray
    • Put all new blendshape geo in new group
    • Name group
    • Connect all new geo back into original geo as blendshape node ($customGeoBaseName_bsNode)
Of course that's not going to be everything as lots of stuff rears it's head and must be put down like a many headed beast trying to devour your time. Next thing I do is look through scripts I have or can find online that might have similar functions I can hack (see my previous hacking other people's scripts post). I had used a great script written Asi Sudai called extractBlendshapes. It will take a mesh with a blendshape that you want to get the blendshapes from if, say for example, you deleted the original target meshes. It even puts them in a handy visual columns/rows format in worldspace. I made judicous use of large chunks of his code for the duplication and extraction function. I just modified it to duplicate the wrap deformed customGeo instead of the main mesh then did all the rest of the stuff I needed to do to get things working.


Also, thanks to my buddy David Bokser who helped me out with a syntax issue I was getting stuck on last night.

Here's the script (sorry, I don't have the best coding practices as I'm still a novice at it):
/*
TITLE: jbMorpheusFacialCustomGeoBaker
VERSION: 1.0
AUTHOR:Josh Burton
www.joshburton.com
DATE: August 26, 2010

DESCRIPTION:
Script for baking out custom facial geo for the Morpheus Rig.

DISCLAIMER:
If your computer explodes, I didn't do it.

HOW TO USE:
1. First select the custom geo to bake
2. Then select the head (to wrap it to)
3. Run script

HISTORY:
08.26.10 - BIRTH!

Acknowledgements -
1. Blendshape extraction, size, existance checking from extractBlendShapes - Asi Sudai
asi@asimation.com www.reel.asimation.com
2. David Bokser for helping me fix some of my syntax issues
*/

//sub Procs

// Debuging printing proc - Acknowledgement 1
proc extractBlendShape.debug(string $msg)
{
if (1==1)
print ("\n***Debug: " + $msg +"\n");
}// End
// Get object bounding size - Acknowledgement 1
proc extractBlendShape.getBounding(string $node)
{
float $bounding[]=`xform -q -bb $node`;
float $xSize=(`abs $bounding[0]` +`abs $bounding[3]`);
print $xSize;
}// End
// check the object have blendShapes - Acknowledgement 1
proc string extractBlendShape.getBlendShape(string $node)
{

string $shapes[] = `listRelatives -s $node`;
for ($shape in $shapes){
string $tempArray[]=`listConnections -s 1 -d 0 -type "blendShape" ($shape + ".inMesh")`;
if ($tempArray[0] != "") return $tempArray[0];
}
return "none";
}// End

//Main Proc
global proc jbMorpheusFacialCustomGeoBaker() {

//Declaring our intial variables
string $blendShapeNamesBaked[];
string $blendshapeConnections[];
string $currentConnections[];
string $selected[] = `ls -sl`;

//Josh, do an error check to make sure the selection order is correct
$customGeo = $selected[0];
$deformerGeo = $selected[1];

//create and store name of Wrap deformer
string $wrapDeformer[] = `deformer -type wrap $customGeo`;
select -r $customGeo;
select -tgl $deformerGeo;
AddWrapInfluence;
select -cl;

//reorders deformation order for proper baking of skinned mesh
reorderDeformers "tweak1" "face_skinCluster" $deformerGeo;


// Check if object have blendShape node. - Acknowledgement 1
string $blendShapeNode = `extractBlendShape.getBlendShape $deformerGeo`;
if ($blendShapeNode == "none") { print ("\n"+ $deformerGeo + " don't have blendShape"); return; }
// Get all BlendShapes shapes - Acknowledgement 1
extractBlendShape.debug $blendShapeNode;
string $blendShapeNamesShort[] = `listAttr -m ($blendShapeNode + ".weight")`;

int $n = 0;



//Creates a new name for the geo to be baked
for ($name in $blendShapeNamesShort) {
$blendShapeNamesBaked[$n] = $customGeo + "_" + $blendShapeNamesShort[$n];
$n++;
}

// Start extracting
// Get object size, to better spread the blendShapes - Acknowledgement 1
float $bounding[]=`xform -q -bb $customGeo`;
float $boundingSizeX=(`abs $bounding[0]` +`abs $bounding[3]`);
float $boundingSizeY=(`abs $bounding[1]` +`abs $bounding[4]`);
extractBlendShape.debug ("Bounding size = " + $boundingSizeX);
// Start extracting each shape - Acknowledgement 1, changed to export the custom geo instead of the deforming Geo
int $t=1;
string $bakedCustomGeo[];
for ($i=0; $i<`size($blendShapeNamesShort)`; $i++) { int $row = `floor($i/5)`; if ($t>5) $t=1;
extractBlendShape.debug ("doing blendShape - " + $blendShapeNamesShort[$i]);
//queries the connection that goes into the blendshape node and stores it
string $currentBlendShapeChannel = $blendShapeNode + "." + $blendShapeNamesShort[$i];
$currentConnections = `listConnections -d off -p on -s on $currentBlendShapeChannel`;
$blendshapeConnections[$i] = $currentConnections[0];
//breaks connection on blendshape node
disconnectAttr $blendshapeConnections[$i] ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) ;
//back to Asi's code
setAttr ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) 1;
string $bakedCustomGeo[]=`duplicate -name $blendShapeNamesBaked[$i] $customGeo`;
xform -r -t (($boundingSizeX*($t+1.2))*1.1) (($boundingSizeY*$row)*-1) 0 $bakedCustomGeo[0];
setAttr ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) 0;
// Restores connection
connectAttr $blendshapeConnections[$i] $currentBlendShapeChannel;
$t++;
}
//Restores deformation order of the Deformer Geo
reorderDeformers "face_skinCluster" "tweak1" $deformerGeo;
reorderDeformers "face_skinCluster" "face_bsNode" $deformerGeo;

//Delete wrap and connect baked custom geo as blendshapes to original custom geo
delete $wrapDeformer[0];
$customGeoBlendShapeNode = $customGeo+"_bsNode";
blendShape -n $customGeoBlendShapeNode $blendShapeNamesBaked $customGeo ;

//groups our new baked geo for easy cleanup later on
$bakedCustomGeoGroupName = $customGeo+"_bsGeo_grp";
group -n $bakedCustomGeoGroupName $blendShapeNamesBaked;
setAttr ($bakedCustomGeoGroupName +".v") 0;
parent $bakedCustomGeoGroupName customFacialGeo_bsGeo_grp;

//Connects our custom geo blendshape channels to the original deforming mesh channels
int $b=0;
for ($bshape in $blendShapeNamesBaked) {
connectAttr ($blendShapeNode + "." + $blendShapeNamesShort[$b]) ($customGeoBlendShapeNode +"."+ $blendShapeNamesBaked[$b]);
$b++;
}

//Skin the custom geo
$customGeoSkinName = $customGeo+"_skinCluster";
skinCluster -n $customGeoSkinName -tsb qssFaceSkinJoints $customGeo;

//copy the skin weights from the deformer geo to the custom geo
copySkinWeights -ds $customGeoSkinName -ss "face_skinCluster" -noMirror -surfaceAssociation closestPoint -influenceAssociation name;

//renames our original custom geo properly
$customGeoProperName = $customGeo+"_customGeo";
rename $customGeo $customGeoProperName;

//Report complete
print ($customGeoProperName + " exported properly. I'd move the joysticks around to make sure.") ;

}

What else?
  • Been doing some polishing on some of the blendshapes for the rig and deformation
  • Pushed Nose widener more at a beta tester's request
  • Bug fix - eyebrow mover rotation is now properly mirrored
  • Moved out the jaw_anim control so it wouldn't get stuck behind beards
  • Moved the hair over to using skinning rather than wrap deformers
Now, pardon me but I have some pig tails that were sent in to look at. Keep em comin!

Friday, July 16, 2010

Yes, I'm working...

Had a quick remote rigging gig with Psyop this week which I think is all done and I think I'll be heading back to LA before too long to do some more work there. Can't wait to see all the LA friends.


He's such a tease...

Been a been able to squeeze a little bit of Morphin time in and making some good progress (just playing with some body deformation stuff above on the same skeleton - the head above just the base mesh).

  • Body rig
    • Decided to do The Setup Machine again for Morphy v01 just so I can get this done sometime this year. That hand My buddy Keith pointed me to some awesome tools one of his students wrote while at Ringling. - http://www.bohdon.com/scripts/. He has a load of neat tools there which I fully intend on checking out  when I have some time. Do yourself a favor and check em out yourself:)
    • Need to figure out a best method for connecting my head rig cleanly. The end idea is that you can throw the Morphy head rig on any body rig you please
  • Facial rig - Been getting great feedback from buddies and have a good list of changes to make for the next (probably 1.0 final facial rig)
    • Adding a nose flare control
    • Add asymmetrical customization options
    • Upping the intensity of the sneer
    • Changing mouth wide from being a smile to more of a horizontal transition to make the control feel better
    • Push the limits on most of the controls from the 1.0 value limit so you all can awesomely break the face
    • Add jaw rotation control
    • Got some great ideas to try on Morphy 2.0. When I'll find the time for that I really don't know as I have a short film idea  I'm wanting to start working on.

Wednesday, July 7, 2010

Back to that hacking other people's scripts and other things....

Been working on cleaning things up on the facial rig to final it.

  • Took Morphy to the dentist to hopefully fix that teeth penetrating the cheek issue (painful!)
  • Added Cheek up/dn/forward/back poses at the request of one of my buddies (whose site I would be happy to link to if he had one to point me to...hint...Rick...:)
  • Started getting rid of all the expressions driving the facial rig and going totally nodal. In doing so I'm hacking jsFacialWin as I pointed out last week. So, to aid that little endevour with as many controls as I have. I scripted the process of adding the necessary nodes, renaming and reverting the names. Took a page out of the author of that awesome scripts book in using string attributes for storing variables for later use. Neato! Here it is if you might find it useful...
The process for that is:
  1. Source my script
  2. to input the starter variables when you call the script such as
    jbFacialGUITricker ("circle_anim", "circle_anim_grp", "C");
    In this case "circle_anim" is the joystick itself, "circle_anim_grp" is it's parent transform group, and "C" is the type of joystick control I want it to emmulate. 
  3. After you're done, select the anim control you wanna "reset" and type "global proc jbFacialGUITrickerClean"
/*variables needed

Script to trick jsFacialwin to using other "joysticks"
Sample input:
jbFacialGUITricker ("circle_anim", "circle_anim_grp", "C");

There's no error checkin cause this is mainly for me:)

*/

global proc jbFacialGUITricker (string $control, string $group, string $type)
{
string $controlAttr;
string $grpAttr;

//renames the controls
string $controlNewName = `rename $control ($control + "CircleCtrl")`;
string $groupTempName = `rename $group ($group + "Grp")`;

//adds our new attributes for the control window to work
addAttr -ln "name" -dt "string" $controlNewName;
addAttr -ln "type" -dt "string" $groupTempName;

//sets those new attributes
setAttr -type "string" ($controlNewName+".name") $control;
setAttr -type "string" ($groupTempName+".type") $type;

//renames the group to the proper format in an inefficient manner (that works)
select $groupTempName;
searchReplaceNames "_grpGrp" "Grp" "selected";

$groupNewName = `ls -sl`;

//adds our undo attributes to pull all this stuff out
addAttr -ln "originalGroup" -dt "string" $controlNewName;
addAttr -ln "newName" -dt "string" $controlNewName;
addAttr -ln "newGroup" -dt "string" $controlNewName;

//sets the attributes for jbFacialGUITrickRemove storing variables for another script
setAttr -type "string" ($controlNewName+".originalGroup") $group;
setAttr -type "string" ($controlNewName+".newName") $controlNewName;
setAttr -type "string" ($controlNewName+".newGroup") $groupNewName;


print "Done";
}

global proc jbFacialGUITrickerClean ()
{
string $originalName;
string $originalGrp;
string $newName;
string $newGrp;

//gets attributes from our selected control
$control = `ls -sl`;

$originalName = `getAttr ($control[0]+".name")`;
$originalGrp = `getAttr ($control[0]+".originalGroup")`;
$newName = `getAttr ($control[0]+".newName")`;
$newGrp = `getAttr ($control[0]+".newGroup")`;

//renames our controls to the proper names
rename $newName $originalName;
rename $newGrp $originalGrp;


}


Optimization stuff isn't exactly the most exciting...

Thursday, June 24, 2010

On the elegance of remap nodes....

Typically when I rig I hack the heck out of stuff using expressions and what not. For example, this had been my expression driving lid movement...

//Left Lid connections
eyeRigAttributeHolder.blink_center_left = clamp (0,1, -blink_left_anim.translateY);
eyeRigAttributeHolder.blink_inner_left = clamp (0,1, -blink_left_anim.translateY);
eyeRigAttributeHolder.blink_outer_left = clamp (0,1, -blink_left_anim.translateY);

eyeRigAttributeHolder.upperLid_center_left = clamp (-27, 35, -uprLid_left_anim.translateY * 35);
eyeRigAttributeHolder.upperLid_outer_left = clamp (-25, 25, -outer_uprLid_left_anim.translateY * 25);
eyeRigAttributeHolder.upperLid_inner_left = clamp (-8, 20, -inner_uprLid_left_anim.translateY * 20);

eyeRigAttributeHolder.lowerLid_center_left = clamp ( -12, 21, -lwrLid_left_anim.translateY * 21);
eyeRigAttributeHolder.lowerLid_outer_left = clamp ( -14, 12, -outer_lwrLid_left_anim.translateY * 20);
eyeRigAttributeHolder.lowerLid_inner_left = clamp ( -5, 12, -inner_lwrLid_left_anim.translateY * 12);

//adds rotation on the center eyelid skin joints for bend in the eyelid and is then negated by the blink so things seal up
left_uprLid_skin_jnt.rotateZ = uprLid_left_anim.rotateZ - (uprLid_left_anim.rotateZ * -blink_left_anim.translateY);
left_lwrLid_skin_jnt.rotateZ = lwrLid_left_anim.rotateZ - (lwrLid_left_anim.rotateZ * -blink_left_anim.translateY);


//left eyelid group follows the eye
eyelid_left_rig_grp.rotateY = left_eye_skin_jnt.rotateY * .2;
uprEyelid_left_rig_grp.rotateX = clamp (-35, 10, left_eye_skin_jnt.rotateX + (eyeRigAttributeHolder.blink_center_left * 35)) ;


//joint following
//left_uprFan_jnt.rotateX = left_uprLid_jnt.rotateX * .7;
//left_outerUprLid_jnt.rotateX = left_uprLid_jnt.rotateX * .7;
That's a bit of a mess and a major pain to edit for the user and wanting to follow in Shleifer's Animator Friendly rigging principles I looked into a bit of a more elegant solution and learned to love remap nodes in the process.

So with a bid of elbow grease and heavily modifying Doublestein's eyelid joint setup by adding new attributes and some new doodads everything connects in one nice little script.

Here's a chunk of that code...
//connecteding eyelid controls -jb
//upr
string $uprLidMovementRemap = `createNode remapValue -n ("remapUprLidMovement"+$location+$side)`;
setAttr ( $uprLidMovementRemap+".inputMin") -1;
connectAttr ($uprLidControl+".ty") ($uprLidMovementRemap+".inputValue");
connectAttr ($uprLidUprLimit) ($uprLidMovementRemap+".outputMax");
connectAttr ($uprLidLwrLimit) ($uprLidMovementRemap+".outputMin");
connectAttr ($uprLidMovementRemap+".outValue") ($uprLidMover);

//lwr
string $lwrLidMovementRemap = `createNode remapValue -n ("remapLwrLidMovement"+$location+$side)`;
setAttr ( $lwrLidMovementRemap+".inputMin") -1;
connectAttr ($lwrLidControl+".ty") ($lwrLidMovementRemap+".inputValue");
connectAttr ($lwrLidUprLimit) ($lwrLidMovementRemap+".outputMax");
connectAttr ($lwrLidLwrLimit) ($lwrLidMovementRemap+".outputMin");
connectAttr ($lwrLidMovementRemap+".outValue") ($lwrLidMover);


//Blink setup - jb
string $blinkmdNode = `createNode multiplyDivide -n ("BlinkmdNode"+$location+$side)`;
connectAttr ($blinkControl+".ty") ($blinkmdNode+".input1X");
setAttr ($blinkmdNode+".input2X") -1;
connectAttr ($blinkmdNode+".outputX") ($blinkMover);
It's also pretty cool in that there's now attributes sitting on a control that you can mess with to tweak the range of the lid movement by the controls. Pretty nifty.

Now I'd really like to buckle down and learn some python but if I'm gonna finish Morphy anytime soon, it'll have to wait.

Monday, September 14, 2009

Updates and tidbits...

Garden City is still chugging along. Just finished a large sequence and starting another. Here's the blocking from the first new shot. I shot some vid reference for this one (still experimenting with workflows) Personal life has been busy and been reading a tome of a book - Les Mis. What an amazing study in character development. Lots of neat stuffs on the internets:

  • Pencil Test Blog - If you're an animator, you should subscribe to this the rss feed here.
  • Need an idea for a doodle? - Check it out or the Worms of the Ensnaring Messiah might get you (Worms courtesy of the Dark Minion Generator on said site)
  • Amazing Paper-cutout/Illustrations - Love this piece.
  • Animator Tools - Some neat ones listed on a great blog for things to add to the toolbox
  • Nice Post on the 180 Degree Rule of Filmaking - Interesting read.

Thursday, April 2, 2009

Blake Rig and Script Jobs...

note - NOT my rig creation
Came across a new rig on Highend 3d and it's a pretty good looking rig. So I decided to use it for the lip sync piece I'm fixing to start on. It makes use of script jobs which don't seem to like referencing as the creator notes in the docs on the site. So I did some noodling and figured out how to make it work. If the character is referenced (all nodes prefix option) to "Ch1:", this is how to make the rig work.
  1. Fix the Expression
    • Go to the expression editor
    • Select the "CH1:blake_FKIKSpaceSwitch_scriptNode"
    • Input "CH1:" in the spot provided
  2. Fix the script jobs
    • For each character, you'll need to run this is in the script editor: scriptJob -ac "CH1:blake_L_arm_ikFK_switch.FK_IK_Match" "LArmFKIK"; scriptJob -ac "CH1:blake_R_arm_ikFK_switch.FK_IK_Match" "RArmFKIK"; scriptJob -ac "CH1:blake_L_leg_ikFK_switch.FK_IK_Match" "LLegFKIK"; scriptJob -ac "CH1:blake_R_leg_ikFK_switch.FK_IK_Match" "RLegFKIK"; scriptJob -ac "CH1:blake_L_arm_ikFK_switch.parent" "LArmSpace"; scriptJob -ac "CH1:blake_R_arm_ikFK_switch.parent" "RArmSpace"; scriptJob -ac "CH1:blake_L_leg_ikFK_switch.parent" "LLegSpace"; scriptJob -ac "CH1:blake_R_leg_ikFK_switch.parent" "RLegSpace"; scriptJob -ac "CH1:blake_tie_ikFK_switch.parent" "TieSpace";
  3. Notepad is your friend for additional characters - see Find and Replace
  4. Ran into an issue with referencing that the rig maker was kinda enough to help out with. You'll need to create a new script set to fuction on (Open/Close) and set the name spaces: proc multipleChars() { // prefix for character1 string $character1= "CH1:"; // prefix for character2 string $character2 = "CH2:"; // prefix for character3 string $character3 = "CH3:"; // prefix for character4 string $character4 = "CH4:"; string $a[] = `ls -sl`; if (($a[0] == ($character1+"blake_L_arm_ikFK_switch")) || ($a[0] == ($character1+"blake_R_arm_ikFK_switch")) || ($a[0] == ($character1+"blake_L_leg_ikFK_switch")) || ($a[0] == ($character1+"blake_R_leg_ikFK_switch")) || ($a[0] == ($character1+"blake_tie_ikFK_switch"))) { scriptNode -executeBefore ($character1+"blake_FKIK_SpaceSwitch_scriptNode"); } else if (($a[0] == ($character2+"blake_L_arm_ikFK_switch")) || ($a[0] == ($character2+"blake_R_arm_ikFK_switch")) || ($a[0] == ($character2+"blake_L_leg_ikFK_switch")) || ($a[0] == ($character2+"blake_R_leg_ikFK_switch")) || ($a[0] == ($character2+"blake_tie_ikFK_switch"))) { scriptNode -executeBefore ($character2+"blake_FKIK_SpaceSwitch_scriptNode"); } else if (($a[0] == ($character3+"blake_L_arm_ikFK_switch")) || ($a[0] == ($character3+"blake_R_arm_ikFK_switch")) || ($a[0] == ($character3+"blake_L_leg_ikFK_switch")) || ($a[0] == ($character3+"blake_R_leg_ikFK_switch")) || ($a[0] == ($character3+"blake_tie_ikFK_switch"))) { scriptNode -executeBefore ($character3+"blake_FKIK_SpaceSwitch_scriptNode"); } else if (($a[0] == ($character4+"blake_L_arm_ikFK_switch")) || ($a[0] == ($character4+"blake_R_arm_ikFK_switch")) || ($a[0] == ($character4+"blake_L_leg_ikFK_switch")) || ($a[0] == ($character4+"blake_R_leg_ikFK_switch")) || ($a[0] == ($character4+"blake_tie_ikFK_switch"))) { scriptNode -executeBefore ($character4+"blake_FKIK_SpaceSwitch_scriptNode"); } } scriptJob -killWithScene -e "SelectionChanged" "multipleChars";
That outa do it. Thanks Jason for the great rig and the help trouble shooting the referencing issue!

Wednesday, July 16, 2008

Scripts, Podcasts and MacGuffins!

Been working some on Bokser's film and enjoying that. I can't wait to get past blocking and into animating after the assets are finaled. In the meantime, I think it's time to get some back to the basics exercises going.

  • Updated jbExportQss - Got some insight from a poster on Cgtalk and adds some new abilities and squashed some bugs. Still available here. After this one, I think I'm done mel scripting for a while...my brain hurts.
  • Andrew Stanton Podcast - A nice long interview with the director of Wall-E and Finding Nemo.
  • Big MacGuffins - I had never heard this term but this was a great introduction to it and an insightful pose. My meager education in storytelling continues.
  • Another Episode of Simon's Cat - I love these.
  • Some amazing concepts - Check out the work of Harald Siepermann.

Tuesday, July 8, 2008

jbExportQSS

Quick selection sets are something I use a lot. And I got tired of setting the same ones up repeatedly for work and home projects. There's lots of scripts out there to make working with selection sets easier but I couldn't find one that exported them to use in other scenes, so I rolled up my sleeves...




TITLE: jbExportQSS
VERSION: 1.5
AUTHOR:Josh Burton
www.joshburton.com

DESCRIPTION:
Script to aid in the redundancy of setting up quick selection sets all the time
for the same assets but in different files. Exports a mel script that will set up
the identical quick selection set in another scene.

Exporting:
1) Select a quick selection sets in the outliner to be exported
2) Run script - it will export a mel file to recreate the sets

Importing:
1) Run the mel in your new file you want to set up the quick selection sets in
2) It will ask you want to add a prefix. If you're using a referenced asset
put in the prefix. If not, leave it blank:)

Features:
1) Checks for referencing data and removes it in the exported selection set
2) Can do multiple selection sets at once
3) Will account for prefixes on import if desired
4) Reports if set members aren't found in imported sets

Thanks:
To David Bokser for answering my many questions and Scott Englert for my picking apart some of his scripts

History
v1.5 - July 14, 2008 - Added the ability to export multiple sets at once into a single mel file, making importing easier. Also,
little quick selection window doesnt' pop up any more due to a flag on the "sets" command I hadn't known about. Several bug fixes
as well
v1.0 - July 3, 2008 - Initial realease

Thursday, February 7, 2008

Testing a new Autorigging system...

A classical pose...for a troll...?

Note - This'll prolly be the last update on Olaf for a bit. Some major forks in the road are quickly approaching - 1) I'm getting married in a couple of weeks , 2) Moving to Houston, 3) Transitioning to a freelance/contractor from being an employee so it's gonna be a "wee" crazy. Crazy good that is!

I've been playing with John Doublestein's autorigging system the last two nights and I have to say it's pretty awesome. John works with my buddy Dave and we're using his rig for Dave's film. I hadn't realized a bunch of the neat little features workin so far on the film. He's got some great little right click menus that get built when you rig a character that snap between fk and ik.

You can play with the rig on a character by downloading the Andy Rig on that same page. Some neat stuff I noticed on that version that aren't in the autorigger that I'm planning on implementing to Olaf:
  • Squash and stretch through the spine using scale. Prolly will do that in other places too
  • An extra curl on the hand that allows that pinky and ring finger base bones in the hand bend for a proper fist.
Couple of things I noticed with the rig:
  • Some of the systems don't work properly in Maya 2008 - namely the right click menu
    • Speaking of Maya 2008, the new smooth skin weights feature is awesome. I saw it in a Austin 3d user group meeting a couple months back and had been dying to play with it.
  • Joint placement and orientation is critical but this matters regardless of what rig you're using. Having the ability to quickly try out joint placement by quickly adding an arm rig and a default skinning is a great boon to the work flow.
    • That workflow allowed me to identify problem areas - I updated Olaf's tail and made major adjustments to the hands
What's next for Olaf?
  • Facial Rig - This is where I wanna spend some time over the next...well while...got a bunch of things I wanna try. I'm planning on blogging that process pretty well so tune back in if you're interested.
  • Tail Rig - at some point I'll have to rig his tail, but it'll be a bit
  • Animation - That's really the whole point....:)

Also....
Fingers are a pain in the rear to model well so that the proportions work to "roll the finger" on itself. If anyone knows a good tutorial or book on the subject, by all means let me know.


Monday, January 28, 2008

Pivot points...

  • "Locating Your Center" - No this isn't a philosophical rant. Having such a hard time keeping my own in check hardly would afford me a seat of authority on that matter. Pivot points matter in more than life changes; they have a good deal to do with proper rigging. Some examples might be wheels, orbs and the like. If you start spinning one in 3d and it's pivot point isn't dead center you're gonna get wobble. Like a flat tire.....more on that in my next post.

    Today I was rigging a car and for reasons unbenonced to me, the joint for the steering wheel had a pivot that didn't align with the tilt of the wheel. For various reasons I create a separate skeletal hierarchy for the rig and bake the animation down to the skinned hierarchy. Not having the luxury to fix the underlying issue I was looking for a good method to find the exact orientation of a pivot that would allow that wheel to spin properly on the steering column.

    To do so, I wanted a script that would find a center pivot based on a selection of verts and place a locator there so that I might snap things to it. I don't like reinventing the wheel, so my first stop was highend3d where a quick search revealed a handy script that did just what I was looking for.

    With that in hand, it was as easy as finding the center of two edge loops worth of verts snapping a couple of joints and reorienting the joint to the correct orientation.

Quick example with some dummy geometry....

Good edge loops and this little script have aiding the placing of Olaf's finger bones quite nicely.

If you know a faster way of accomplishing the same, by all means let me know.

  • Rig for Olaf - I think I'm gonna give John's tools a try for the body. He works with my buddy Dave (speaking of, looks like he has a new site in progress) and we're using the rig on Dave's film. It's pretty darn good.

Tuesday, January 8, 2008

jbGraphSetDrivenAttribute

Last fall I wrote this script cause I was sick and tired of having to manually filter the graph editor with the curves I wanted to edit when tweaking set driven keys on a facial rig. It was useful for me, maybe it will be for you. Eventually I'll add a section of the site for the few scripts I write. And cause I love icons....




/*
TITLE: jbGraphSetDrivenAttribute
VERSION: 1.0
AUTHOR:Josh Burton
DATE: October 26, 2007

DESCRIPTION:
Script for use with setting up set driven key poses. Sometimes you wanna see all the curves
of one attribute in the graph editor and not manually select them.

HOW TO USE:
1. Select an attribute
2. Run script

LIMITATIONS:
- Select an attribute with set driven keys connected

HISTORY:
10.26.07 - BIRTH!
*/

global proc jbGraphSetDrivenAttribute() {
global string $gChannelBoxName;
string $selected[] = `ls -sl`;
string $selAttr[] = `channelBox -q -sma $gChannelBoxName`;
string $fullAttr = $selected[0] + "." + $selAttr[0];
select `listConnections -p true $fullAttr`;
}
jbGraphSetDrivenAttribute;
GraphEditor;

Wednesday, March 21, 2007

elasti......IK!

My same buddy who pointed me on the script yesterday, dropped another in my lap today. This one looks sweet as well and I shall check it out as soons as I have a few minutes to spare.

ELASTIK is a suite of plug-in IK solvers for Maya. Delivering squash-and-stretch functionality at the touch of a button, ELASTIK makes it simple to create dynamic, versatile, and extensible rigs. elastikSolver
  • Auto-stretch
  • Adjustable smooth stretch
  • Interactive elbow/knee manipulation
  • Hyper extension
elastikSplineSolver
  • Auto-stretch
  • Dependable twist
  • Curve sliding

Tuesday, March 20, 2007

matchBox...

No, not the cars, though they were pretty sweet when I was a kid...:) This is a sweet looking mel scipt. A buddy from work pointed me to it and I'm putting it here so I don't lose the link:) Here's what it says of itself:

MatchBox is the result of an effort to develop a universal character flipper that will work with any rig, every time. While animating a walk cycle, poses will be mirror images for the opposite stride. Even though the thought process has been completed for posing the first step, it’s a time consuming process to match the pose on the opposite stride. Match box allows you to quickly reverse and match the poses for a complete cycle. If the starting or ending pose of a cycle needs to change, the leading or ending foot may change as well, requiring reposing of the entire walk sequence. While some tools exist for flipping animation data across an axis, it becomes very difficult if the character is turning a corner or walking on an arbitrary angle.

Tuesday, February 6, 2007

Icontastic!

A sampling from the year...
So one of my favorite little tasks at work is making icons for the mel scripts we use and create. Scottie is the brains behind our little mel factory here (check his site, he has some goodies up there) and I..well...I make the picturesque little buttons. But I'm learning. I did complete my first major mel script last week that makes captures a thumbnail of a character's face, adds custom text in to label it and render it off to an input location which then became a very small part of Scott's current opus mel project which is gonna be very sweet when finished. One of my goals for the year was learning more mel and I'm slowly chipping away at it. Next on the list is UI Mel creation which my compatriot tells me is "lots of fun." Giddyap.

Saturday, February 25, 2006

Greasy Virtual Pencils...

My buddies told me about this script for Maya a while back and I'd forget. However, I saw a link for a video of the creator (Jason Schleifer) demoing and now I'm sold. Now, why is it called a Grease pencil script you might ask? Well, a lot of animators would draw their arcs and timing data on their crt monitors, then erase it and do it again shot by shot. I'm not sure what folk do with LCD's as I imagine they don't respond so well to heavy rubbing. Either way, Jason has solved that. VERY cool. Here's the vid. Why did I leave my Wacom at work!?

All the stuff on this site is 2000 - by Josh Burton...unless otherwise noted. All rights reserved.