Process 3d - Max

This process is use to render 3d scenes. The calculations are delegated to Maya.
 Features
The features are:
 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.
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 
Nodes:  Input  Output  Object  Merge  Render  Export  Script 
Attributes

 Attribute id  | String  |  mandatory

 process identifier. This identifier is used to execute the process.

 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

example
<Input creationId="scene1" />
Attributes:  creationId 
Node Attributes

 Attribute creationId  | creationId  |  mandatory

  The creation identifier. The creation type must be "*.ma".

 Node Output  |  optional

example
<Output creationId="scene1b" />
Attributes:  creationId 
Node Attributes

 Attribute creationId  | creationId  |  mandatory

  The creation identifier. The creation type must be "*.ma".

 Node Object  |  optional

  This process node is used to manipulate a Maya node.
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 reserved object can be used to share it's geometry between Maya an Nuke.
Node Params "Maya Node Attribute"
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"
Param Name Value Format Description
posVectorXYZ position
pos.xFloatX position
pos.yFloatY position
pos.zFloatZ position
rotVectorXYZ rotation
rot.xFloatX rotation
rot.yFloatY rotation
rot.zFloatZ rotation
scaleFloatuniform scale
scale.xFloatscale only on X axe
scale.yFloatscale only on Y axe
scale.zFloatscale only on Z axe
size.xFloatbounding-box X dimension (an uniforme scale is applied)
size.yFloatbounding-box Y dimension (an uniforme scale is applied)
size.zFloatbounding-box Z dimension (an uniforme scale is applied)
Node Params "Deformer"
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>.categoryString The Maya deformer category. If not declared, the default category is nonLinear
<deformer name>.typeString 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>.categoryString 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>.typeString 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
shaderany 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 Render  |  optional

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"
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.
Node Attributes

 Attribute creationId  | creationId  |  mandatory

  The creation identifier. The creation type must be "*.txt".
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