Process 3d - Max
This process is use to render 3d scenes. The calculations are delegated to Maya.
Attribute id
|
String
|
mandatory
Attribute delegate
= "maya" |
String
|
optional
Attribute creationGroup
|
creationGroupId
|
optional
Param reset
|
Boolean
|
optional
This param is used to reset the 3d scene.
Attribute creationId
|
creationId
|
mandatory
Attribute creationId
|
creationId
|
mandatory
Attribute name
|
String
|
mandatory
Attribute copy
|
String
|
optional
Attribute create
|
String
|
optional
Param prefix
|
String
|
optional
Name used to prefix all objects merged.
Param creationId
|
creationId
|
mandatory
This param is used to set the rendering output creation. The creation must be an image, a video or a frameset.
Param camera
|
String
|
mandatory
The camera name
Param resolution
|
Point
|
optional
Output resolution: width;height. By default, the output resolution will be the project's resolution. See details Configuration
Param frames
|
Render Frames
|
optional
Begin and end frames for a sequence rendering. Optionnaly, a frame count can be set.
Attribute creationId
|
creationId
|
mandatory
Param frames
|
Frames
|
optional
Begin and end frames export. Optionnaly, a frame count can be set.
Features
The features are:
- Create Objects: sphere, cone, plane, etc. See Maya Object Use Case Maya Reserved Object Use Case
- Set Object Attributs: geometry, light, shader, etc.
- Get Object Attributs: update the process param values from Maya scene
- Transform Object: position, roation, scale, etc. See Maya Transform Use Case
- Deform Object: bend, twist, etc. See Maya Object Deformer Use Case
- Shader: assign to an object, change shader, etc. See $link(basical_3d_shader_maya)
- Merge Scene: merge a secondary scene into a main scene. See Maya Merge Use Case
- Rendering: render a scene, change rendering paramters, etc. See Maya Render Use Case
- Animation: animate object position, object properties, etc. See Maya Animation Use Case
- Motion Object: simple to complex motion. See Maya Motion Use Case
- Template: apply data template on an Object. See $link(basical_3d_template)
- Export animated Object Attributs
- Execute Maya scripts
Maya Definitions
Node
Maya is built around nodes. A node is defined by its attributs. Nodes are used to build scene objects, shader, deformer, light, renderer, etc.
See more details Maya Sepcifications - Nodes and Attributes
In Maya, Object term only concerns the scene objects. In these specfications, Object and Node are the same terms to define Maya nodes.
Nodes Link
Nodes can be linked together. The process uses three kind of link:
- History list: Each node has an history list, containing the dependant nodes (ex: a sphere object has a bend deformer included in it's history list)
- Attribute connection: a node A attribute is binded with a node B attribute (ex: a blinn material color connected with a file outColor)
- Shader assignation: a shading node is assigned to a scene object (ex: blinn material assigned to a sphere)
Mel
Maya Embeded Language is the interpeted programming language used in Maya.
How the process works
The process consists essentially on creating node, linking node and setting node attribute. To do that, Assembler converts the process XML definition into MEL commands.
Mel command examples:
- Create a sphere: sphere -radius 2 -name sphere
- Set the sphere radius: setAttr "sphere.translateZ" 6
- Create a blinn material: shadingNode -asShader blinn -name blinn1
- Assign the blinn material to the sphere: hyperShade -assign blinn1
Examples
Render a sphere with a spot light
<Process id="mayaRender1" type="3d" delegate="maya">
<Param name="reset">1</Param>
<Object create="object" name="sphere">
<Param name="class">sphere</Param>
<Param name="radius">2</Param>
<Param name="material">blinn</Param>
<Param name="material.class">blinn</Param>
<Param name="material.color">map(wood, wood)</Param>
</Object>
<Object create="object" name="spot">
<Param name="class">spotLight</Param>
<Param name="coneAngle">80</Param>
<Param name="intensity">2</Param>
<Param name="pos.z">6</Param>
</Object>
<Object name="persp">
<Param name="pos">8;6;8</Param>
<Param name="rot">-30;45;0</Param>
</Object>
<Render>
<Param name="creationId">outputMaya</Param>
<Param name="resolution">1920;1080</Param>
<Param name="camera">persp</Param>
<Param name="default.gammaCorrection">2</Param>
</Render>
</Process>
Params:
reset
Attributes
Attribute id
|
String
|
mandatory
Attribute delegate
= "maya" |
String
|
optional
The delegation software name.
Values:
- maya: Maya
- max: 3d Studio Max
Attribute creationGroup
|
creationGroupId
|
optional
Creation group identifier used by the process. See details Creation Group. If this attribute is defined, creations identifiers declared in the process must be included in the creation group.
Params
Param reset
|
Boolean
|
optional
This param is used to reset the 3d scene. example
<Param name="reset">1</Param>
Nodes
Node Input | optional
This node is used to open a file in Maya at the begining of the process execution, especially a maya scene.
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Output | optional
This node is used to save the scene at the end of the process execution.
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Object | optional
This process node is used to manipulate a Maya node.
Operations are:
- Create a node
- Copy a node
- Set an attribute node, especially a transform attribute
- Create an apply a deformer
- Create an assign a shader
- Link nodes: assignation or attribute connection
example: create a cone and set it's position
<Object create="polyCone" name="cone">
<Param name="radius">2</Param>
<Param name="height">2</Param>
<Param name="pos.y">1</Param>
<Param name="pos.z">6</Param>
</Object>
example: create a squashed sphere
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="squash">deformer</Param>
<Param name="squash.factor">1</Param>
</Object>
Node Attributes
Attribute name
|
String
|
mandatory
Object name. This is the name used in Maya.
Attribute copy
|
String
|
optional
Object name to be copied. This is the name used in Maya.
Attribute create
|
String
|
optional
This attribute is used to create a Maya node.
Values:
- A Maya Node Type: sphere, polyCone, polyPlane, etc. See Maya Object Attributes
- A Reseved Object: box, floor, wall. See Maya Reserved Object Attributes
A reserved object can be used to share it's geometry between Maya an Nuke.
Node Params "Maya Node Attribute"
These params are used to set a Maya node attribute. See Maya Node Attributes
The param can set:
- A node attribute: ex: radius, height, etc. See Maya Node Attributes
- An attribute of a dependant node: the attribute of a node included in the node history list. See Maya Definitions
The Param name matching can be:
- <attribute name> (ex: radius, height, etc.)
- <begin of the dependant node name>.<attribute name> (ex: make.endSweep, bend.curvature, etc.)
- <begin of the dependant node name>-<end of the dependant node name>.<attribute name> (ex: bend-handle.translateX, bend-handle.rotateY, etc.)
example I: create a sphere, set the radius and the endSweep of the makeNurbSphere node
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="make.endSweep">240</Param>
</Object>
listHistory sphere;
// Result: sphereShape makeNurbSphere1 //
example II: set the radius of a cone and the translateY of the bendHandle node
<Object name="grass1">
<Param name="radius">0.5</Param>
<Param name="bend.highBound">6</Param>
<Param name="bend-handle.translateY">0</Param>
</Object>
listHistory grass1;
// Result: grass1Shape bend bend1GroupParts tweak1 groupParts2 grass1ShapeOrig
polyCone1 groupId2 bendGroupId bendHandleShape bendHandle //
Node Params "Tranformation"
These params are used to transform the Maya scene object: position, rotation, scale and size. See Maya Transform Use Case
Param Name | Value Format | Description |
---|---|---|
pos | Vector | XYZ position |
pos.x | Float | X position |
pos.y | Float | Y position |
pos.z | Float | Z position |
rot | Vector | XYZ rotation |
rot.x | Float | X rotation |
rot.y | Float | Y rotation |
rot.z | Float | Z rotation |
scale | Float | uniform scale |
scale.x | Float | scale only on X axe |
scale.y | Float | scale only on Y axe |
scale.z | Float | scale only on Z axe |
size.x | Float | bounding-box X dimension (an uniforme scale is applied) |
size.y | Float | bounding-box Y dimension (an uniforme scale is applied) |
size.z | Float | bounding-box Z dimension (an uniforme scale is applied) |
Node Params "Deformer"
These params are used to assign a deformer to the Maya Node. See Maya Object Deformer Use Case
The deformer params can be use to:
- Create and assign a new deformer to the Maya node
- Set the deformer attributes
example I: create and assign a squash deformer
<Object create="object" name="sphere">
<Param name="class">sphere</Param>
<Param name="radius">2</Param>
<Param name="squash1">deformer</Param>
<Param name="squash1.category">nonLinear</Param>
<Param name="squash1.type">squash</Param>
<Param name="squash1.factor">1</Param>
</Object>
example II: create and assign a twist deformater and set the handle rotation
<Object create="object" name="plane">
<Param name="class">polyPlane</Param>
<Param name="width">2</Param>
<Param name="height">4</Param>
<Param name="subdivisionsX">10</Param>
<Param name="subdivisionsY">10</Param>
<Param name="twist">deformer</Param>
<Param name="twist.startAngle">90</Param>
<Param name="twist-handle.rotateX">60</Param>
</Object>
Param Name | Value Format | Description |
---|---|---|
<deformer name> | String | The deformer name: the param name must be equal to the deformer name and the param value to deformer keyword. |
<deformer name>.category | String | The Maya deformer category. If not declared, the default category is nonLinear |
<deformer name>.type | String | The Maya deformer type (ex: squash, twist). If not declared, the default type is equal to the deformer name |
<deformer name>.<attribute> | any | The Maya deformer attribute (ex: squash.factor, twist.startAngle, etc.) See Deformer Node Attributes |
Node Params "Shader"
These params are used to assign a shader to the Maya Node. See $link(basical_3d_shader_maya)
The shader params can be use to:
- Create and assign a new shader to the Maya node
- Set the new shader attributes
- Assign an existing shader to the Maya node
example I: create and assign a blinn material
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="blinn1">shader</Param>
<Param name="blinn1.type">blinn</Param>
<Param name="blinn1.color">1;0;0</Param>
</Object>
example II: create and assign a blinn shader with a texture map
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="pos.z">6</Param>
<Param name="blinn2">shader</Param>
<Param name="blinn2.type">blinn</Param>
<Param name="blinn2.color">map(wood, wood)</Param>
</Object>
example III: assign an existing blinn shader
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="pos.z">12</Param>
<Param name="shader">blinn1</Param>
</Object>
Param Name | Value Format | Description |
---|---|---|
<shader name> | String | The shader name: the param name must be equal to the shader name and the param value to shader keyword. This param is used to create an assign a new shader to the object. |
<shader name>.category | String | The Maya shader category (ex: shader, texture, light, etc.). If not declared, the default category is shader. This param is used to create an assign a new shader to the object. |
<shader name>.type | String | The Maya shader type (ex: blinn, phong, etc.). If not declared, the default type is equal to the shader name. This param is used to create an assign a new shader to the object. |
<shader name>.<attribute> | any | The Maya shader attribute (ex: shader.color, shader.transparency, etc.). This param is used to create an assign a new shader to the object. See Shader Node Attributes |
shader | any | The existing shader name to assign to the object. |
Node Params "Maya Nodes Linking"
These params are used to link Maya nodes together, by attribute connection or shader assignation
example I: create a blinn shader and connect the color attribute to the outColor of the Maya node name 'file'
<Object create="blinn" name="material1">
<Param name="transparency">0.5</Param>
<Param name="color">connect(file.outColor)</Param>
</Object>
example II: create a sphere object and assign the shader shader1
<Object create="sphere" name="sphere">
<Param name="radius">2</Param>
<Param name="assign">material1</Param>
</Object>
Node Merge | optional
This node is used to merge a secondary scene into the main scene.
example
<Merge>
<Param name="prefix">merge1</Param>
<Param name="creationId">roof</Param>
<Param name="pos.z">10</Param>
<Param name="rot.z">30</Param>
</Merge>
Node Params
Param prefix
|
String
|
optional
Name used to prefix all objects merged. Node Params "Tranformation"
These params are params defined for the Object Node. Here, the transformation is applied on the merged objects group.
Node Render | optional
This node is used to render a scene. See Maya Render Use Case
example
<Render>
<Param name="creationId">outputMaya1</Param>
<Param name="frames">1-100</Param>
<Param name="resolution">1920;1080</Param>
<Param name="camera">persp</Param>
<Param name="default.gammaCorrection">2</Param>
</Render>
Node Params
Param creationId
|
creationId
|
mandatory
This param is used to set the rendering output creation. The creation must be an image, a video or a frameset.
Param camera
|
String
|
mandatory
The camera name
Param resolution
|
Point
|
optional
Output resolution: width;height. By default, the output resolution will be the project's resolution. See details Configuration
Param frames
|
Render Frames
|
optional
Begin and end frames for a sequence rendering. Optionnaly, a frame count can be set.
Example: 1-250 251 frames will be rendered
Example: 1-250/6 only 6 frames will be rendered: 1, 50, 100, 150, 200, 250
Node Params "Default Render Globals"
These params are used to set the Maya defaultRenderGlobals attributes. See Maya Render Use Case Maya Node Attributes
example
<Render>
<Param name="creationId">outputMaya1</Param>
<Param name="resolution">1920;1080</Param>
<Param name="camera">persp</Param>
<Param name="default.gammaCorrection">2</Param>
</Render>
Node Export | optional
This node is used to export animated Maya node attributes into a file.
example
<Export creationId="perspExport">
<Param name="frames">1-100/11</Param>
<Param name="persp/pos.x">x</Param>
<Param name="persp/pos.y">y</Param>
<Param name="persp/pos.z">z</Param>
</Export>
Attributes:
creationId
Params:
frames Maya Node Attribute
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Params
Param frames
|
Frames
|
optional
Begin and end frames export. Optionnaly, a frame count can be set.
Example: 1-250 251 frames will be rendered
Example: 1-250/6 only 6 frames will be rendered: 1, 50, 100, 150, 200, 250