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.

NOTE The 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.

NOTE The 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
Use External Render Settings

Defines custom export formats and settings in the external project file.

When checked, the External Render Settings will render with the project settings directly.

When unchecked, Harmony will override the render settings in order to provide an appropriate output based on the selected render engine.

Render Engine

Defines the render engine for Harmony to render a 3D object.

TIP If the render engine is not defined, then by default, the render engine will be set to the renderer used by the 3D software.

Harmony can support the following render engines:

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

Defines the path for Harmony to source the 3D project file from.

NOTE If this attribute is not defined, Harmony will search in the scene elements folder of the 3D software by default.

Paths can be relative to the rendering model’s folder, or to an absolute location on the disk.

The files that can be sourced must be in the following format:

  • ma.

  • mb.

External Camera Name

Defines the camera that will capture the render. This setting will also apply any effects linked to the camera in the 3D software to be applied when capturing the render from Harmony.

NOTE If no camera exists, a new one will be created.
NOTE In the 3D software, the camera will capture the object from the origin.
Output Project

Defines a path to create a new project file in the external 3D software containing all the animation and transformations on the 3D model from Harmony.

TIP Harmony will output a new file with changes applied, preserving your original 3D project file.
NOTE If no value is set, the 3D project file will only be modified temporarily in order to produce the output frame.
Version

Defines the script that Harmony will use to render Autodesk Maya scripts.

Version 1: Will set the Script Node to use the Autodesk Maya scripts from versions of Harmony prior to 24.0.

Version 2: Will set the Script Node to use the render Autodesk Maya updated scripts from Harmony 24.0.

TIP You may want to set the Version attribute to a value of 1 for backwards compatibility if you are using an older version of Autodesk Maya. Note: The Version attribute will only appear on the Render Maya Batch Node and not the Render Blender Batch Node.

For information on Layer Properties see: Render Maya Batch Node.

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 External Project Path 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.

NOTE The 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.