Batch and command-line render with legacy render layers

Batch and command-line rendering interacts with render layers. Read this section to learn how they work together.

Note: A new render setup system is available that replaces legacy render layers and is the default system in Maya. This new approach simplifies the management of complex scenes for rendering and is now the recommended workflow. See Render setup in Maya for more information.

How frames are rendered with render layers on the command-line

When command-line rendering in previous versions of Maya, each render layer of a frame was rendered before moving on to the next frame.

In order to properly support the use of different renderers with different layers in Maya 8, rendering from the command line (render) renders all frames of a particular layer before moving on to the next layer, as seen in the following diagram.

Previous render behavior is shown by the dashed arrows; current render behavior is show with the green arrows. Layers are rendered in the order they appear in the layer manager.

This may have an impact on dispatchers and other render managers because scripts that are triggered by completion of a particular frame won’t be triggered until the last layer is being rendered.

Note:

The frame/layer order of processing in batch and command line is required for maximum efficiency. Switching layers has an impact on render processing due to the need to update all the attribute overrides.

To render all layers in the command-line renderer

  1. At a Command Prompt, Terminal window, or shell, type the following:

    render -r file <filename>

    The batch renderer will use the specified renderers in the file per-layer to render the scene.

    Additionally, the -rl flag specifies which layer to render.

    For example, Render -r file -rl layer1 <filename> renders layer1 with the renderer specified in layer1; Render -r sw -rl layer1 <filename> renders layer1 with the software renderer, no matter what renderer is specified in the file.

    Note:

    If you do not explicitly specify a renderer, Maya uses the renderer specified in the scene file. This behavior is different from that of Maya 2010.