🗊Презентация Introduction to Maya

Нажмите для полного просмотра!
Introduction to Maya, слайд №1Introduction to Maya, слайд №2Introduction to Maya, слайд №3Introduction to Maya, слайд №4Introduction to Maya, слайд №5Introduction to Maya, слайд №6Introduction to Maya, слайд №7Introduction to Maya, слайд №8Introduction to Maya, слайд №9Introduction to Maya, слайд №10Introduction to Maya, слайд №11Introduction to Maya, слайд №12Introduction to Maya, слайд №13Introduction to Maya, слайд №14Introduction to Maya, слайд №15Introduction to Maya, слайд №16Introduction to Maya, слайд №17Introduction to Maya, слайд №18Introduction to Maya, слайд №19Introduction to Maya, слайд №20Introduction to Maya, слайд №21Introduction to Maya, слайд №22Introduction to Maya, слайд №23Introduction to Maya, слайд №24Introduction to Maya, слайд №25Introduction to Maya, слайд №26Introduction to Maya, слайд №27Introduction to Maya, слайд №28Introduction to Maya, слайд №29Introduction to Maya, слайд №30Introduction to Maya, слайд №31Introduction to Maya, слайд №32Introduction to Maya, слайд №33Introduction to Maya, слайд №34Introduction to Maya, слайд №35Introduction to Maya, слайд №36Introduction to Maya, слайд №37Introduction to Maya, слайд №38Introduction to Maya, слайд №39Introduction to Maya, слайд №40Introduction to Maya, слайд №41Introduction to Maya, слайд №42Introduction to Maya, слайд №43Introduction to Maya, слайд №44Introduction to Maya, слайд №45Introduction to Maya, слайд №46Introduction to Maya, слайд №47Introduction to Maya, слайд №48Introduction to Maya, слайд №49Introduction to Maya, слайд №50Introduction to Maya, слайд №51Introduction to Maya, слайд №52Introduction to Maya, слайд №53Introduction to Maya, слайд №54Introduction to Maya, слайд №55Introduction to Maya, слайд №56Introduction to Maya, слайд №57Introduction to Maya, слайд №58Introduction to Maya, слайд №59Introduction to Maya, слайд №60Introduction to Maya, слайд №61Introduction to Maya, слайд №62

Содержание

Вы можете ознакомиться и скачать презентацию на тему Introduction to Maya. Доклад-сообщение содержит 62 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1


Introduction to Maya, слайд №1
Описание слайда:

Слайд 2





Biography                           
Naiqi Weng -- Autodesk Developer Network
Education
Bachelor of Computer Science 
Master of Computer Science  
Working experience 
Supporting software: Maya API, MotionBuilder SDK and 3dsMax SDK
Описание слайда:
Biography Naiqi Weng -- Autodesk Developer Network Education Bachelor of Computer Science Master of Computer Science Working experience Supporting software: Maya API, MotionBuilder SDK and 3dsMax SDK

Слайд 3





Dependency  Graph
Описание слайда:
Dependency Graph

Слайд 4





Agenda
What is Dependency Graph (DG)? 
Concepts/Elements of DG Nodes
Custom plug-in DG node with Maya API 
DG’s push-pull mechanism
Correct coding with DG
Описание слайда:
Agenda What is Dependency Graph (DG)? Concepts/Elements of DG Nodes Custom plug-in DG node with Maya API DG’s push-pull mechanism Correct coding with DG

Слайд 5





Maya Hypergraph
Menu: “Window”– “Hypergraph:Connections”
Описание слайда:
Maya Hypergraph Menu: “Window”– “Hypergraph:Connections”

Слайд 6





What is the Dependency Graph?
Control system of Maya
Patented technology: 
	US Patent #5,808,625
	US Patent #5,929,864
A collection of nodes that transmit data through connected attributes
Описание слайда:
What is the Dependency Graph? Control system of Maya Patented technology: US Patent #5,808,625 US Patent #5,929,864 A collection of nodes that transmit data through connected attributes

Слайд 7





Dependency Graph
Everything in Maya 3D space maps to DG Nodes
Anything you do in the UI will affect DG
Описание слайда:
Dependency Graph Everything in Maya 3D space maps to DG Nodes Anything you do in the UI will affect DG

Слайд 8





Dependency  Graph
Описание слайда:
Dependency Graph

Слайд 9


Introduction to Maya, слайд №9
Описание слайда:

Слайд 10





What does a node do?
Know its own attributes
Store data efficiently in “datablocks”
Accept input data, compute, generate output data
Connect with other nodes through connections
Описание слайда:
What does a node do? Know its own attributes Store data efficiently in “datablocks” Accept input data, compute, generate output data Connect with other nodes through connections

Слайд 11





Different elements of a Node
Описание слайда:
Different elements of a Node

Слайд 12





Attributes
Describe data that belongs to nodes of a given type
Attributes are shared among nodes of the same type and all derived node types
Описание слайда:
Attributes Describe data that belongs to nodes of a given type Attributes are shared among nodes of the same type and all derived node types

Слайд 13





Attributes
Define the interface of the node type including
Names
Data Type
Basic:  numeric (float, int32 etc…), string, matrix, etc..
Complex: mesh, nurbsSurface, generic, etc…
Custom data
Structure
 
Properties 
readable, writable, storable, keyable, etc…
Описание слайда:
Attributes Define the interface of the node type including Names Data Type Basic: numeric (float, int32 etc…), string, matrix, etc.. Complex: mesh, nurbsSurface, generic, etc… Custom data Structure Properties readable, writable, storable, keyable, etc…

Слайд 14





API Classes for Attributes
Base Class: MFnAttribute 
Takes care of all the common aspect of an attribute on node 
readable/writable, connectable, storable, keyable	
Most Common Used Classes
MFnNumericAttribute
MFnCompoundAttribute
MFnTypedAttribute
MFnMatrixAttribute
MFnGenericAttribute
Описание слайда:
API Classes for Attributes Base Class: MFnAttribute Takes care of all the common aspect of an attribute on node readable/writable, connectable, storable, keyable Most Common Used Classes MFnNumericAttribute MFnCompoundAttribute MFnTypedAttribute MFnMatrixAttribute MFnGenericAttribute

Слайд 15





Different elements of a Node
Описание слайда:
Different elements of a Node

Слайд 16





Plugs
Pointer to an attribute on a specific node (ie. a specific instance of an attribute)
Описание слайда:
Plugs Pointer to an attribute on a specific node (ie. a specific instance of an attribute)

Слайд 17





Plugs
Plugs can be used to:
query / set a value
create / remove /query a connection
Does not store attribute data
API class: MPlug
MPlug::MPlug (const MObject &node, const MObject &attribute)
MObject MPlug::attribute ( MStatus *  ReturnStatus)  
MObject MPlug::node ( MStatus *  ReturnStatus) 
MStatus MPlug::getValue ( double &  val, MDGContext &  ctx )
MStatus MPlug::setValue ( double  val  ) 
Описание слайда:
Plugs Plugs can be used to: query / set a value create / remove /query a connection Does not store attribute data API class: MPlug MPlug::MPlug (const MObject &node, const MObject &attribute) MObject MPlug::attribute ( MStatus *  ReturnStatus)  MObject MPlug::node ( MStatus *  ReturnStatus)  MStatus MPlug::getValue ( double &  val, MDGContext &  ctx ) MStatus MPlug::setValue ( double  val  ) 

Слайд 18





Different elements of a Node
Описание слайда:
Different elements of a Node

Слайд 19





Datablock 
Node stores data for every attribute
Описание слайда:
Datablock Node stores data for every attribute

Слайд 20





Datablocks
Datablock is the actual storage for the input and output data of a node
For every non-array attribute, datablock stores:
Data
Dirty/clean status
Data handles are lightweight pointers into the data in the datablock
Описание слайда:
Datablocks Datablock is the actual storage for the input and output data of a node For every non-array attribute, datablock stores: Data Dirty/clean status Data handles are lightweight pointers into the data in the datablock

Слайд 21





API Classes for datablock
MDatablock
Only valid during compute()
Pointers to data block should not be retained after compute()
	MStatus MPxNode::compute(const MPlug& plug, MDataBlock& dataBlock)
	MDataHandle MDataBlock::inputValue(const MObject& attribute, MStatus *  ReturnStatus)
	MDataHandle MDataBlock::outputValue ( const MObject & attribute, MStatus *  ReturnStatus)
MDataHandle
a smart pointer for information contained in data block
	double & MDataHandle::asDouble (  ) 
	void  MDataHandle::set( double  val  ) 
Описание слайда:
API Classes for datablock MDatablock Only valid during compute() Pointers to data block should not be retained after compute() MStatus MPxNode::compute(const MPlug& plug, MDataBlock& dataBlock) MDataHandle MDataBlock::inputValue(const MObject& attribute, MStatus *  ReturnStatus) MDataHandle MDataBlock::outputValue ( const MObject & attribute, MStatus *  ReturnStatus) MDataHandle a smart pointer for information contained in data block double & MDataHandle::asDouble (  )  void MDataHandle::set( double  val  ) 

Слайд 22


Introduction to Maya, слайд №22
Описание слайда:

Слайд 23





Custom Node Plug-in Implementation
Описание слайда:
Custom Node Plug-in Implementation

Слайд 24





Custom DG Node in Maya
Entirely new operations
MPxNode: base class for custom node implementation
Extend existing Maya nodes
MPxDeformerNode
MPxFieldNode
MPxEmitterNode
MPxSpringNode
MPxIkSolverNode
MPxHwShaderNode
Описание слайда:
Custom DG Node in Maya Entirely new operations MPxNode: base class for custom node implementation Extend existing Maya nodes MPxDeformerNode MPxFieldNode MPxEmitterNode MPxSpringNode MPxIkSolverNode MPxHwShaderNode

Слайд 25





Custom Node Code Skeleton
class myNode : public MPxNode
{
   public:
          myNode();
          virtual ~myNode();
          static void* creator();
          static MStatus initialize();
          virtual MStatus compute( const MPlug& plug, MDataBlock& data );

   private:
         static MTypeId id;
         static MObject myInputAttr;                 //input attribute
         static MObject myOutputAttr;             //output attribute
         static MObject myOutputAttrTwo;     //second output attribute
};
Описание слайда:
Custom Node Code Skeleton class myNode : public MPxNode { public: myNode(); virtual ~myNode(); static void* creator(); static MStatus initialize(); virtual MStatus compute( const MPlug& plug, MDataBlock& data ); private: static MTypeId id; static MObject myInputAttr; //input attribute static MObject myOutputAttr; //output attribute static MObject myOutputAttrTwo; //second output attribute };

Слайд 26





Custom Node Registration
 Every node type requires a unique identifier
	  MTypeId myNode::id( 0x80000 );
For plug-ins that you intend to share between sites
Will require a globally unique ID issued to you by Autodesk.
IDs are allocated in blocks of 64/128/256/512.
Contact ADN M&E for unique global IDs.
Описание слайда:
Custom Node Registration Every node type requires a unique identifier MTypeId myNode::id( 0x80000 ); For plug-ins that you intend to share between sites Will require a globally unique ID issued to you by Autodesk. IDs are allocated in blocks of 64/128/256/512. Contact ADN M&E for unique global IDs.

Слайд 27





Custom Node Registration
initializePlugin() and uninitializePlugin() are entry point and exit point of custom plug-in node
Описание слайда:
Custom Node Registration initializePlugin() and uninitializePlugin() are entry point and exit point of custom plug-in node

Слайд 28





Custom Node Registration
To register your node with Maya:
To deregister your node
Описание слайда:
Custom Node Registration To register your node with Maya: To deregister your node

Слайд 29





Custom Node Code Skeleton
MPxNode::creator()
The creator method is called to return a new instance of the node
In the Maya UI 
MEL: createNode myNode;
Описание слайда:
Custom Node Code Skeleton MPxNode::creator() The creator method is called to return a new instance of the node In the Maya UI MEL: createNode myNode;

Слайд 30





Custom Node Code Skeleton
MPxNode::initialize()
Override this method to define the attribute interface for your node.
create attributes
set the attribute’s properties
add the attribute to the node
Inherit attributes if necessary
define attribute relationships
Описание слайда:
Custom Node Code Skeleton MPxNode::initialize() Override this method to define the attribute interface for your node. create attributes set the attribute’s properties add the attribute to the node Inherit attributes if necessary define attribute relationships

Слайд 31





Attribute Dependency
Attributes can affect other attributes
MEL command: affects
	sphere -n sphere; 
	affects tx sphere; 
MPxNode::attributeAffects()
Once created on a node, an “attributeAffects” relationship can be setup to denote a dependency
Описание слайда:
Attribute Dependency Attributes can affect other attributes MEL command: affects sphere -n sphere; affects tx sphere; MPxNode::attributeAffects() Once created on a node, an “attributeAffects” relationship can be setup to denote a dependency

Слайд 32





Custom Node Code Skeleton
Описание слайда:
Custom Node Code Skeleton

Слайд 33





Custom Node Code Skeleton
MPxNode::compute()
called when the node is asked to evaluate an output
Описание слайда:
Custom Node Code Skeleton MPxNode::compute() called when the node is asked to evaluate an output

Слайд 34





Examples
Devkit Plug-in Examples:
C:\Program Files\Autodesk\Maya2011\devkit\plug-ins
The Maya API Documentation contains a wealth of information on all aspects of the API.
Описание слайда:
Examples Devkit Plug-in Examples: C:\Program Files\Autodesk\Maya2011\devkit\plug-ins The Maya API Documentation contains a wealth of information on all aspects of the API.

Слайд 35





How does Dependency Graph work?
Control system for Maya
Glue that holds together disparate operations and lets them work together seamlessly
DG is not a usual dataflow system….
Описание слайда:
How does Dependency Graph work? Control system for Maya Glue that holds together disparate operations and lets them work together seamlessly DG is not a usual dataflow system….

Слайд 36





How does Dependency Graph Work?
Two step Push-Pull mechanism:
Dirty Propagation
Evaluation
Описание слайда:
How does Dependency Graph Work? Two step Push-Pull mechanism: Dirty Propagation Evaluation

Слайд 37





Dirty Propagation
Maya DG caches values
Uses dirty system to denote elements that require updating:
Attributes
Connections
MEL Commands:
dgdirty
isDirty
Описание слайда:
Dirty Propagation Maya DG caches values Uses dirty system to denote elements that require updating: Attributes Connections MEL Commands: dgdirty isDirty

Слайд 38





Data Flow Example
Key
Описание слайда:
Data Flow Example Key

Слайд 39





The Dirty Process
Initiated by value changes
Описание слайда:
The Dirty Process Initiated by value changes

Слайд 40





The Dirty Process
Dirty message propagates forward
Описание слайда:
The Dirty Process Dirty message propagates forward

Слайд 41





The Dirty Process
No evaluation has been requested. Data remains dirty.
Описание слайда:
The Dirty Process No evaluation has been requested. Data remains dirty.

Слайд 42





The Dirty Process
Now an input on A changes
Описание слайда:
The Dirty Process Now an input on A changes

Слайд 43





The Dirty Process
Dirty propagates out all outgoing connections
Описание слайда:
The Dirty Process Dirty propagates out all outgoing connections

Слайд 44





The Dirty Process
B and D propagate dirty to affected attributes
C will not receive dirty message
Connection to C is already dirty
Helps performance
Описание слайда:
The Dirty Process B and D propagate dirty to affected attributes C will not receive dirty message Connection to C is already dirty Helps performance

Слайд 45





The Evaluation Process
Lazy Evaluation: On demand
Evaluation is trigged when values are requested:
Viewport refresh
Attribute editor
Channel box
Rendering
getAttr command
Etc…
Evaluation is minimal
Only requested values are computed
Non-requested values are left dirty
Описание слайда:
The Evaluation Process Lazy Evaluation: On demand Evaluation is trigged when values are requested: Viewport refresh Attribute editor Channel box Rendering getAttr command Etc… Evaluation is minimal Only requested values are computed Non-requested values are left dirty

Слайд 46





The Evaluation Process
Example: getAttr C.output
Описание слайда:
The Evaluation Process Example: getAttr C.output

Слайд 47





The Evaluation Process
C computes: requests input value from connection
Описание слайда:
The Evaluation Process C computes: requests input value from connection

Слайд 48





The Evaluation Process
D computes.
D requests input value from connection
Описание слайда:
The Evaluation Process D computes. D requests input value from connection

Слайд 49





The Evaluation Process
A computes requested output
Описание слайда:
The Evaluation Process A computes requested output

Слайд 50





The Evaluation Process
Value copied forward to D’s input
Описание слайда:
The Evaluation Process Value copied forward to D’s input

Слайд 51





The Evaluation Process
D computes requested result.
D sets value in output.
Описание слайда:
The Evaluation Process D computes requested result. D sets value in output.

Слайд 52





The Evaluation Process
Value is copied forward to C
Описание слайда:
The Evaluation Process Value is copied forward to C

Слайд 53





The Evaluation Process
C computes requested output.
B remains dirty.
Описание слайда:
The Evaluation Process C computes requested output. B remains dirty.

Слайд 54





The Evaluation Process
Only requested outputs are computed, unless node’s compute method does more than requested
Описание слайда:
The Evaluation Process Only requested outputs are computed, unless node’s compute method does more than requested

Слайд 55





Correct Coding with DG
Описание слайда:
Correct Coding with DG

Слайд 56





Correct Coding with DG 
Common misuse:
put command-type tasks into a custom node implementation
execute commands to change the status of current DG
get or set values on other nodes
Black Box Rule
Описание слайда:
Correct Coding with DG Common misuse: put command-type tasks into a custom node implementation execute commands to change the status of current DG get or set values on other nodes Black Box Rule

Слайд 57





Black Box Rule
Black-box operation of node is what makes it all work.
Описание слайда:
Black Box Rule Black-box operation of node is what makes it all work.

Слайд 58





A Closer Look at MPxNode::compute()
You can not control when compute() is getting called, Maya control when it gets called
Compute() is called in Evaluation phase
Inside compute(): avoid sending dirty messages
Don’t execute commands
Don’t get or set values on other nodes
Описание слайда:
A Closer Look at MPxNode::compute() You can not control when compute() is getting called, Maya control when it gets called Compute() is called in Evaluation phase Inside compute(): avoid sending dirty messages Don’t execute commands Don’t get or set values on other nodes

Слайд 59





A Closer Look at MPxNode::compute()
Inside compute(): avoid sending dirty messages
Get/set data only through datablock using data handles, don’t set data via plugs (i.e. MPlug::setValue)
setting data via plug propagates dirty, datahandle does not
datahandle set/get methods are more efficient
Описание слайда:
A Closer Look at MPxNode::compute() Inside compute(): avoid sending dirty messages Get/set data only through datablock using data handles, don’t set data via plugs (i.e. MPlug::setValue) setting data via plug propagates dirty, datahandle does not datahandle set/get methods are more efficient

Слайд 60





Learning Resources
Maya Developer Center:
		http://www.autodesk.com/developmaya
Questions and Problems: ADN
		http://www.autodesk.com/adn
    Maya API White Paper, DevTV, Webcast training
Discussion Forum: The AREA
		http://area.autodesk.com/forum/autodesk-maya/sdk/
Описание слайда:
Learning Resources Maya Developer Center: http://www.autodesk.com/developmaya Questions and Problems: ADN http://www.autodesk.com/adn Maya API White Paper, DevTV, Webcast training Discussion Forum: The AREA http://area.autodesk.com/forum/autodesk-maya/sdk/

Слайд 61





Q & A
Описание слайда:
Q & A

Слайд 62





Thank you!
Описание слайда:
Thank you!



Теги Introduction to Maya
Похожие презентации
Mypresentation.ru
Загрузить презентацию