For Next time everyone needs to complete the following:
Write a single Maya script which:
-utilizes at least 3 loops
-animates objects over time
From this single script you must generate 4 different animations only by changing the variables.
Everyone should have the 4 animation files (.avi or .mov) and the script on a disk at the begining of class November 3
Wednesday, 29 October 2008
Tuesday, 28 October 2008
Session 3
Hi everyone
here are the files that I worked on during class last time
session2Files
And here is the file we'll be looking at tomorrow
session3Files
Also if any of you are having trouble installing it on your laptop bring them with you tomorrow.
Nick
here are the files that I worked on during class last time
session2Files
And here is the file we'll be looking at tomorrow
session3Files
Also if any of you are having trouble installing it on your laptop bring them with you tomorrow.
Nick
Tuesday, 21 October 2008
Session 2
Hi everyone,
Tomorrow we'll be going through the script file that I gave out for the last session as well as looking at this:
//tower maker
//create and closed curve and select it
//input: height of the tower
// number of floors
// amount of twist
global proc makeTower(float $height, float $floors, float $twist)
{
int $increment = 100/$floors;
int $i;
string $sel[] = `ls -sl`;
string $top[] = `duplicate -rr $sel[0]`;
xform -cp $sel[0] $top[0];
move -r 0 $height 0 $top[0];
rotate -r 0 $twist 0 $top[0];
string $blendName[] = `blendShape -origin world -tc 0 $top[0] $sel[0]`;
setKeyframe -at $top -v 0 -t 0 $blendName[0];
setKeyframe -at $top -v 1 -t 100 $blendName[0];
string $snaps[] = `snapshot -increment $increment -constructionHistory 1 -startTime 1 -endTime 100 -update animCurve $sel[0]`;
setAttr ($snaps[1]+".update") 1;
string $floorCurves[] = `listRelatives $snaps[0]`;
for($curve in $floorCurves)
{
string $floorPlate[] = `planarSrf -ch 1 -d 3 -ko 0 -tol 0.01 -rn 0 -po 1 $curve`;
rename $floorPlate[0] ("floor_"+$i);
parent ("|floor_"+$i) $snaps[0];
$i++;
}
string $roof[] = `planarSrf -ch 1 -d 3 -ko 0 -tol 0.01 -rn 0 -po 1 $top[0]`;
rename $roof[0] "roof";
parent "|roof" $snaps[0];
select $top[0];
}
Tomorrow we'll be going through the script file that I gave out for the last session as well as looking at this:
//tower maker
//create and closed curve and select it
//input: height of the tower
// number of floors
// amount of twist
global proc makeTower(float $height, float $floors, float $twist)
{
int $increment = 100/$floors;
int $i;
string $sel[] = `ls -sl`;
string $top[] = `duplicate -rr $sel[0]`;
xform -cp $sel[0] $top[0];
move -r 0 $height 0 $top[0];
rotate -r 0 $twist 0 $top[0];
string $blendName[] = `blendShape -origin world -tc 0 $top[0] $sel[0]`;
setKeyframe -at $top -v 0 -t 0 $blendName[0];
setKeyframe -at $top -v 1 -t 100 $blendName[0];
string $snaps[] = `snapshot -increment $increment -constructionHistory 1 -startTime 1 -endTime 100 -update animCurve $sel[0]`;
setAttr ($snaps[1]+".update") 1;
string $floorCurves[] = `listRelatives $snaps[0]`;
for($curve in $floorCurves)
{
string $floorPlate[] = `planarSrf -ch 1 -d 3 -ko 0 -tol 0.01 -rn 0 -po 1 $curve`;
rename $floorPlate[0] ("floor_"+$i);
parent ("|floor_"+$i) $snaps[0];
$i++;
}
string $roof[] = `planarSrf -ch 1 -d 3 -ko 0 -tol 0.01 -rn 0 -po 1 $top[0]`;
rename $roof[0] "roof";
parent "|roof" $snaps[0];
select $top[0];
}
Tuesday, 14 October 2008
Session 1
Below are links to the example files we will be using in session 1 as well as a general reference and several useful links:
Session 1: Example Files + general reference
Books:
General Introduction to Maya
Another good overview book
MEL Scripting:
in order of usefulness:
Best for Starting out learning MEL
Also good for beginners
More Advanced, But a good reference
The second volume
Websites
This site is a wiki I began building last year that has several links / scripts
MEL wiki Innsbruck
Session 1: Example Files + general reference
Books:
General Introduction to Maya
Another good overview book
MEL Scripting:
in order of usefulness:
Best for Starting out learning MEL
Also good for beginners
More Advanced, But a good reference
The second volume
Websites
This site is a wiki I began building last year that has several links / scripts
MEL wiki Innsbruck
Subscribe to:
Posts (Atom)