Maya
description
Transcript of Maya
![Page 1: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/1.jpg)
CIS682
Maya
Internal StructureOverview
![Page 2: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/2.jpg)
CIS682
Programming Interfaces
• MEL - Maya Embedded Language– Scripting language– Interpreted– Fast prototyping, slow execuation
• C++– Powerful, fast– Class libraries
![Page 3: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/3.jpg)
CIS682
Maya Architecture
Dependency Graph
MEL Command Engine
Graphical User Interface
![Page 4: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/4.jpg)
CIS682
Dependency Graph (DG)
• Data flow model– Data manipulated by series of operations– Pipeline– Push-pull model
• DG - heart of Maya– Data and operations represented as nodes– Network of nodes to perform task– Add functionality by defining new node
![Page 5: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/5.jpg)
CIS682
DG
• Entire 3D graphics state - the DG– Models– Animations– Textures– Lights– cameras
• Programming interfaces hide much of DG complexity
![Page 6: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/6.jpg)
CIS682
Data Flow
• Nodes• Attributes - properties of a node• Input/output• Compute function
time nurbsSphere1NurbsSphere1_translateX
![Page 7: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/7.jpg)
CIS682
NODE
node
input
output
Compute()
![Page 8: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/8.jpg)
CIS682
Node attributes
node
size(float)
node
pointA (compound)
x (float)
y (float)
z (float)
![Page 9: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/9.jpg)
CIS682
Nodenode
points (array)
[0] point compound
[1] point compound
[…] point compound
x (float)
y (float)
z (float)
x (float)
y (float)
z (float)
![Page 10: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/10.jpg)
CIS682
Node
Custom attributes can be addede.g., mass, velocity
Window->Attribute editorAttributes->Add Attributes
![Page 11: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/11.jpg)
CIS682
Connecting attributes
Window->General Editors->Connection editorORMEL: connectAttr sphere.tx cone.ty
Driven keys as explained by technical group
![Page 12: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/12.jpg)
CIS682
Compute Function
• Output = compute(input0, …, inputN)• Input and output attributes are LOCAL• Black box• Interface: input and output attributes
![Page 13: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/13.jpg)
CIS682
Dependent Attributes
• Volume = compute(sphereSize)• attributeAffects( sphereSize, volume)
sphereVolume
sphereSize (float)
volume (float)
![Page 14: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/14.jpg)
CIS682
Time
• Example of node that only holds data• Current time in time node named time1• Moving frame slider or click on Play sets time
time
outTime (time)
![Page 15: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/15.jpg)
CIS682
Connecting Nodes• Connect nodes by connecting node attributes• Attribute can only connect to attribute of same type• Maya handles flow of data; node not ‘aware’ of
connections• Connections: one-to-many mappings• When connections broken, node retains value
![Page 16: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/16.jpg)
CIS682
DAG nodes
• Directed Acyclic Graph• DAG nodes form Shape-Transform hierarchy• DAG nodes are in DG - they are DG nodes
– Some DAG nodes connect to non-DAG DG nodes– Some DAG nodes may not be connected to any non-
DAG nodes• Maya shows either DAG hierarchy or connected DG
nodes, not both simultaneously
![Page 17: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/17.jpg)
CIS682
DAG and DG nodes
time animCurve
transform
transform
shape
![Page 18: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/18.jpg)
CIS682
Shape Nodes• Meshes• NURBS curves and surfaces• Springs• Camera• Lights• Particles• Etc.
![Page 19: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/19.jpg)
CIS682
Transform Nodes
• Shape node can’t exist without a transform node
• Shape node holds the data• Transform node transforms from objects
space to world space
nurbsSphere2
nurbsSphereShape2
![Page 20: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/20.jpg)
CIS682
Dependent Attributes• attributeAffects( width, areaOfTop)• attributeAffects( depth, areaOfTop)• attributeAffects( areaOfTop, volume)• attributeAffects( height, volume)
boxMetrics
width (float)
depth (float)
height (float)
volume (float)
areaOfTop (float)dependent
![Page 21: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/21.jpg)
CIS682
Transform Hierarchy
right arm right leg left leg left arm
Torso
Head
![Page 22: Maya](https://reader035.fdocuments.us/reader035/viewer/2022070419/56815adc550346895dc8a868/html5/thumbnails/22.jpg)
CIS682
Node Hierarchyhead
torso
leftArm
headShape
torsoShape
leftArmShape
rightArm
rightArmShapeleftArm
leftArmShaperightArm
rightArmShape