Monday, November 12, 2012

11/12/2012


Turn in your movie!


=========================
Instructor Share coding experience:

Python:
mkmovie
remote animators in production tool
submission plugins tool (AE to RR)

Mel:
select and render specific geo with the rest a hold out (background shader)
fairy dust


What is MEL?

Maya Embedded Language = MEL

Now most scripting is done in pyMel


MEL is what is written to a .ma file.

Solve a simple problem:
We want a light to flicker

How do we do that?

light1.intensity = noise(time)*0.1+1.6;

How do we make a 1x1 box?  sphere? with MEL?

Syntax, ':' <object>.<attribute>

What does the mod operator do?


MEL:
What is a variable? why do we need them?

strings
int
float

Declare Var:
string $myName = "<myName>";
int $myAge = <age>
float $myHeight = <hight in inches>

Declare Array:
string $drawer[];
$drawer[0] = ?
$drawer[1] = ?
print $drawer;

string $allInScene[] = `ls`;

string $onlySelected[] = `ls -sl`;


Rand:
rand(-300,500);

Key all your cubes

For Loop:

string $objects[] = `ls -sl`;
print $objects;

for ($singleObj in $objects)
{
    float $rx = rand(-30-30);
    float $ry = rand(-30-30);
    float $rz = rand(-30-30);

    move -a $rx $ry $rz $singleObj;
}


move forward in time: key all your cubes

Flags:

polyCube -w 5 -h 2 -d 1 -sx 1 -sy 1 -sz 1 -ax 010 -ch 1;


Show:
  • Create a shelf button from the Script Editor

Class: Model a stone

How to Execute others MEL scripts

Download rockGen.mel

source rockGen File, launch rockGen

No comments:

Post a Comment