Maya
Download
1 / 23

Maya - PowerPoint PPT Presentation


  • 111 Views
  • Uploaded on

Maya. Programming Interface Overview. Programming Interfaces. MEL - Maya Embedded Language Scripting language Interpreted Fast prototyping, slow execuation C++ Powerful, fast Class libraries. Maya Architecture. Dependency Graph (DG). Data flow model

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Maya' - tate


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Maya

Programming Interface

Overview

CIS682


Programming interfaces
Programming Interfaces

  • MEL - Maya Embedded Language

    • Scripting language

    • Interpreted

    • Fast prototyping, slow execuation

  • C++

    • Powerful, fast

    • Class libraries

CIS682



Dependency graph dg
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

CIS682


The scene
The Scene

  • Entire 3D graphics state - the DG

    • Models

    • Animations

    • Textures

    • Lights

    • cameras

  • Programming interfaces hide much of DG complexity

CIS682


Data flow
Data Flow

  • Nodes

  • Attributes - properties of a node

  • Input/output

  • Compute function

time

nurbsSphere1

NurbsSphere1_translateX

CIS682


NODE

node

input

output

Compute()

CIS682


Node attributes
Node attributes

node

pointA (compound)

node

x (float)

size(float)

y (float)

z (float)

CIS682


Node

node

points (array)

[0] point compound

x (float)

y (float)

z (float)

[1] point compound

x (float)

y (float)

z (float)

[…] point compound

CIS682


Node

Custom attributes can be added

e.g., mass, velocity

Window->Attribute editor

Attributes->Add Attributes

CIS682


Connecting attributes
Connecting attributes

Window->General Editors->Connection editor

OR

MEL: connectAttr sphere.tx cone.ty

Driven keys as explained by technical group

CIS682


Compute function
Compute Function

  • Output = compute(input0, …, inputN)

  • Input and output attributes are LOCAL

  • Black box

  • Interface: input and output attributes

CIS682


Dependent attributes
Dependent Attributes

  • Volume = compute(sphereSize)

  • attributeAffects( sphereSize, volume)

sphereVolume

sphereSize (float)

volume (float)

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)

CIS682


Connecting nodes
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

CIS682


Dag nodes
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

CIS682


Dag and dg nodes

transform

time

animCurve

shape

DAG and DG nodes

transform

CIS682


Shape nodes
Shape Nodes

  • Meshes

  • NURBS curves and surfaces

  • Springs

  • Camera

  • Lights

  • Particles

  • Etc.

CIS682


Transform nodes
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

CIS682


Dependent attributes1

boxMetrics

width (float)

height (float)

depth (float)

areaOfTop (float)

volume (float)

Dependent Attributes

  • attributeAffects( width, areaOfTop)

  • attributeAffects( depth, areaOfTop)

  • attributeAffects( areaOfTop, volume)

  • attributeAffects( height, volume)

dependent

CIS682



Node hierarchy

headShape

head

torso

leftArm

rightArm

leftArm

rightArm

rightArmShape

rightArmShape

torsoShape

leftArmShape

leftArmShape

Node Hierarchy

CIS682


Animation
Animation

Expressions – expression editor

Baking simulations

Record out put of expressions

Makes each frame a single frame

Connecting attributes

  • Handling complexity

  • Layers

  • Groups

  • Reference & proxy files

CIS682


ad