Render Maya Batch Node

By default, 3D models imported in Harmony are rendered using OpenGL. The Maya Batch Render can be used to render a 3D model connected to it through Autodesk Maya, then output the rendered image to the scene so that it can be composited. It can be configured to use one of several of the rendering engines supported by Maya, such as RenderMan, Mental Ray and Maya Software.

NOTEThe Maya Batch Render node is basically a Script Node pre-configured to take the input image and process it through the renderMayaBatch() built-in function of the Harmony scripting interface—see Script Node and Script Node Reference.

Connection

The MayaBatchRender node takes a 3D model in its input port, and outputs a 2D rendered image when the scene is rendered.

NOTEThe Maya Batch Render node does not affect the OpenGL preview of the scene in the Camera view. To see the effect of the Maya Batch Render node in Harmony, you must set the preview mode of the Camera view to Render View mode.

Configuration

For the Maya Batch Render node to work, the following conditions must be met:

  • The path to Autodesk Maya and, if needed, to RenderMan, must have been set on your machine using the TB_Set_3dRenderer_Paths.js script which is bundled with Harmony.
  • The original Maya project in which the 3D model was created must be in the element folder of the 3D model you imported into your Harmony scene, and must have the same file name as the 3D model you imported, but with the appropriate extension. Additionally, the model's textures should also be in the element folder.

    In the following example, the 3D model is a Filmbox (.fbx) model that was imported in a Harmony scene into an element named Ship. The .fbx file was named Ship-1.fbx. Hence, for the Maya Batch Render node to render it, the original Maya project must be in the folder of the Ship element. Since the Maya project has the extension .ma and the 3D model is named Ship-1.fbx, the Maya project must be named Ship-1.ma:

NOTES

Layer Properties

Parameter Description
Enable/Disable

Allows you to enable or disable the node. When disabled, a node has no visible effect on the rendered image, nor on the preview in the Camera, Perspective, Side and Top views.

Colour Swatch

Sets the colour of the layer in the Timeline view and of the node in the Node view.

Name

Allows you to enter a name for the node.

Attributes Tab

Parameter Description

Renderer

Specify the rendering engine to use. The following engines are supported:

  • 'renderMan' (or 'reyes')
  • 'renderManRIS' (or 'RIS')
  • 'arnold'
  • 'mentalRay'
  • 'mayaSoftware' (or 'maya')

Specifications Tab

The specification tab is used to define the attributes in the Attributes tab as well as the input and output ports of the node. By default, it is configured to have one input image port, one output image port, and a Renderer parameter in the Attributes tab, which allows you decide which rendering engine to use to render the 3D model. The following is the default Specifications script for the Maya Batch Render node:

<specs> <ports> <in type="IMAGE"/> <out type="IMAGE"/> </ports> <attributes> <attr type="string" name="renderer" value="" tooltip="If this attribute is not set, then the MayaBatchRender node will use the default renderer specified in the Maya file. If this attribute is set, then it forces the use of a specific renderer other than the default. The following renderers are currently supported: 'renderMan' (or 'reyes'), 'renderManRIS' (or 'RIS'), 'arnold', 'mentalRay', 'mayaSoftware' (or 'maya'). Note that those values are case insensitive."/> </attributes> </specs>

By default, the Maya Batch Render node expects the Maya project for the 3D model to be in the same directory as the 3D model itself, with the same file name, but a different extension. However, you can add another attribute to the node which allows you to specify the path to the Maya project to use for rendering the 3D model. To do this, add the bolded line to the Specifications tab:

<specs> <ports> <in type="IMAGE"/> <out type="IMAGE"/> </ports> <attributes> <attr type="string" name="renderer" value="" tooltip="If this attribute is not set, then the MayaBatchRender node will use the default renderer specified in the Maya file. If this attribute is set, then it forces the use of a specific renderer other than the default. The following renderers are currently supported: 'renderMan' (or 'reyes'), 'renderManRIS' (or 'RIS'), 'arnold', 'mentalRay', 'mayaSoftware' (or 'maya'). Note that those values are case insensitive."/> <attr type="string" name="OriginalMayaFileName" value="" tooltip="Write your project path here"/> </attributes> </specs>

After changing the content of the Specifications tab, you must save, close and re-open the scene before you can see the new OriginalMayaFileName field in the Attributes tab. You can then type in the path to the Maya project that the Maya Batch Render node should render.

NOTES
  • The path should include the name of the project file as well as its extension.
  • You must use forward slashes (/) to separate the directories in the path, even on Windows, like in this example:

    C:/Users/username/Documents/MyProject.ma

  • You can use a relative path. The path is relative to the element folder containing the 3D model used in the Harmony scene. For example, ../../ points to the scene directory.

Softrender Tab

This tab contains the script to execute when the scene is rendered. By default, it contains this single function:

renderMayaBatch();

This function takes the 3D model in the input image and renders it using Autodesk Maya, using the rendering engine specified in the Attributes tab. To do this, it uses the original Maya project for the 3D model and instructs Autodesk Maya to render it, but with the transformations in position, angle and scale applied to it in the current frame of the Harmony scene. Autodesk Maya then produces an OpenEXR (.exr) image with deep pixels, which Harmony integrates into the scene and composites it with other elements and effects.

NOTEThe other tabs in the Maya Batch Render node properties are the standard tabs for a Script node. This is because the Maya Batch Render node is just a Script node set up to execute renderMayaBatch();. For more information, see Script Node.