Professional Documents
Culture Documents
A
((in Maya
y 2008))
but first, understand
Maya internals
Types of nodes
shape
transform
group
expression
shading
etc.
t
WIndows->Hypergraph:Connections
Attrib
butes types
integers
floating point
enumerated
vectors
connections: links between atttributes matrices
arrays
Attribute Editor
Windows->General
Windows >General Edito
Editors
rs ->Attribute
>Attribute Editor
Connections
upstream v. downstrearm
Scene hierarchy directed acyclic
y g
graph
p
DAG
subset of DG transform hierarchy
WIndows >Hypergrap
WIndows->Hypergrap
ph:Hierarchy
Outliner
Windows >Outliner
Windows->Outliner
Animating Attributes
Driven Keys
y
Expression Nodes
Direct Connections betwee
en attributes
Create
C t expressions
i tto sett attribute
tt ib t values
l from
f
other attributes
1. define variables
2. compute
p value
3. assign value to attribu
ute
Expression
p Editor
Window->Animation Edito
ors->Expression Editors
Make a sphere
hypergraph
in Dynamics menu set, Particles->
>Particle Set attribute box
creation expression
per Object expressionn
per Particle expressio
on
MEL/Python
y
similar
i il syntax
t tto Expressio
E ions, but
b t nott same
MEL: setAttr(pSphere.transslateX) = 10;
Expr: pSphere
pSphere.translateX
translateX = 10;
currentTime 1;
ate");
setKeyframe ($sph[0] + ".transla
currentTime
Ti 30
30;
move -r -moveY 2;
setKeyframe ($sph[0] + ".transla
ate");
script editor
create a sphere, naame it b1
add attributes of velocity in x & y
expression editor
if first frame
b1.velocityY = iniitVelocity
b1 position = (0
b1.position (0,0
0
0)
else
add velocity to poosition
add acceleration (gravity)
(gra it ) to velocity
elocit
if (positionY <= 0)
0
K = 0.9*K
b1.velocityY = initVelocity*K
Springy ball f 1= (Ks*|p1-p2| - Kd*(v1-v2).(p2-p1)/|p2-p1|) (p2-p1)/|p2-
p1|
script
p editor
create two spheres, named b1 & b2
nd acceleration in x & y
add attributes of velocity an
expression
p editor
for b1: if first frame, reinitia
alize position & velocity
else
compute f1, f2
compute a1 = f1//m1; a2 = f2/m2
update
d t velocity
l it += + acceleration
l ti
[scale velocity do own]
update position + += velocity