Access Training

August 30th, 2011

Please register to access the training videos in Maya and Softimage. Also, please register with your actual name. If you are already registered, then all you need to do is login.

It’s a very good idea to register if you’re enrolled in one of my courses at American River College. The videos will accelerate you’re learning.

Thank you.

Maya: Simple 3D Array

April 26th, 2012

For those of you starting out, here’s a simple array script to create instances of a primitive. You should be able to build onto this script very easily. Play with the numbers, and see how far you can push it. Soon, I’ll modify it so it arrays your selection. I’m working on a ring mail script, and this is a fundamental part of making ring mail.


//simple 3d array

polyCube;

//How many?
int $oCount = 3;

//How far apart are they?
float $oSpacing = 1.0;

f3DArray($oCount, $oSpacing);

proc f3DArray (int $objCount, float $oSp){

int $n = 0;

//1D, X
for($i = 0; $i < $objCount; $i++){

//2D, Y
for($j = 0; $j < $objCount; $j++){

//3D, Z
for($k = 0; $k < $objCount; $k++){

instance;

vector $v = << ($oSp * $i), ($oSp * $j), ($oSp * $k) >>;

xform -ws -t ($v.x) ($v.y) ($v.z);

$n++;

}
}
}
}

Maya: Neutral Pose

April 25th, 2012

Use this script to create a neutral pose, sort of. For example, say you had a model robot, and you have already set the pivot point for each part. This will take the pivot, and create a group at the pivot location. The group is translation 0,0,0 rotation 0,0,0 and scale 1,1,1. Effectively, a neutral pose.


string $oSelection[] = `ls -sl`;
int $oCount = size($oSelection);

for ($i = 0; $i < $oCount; $i++){
select -r $oSelection[$i];

//get the pivot location of the selection
vector $v1 = `xform -q -t`;
vector $v2 = `xform -q -sp`;
vector $v3 = $v1 + $v2;

print ($v3);
//make a group and move it to the pivot location
group; xform -os -piv ($v3.x) ($v3.y) ($v3.z);
}

Maya: Path Constraint v0.2

April 19th, 2012

This script is developed from my former multi-motion path script. It’s more developed, and is simpler for the user. To use it, select all the objects you’d like to path constrain, and then select the curve last. Run the tool. The order of your selection is the order along the path. Each object will be grouped, and the group will be path constrained using a standard motion path. The user’s objects can be transformed, while maintaining it’s connection to the path via the parent group. It’s simple rigging principles. :-) You can then edit the curve, and each object will maintain their percentage along the path.

Like most of my Maya tools, this tool is inspired by my usage of Softimage, and my desire to solve problems in a similar manner in both programs. For now, this tool is free to the public, so grab it while you can. When I’ve developed it far enough, I’ll sell it for a very nominal fee.

/*---------------------
Path Constraint
version 0.2
Matthew L. Stoehr
formandspace.com

Objective:
This script will attach objects to a curve.

Instructions:
Simply select the objects, then select the curve last.

Notes:
Selection order is the order of objects on the path, from 0 to 1 of the path U value.
Works best if the curve is drawn from the top view, but it's not required.

--------------------*/

string $mySelection[] = `ls -selection`;
int $size = size($mySelection);
int $objCount = $size - 1;

/*----------------- Find the curve ---------------------*/
//if the node is a curve, don't group it, and use it for the namespace
//last in selection
string $path = $mySelection[$objCount];
//make the offset controller
spaceLocator -absolute -position 0 0 0 -name ($path + "_offset_00");
//collect all offset controllers, locator transforms, and find the most recently created locator
string $myOffsets[] = `ls -tr ($path + "_offset_*")`;
int $offsetsCount = size($myOffsets);
string $recentOffset = $myOffsets[$offsetsCount-1];

/*---------------------- Make a group per object -----------------------*/
//psuedo: make a group for each selection, so it has the motion path, not the artist's objects.
for ($i = 0; $i < $objCount; $i++){
select -r ($mySelection[$i]);

//finds the pivot point of the selection, via query (-q)
vector $v1 = `xform -q -t`;
vector $v2 = `xform -q -sp`;
vector $v3 = $v1 + $v2;

group -n ($path + "_motion_grp");

//set the group's pivot to the object's pivot location
xform -os -piv ($v3.x) ($v3.y) ($v3.z);
//use the curve name for the namespace

}
//collect the new groups
string $myMotionGroups[] = `ls ($path + "_motion_grp*")`;

/*---------------------- Path Constraint -----------------------*/
float $offset = 0.0;
float $spacing = 1.0;
//objCount - 1 so the objects distribute along the entire curve.
float $divisions = $spacing/($objCount-1);

for($i=0; $i < $objCount; $i++){

float $uLinearDistribution = $divisions * ($i+$offset);
string $motion = `pathAnimation -f 1 -fm 1 -etu 0 -c $path $myMotionGroups[$i]`;

string $source = $motion + "_uValue.output";
string $destination = $motion + ".uValue";
disconnectAttr $source $destination;

setAttr ($motion + ".uValue") $uLinearDistribution;

expression -s ($motion + ".uValue = "+ $uLinearDistribution +" + "+ $recentOffset +".translateX * 0.1") -o $motion;
//expression -s ($motion + ".uValue = "+ $spacing +"/(" + $objCount + "*("+ ($i+1) +" + "+ $path + ".offset));") -o $motion;

}

/*----------------------- Group All to Organize the Outliner----------------*/
for ($i = 0; $i < $objCount; $i++){
select -add ($myMotionGroups[$i]);
//rename the motion groups to allow more objects to attach to the same path
rename $myMotionGroups[$i] "_motion_grp_";
}
group -n ($path + "_grp_00");

select -r $path;

ARC 3D Animation Show Reel 2012

April 9th, 2012

Please welcome the all new American River College, Art New Media, 3D Animation show reel of 2012.  In here you’ll find some of the best student work in Art New Media.

A very special THANK YOU to all the students who have stepped up their production and commitment to their work.   I’m very proud of your efforts.

http://vimeo.com/40000252

Rigging Fundamentals

March 2nd, 2012

A student of mine, making a light saber animation, asks how can he gain more control over an object that is constrained to a parent, is keyframed, and would like to edit it further, but cannot figure out how to override the constraint. I didn’t want to talk about constraint blending, as there are complications with that and are difficult to explain. Instead, I wrote a diagram on the white board describing what all rigs should be, at a fundamental level. The theory is simple, all manual animation, meaning the transforms are keyable by the animator, are the last child in a hierarchy of automated tasks, such as constraints. It looks like this:

Parent, or root of the rig
1st Child – Automated task (ie., constraint to…, exposed as a slider)
2nd Child – Automated task (ie., sine wave script…, exposed as a slider)
Nth Child – Automated task (N…, exposed as a slider)
Last Child – Manual override (exposed to animator as a slider and/or view port control)

The last child will be exposed and animatable within parent space or local space.  All the automated tasks will move the visible child, and the animator will have the freedom to move it where ever it needs to be.  This can get very complex very quickly, and requires a fair amount of scripting/programming to automate the creation of the objects, the constraints, sliders, etc., and any interfacing related. You can see further examples of this in my article on Adaptive Rigging or in my demo reel archive. Also, see the great work of Bernard Haux or Eric Thivierge.