Maya Batch Rendering

Maya Batch Rendering

Users can use Maya's Batch Render mechanisms to render a Maya scene. Make sure that the camera (and other settings) are set correctly in the Render Globals.

From Maya's Render menu select:

Render> Batch Render

The batch job will begin as a background process.

Multithreading

You can specify the number of "threads" to use via Batch Render option boxes. The default setting, 0, means use all available processors.


Maya Batch Rendering from the Command Line

From a command line use the following format:

Render -r rman sceneFile

If no project is specified, the current project is used.


Maya Batch Render Flags

The following flags are supported for Maya Batch Renders via the command line (i.e. Render -r rman foo.ma). They are also valid for the rman render and rman genrib commands, and can be used in scripted workflows:

Common options:

-help

Print help

-test

Print Mel commands but do not execute them

-verb

Print Mel commands before they are executed

-keepMel

Keep the temporary Mel file

-listRenderers

List all available renderers

-renderer string

Use this specific renderer

-r string

Same as -renderer

-proj string

Use this Maya project to load the file

-log string

Save output into the given file

All purpose flags:

-setAttr string string

This flag can be used to set any of the global attributes listed in RenderMan_for_Maya.ini. It takes a name value pair. Attribute values which have multiple data elements should be surrounded by quotes. The flag can be used multiple times. Example:

Render -r rman -setAttr ShadingRate 5 -setAttr PixelSamples "3 3" -setAttr motionBlur 1 -setAttr
Format:resolution "320 240" filename

-setPref string string

This flag can be used to set any of the preferences listed in RenderMan_for_Maya.ini. It takes a name value pair. Attribute values that have multiple data elements should be surrounded by quotes. The flag can be used multiple times. For example:

Render -r rman -setPref BatchCompileMode zealous filename

General purpose flags:

-rd path

Directory in which to store image files

-fnc string

File Name Convention:

name, name.ext, name.#.ext, name.ext.# name.#, name#.ext, name_#.ext

As a shortcut, numbers 1, 2, ... can be used.

-im filename

Image file output name

-of string

File format of output images: Alias, Cineon, MayaIFF, OpenEXR, SGI8, SGI16, SoftImage, Targa, Tiff8, Tiff16, Tiff32

Frame numbering options:

-s float

Starting frame for a sequence

-e float

End frame for a sequence

-b float

By frame/step for a sequence

-pad int

Number of digits in the frame number included in the output image file name

-rfs int

The initial (renumbered) frame number for the first frame when rendering

-rfb int

The step by which frames are renumbered (used in conjunction with -rfs).

Camera options:

-cam name

The name of the camera from which you are rendering

-rgb boolean

Enable/disable RGB output

-alpha boolean

Enable/disable Alpha output

-depth boolean

Enable/disable Depth output

-iip

Disable all image planes before rendering

-res int int

Specify the resolution (X Y) of the rendered image

-crop float float float float

Specify a crop window for the rendered image

Render Layers:

-rl boolean|name(s)

Render each listed layer separately

MEL callbacks:

-pre string

MEL code executed before each frame

-post string

MEL code executed after each frame

  • MEL callbacks for Maya 7.0

    -preRender string

    MEL code executed before rendering

    -postRender string

    MEL code executed after rendering

    -preLayer string

    MEL code executed before each render layer

    -postLayer string

    MEL code executed after each render layer

    -preFrame string

    MEL code executed before each frame

    -postFrame string

    MEL code executed after each frame

Bake Options:

-bake int

  • 0: Don't bake, but do regular rendering
  • 1: Bake texture maps
  • 2: Bake texture maps and do regular rendering

-bakeChannels string

Comma delimited list of one or more channels: _ambient,_diffuse,_diffuse_noshadow, _incandescence,_indirect,_indirectdiffuse, _irradiance,_occlusion,_reflection,_refraction, _shadow,_specular,_subsurface,_surfacecolor, _translucence

-bakeResolution int int

Set X Y resolution of baked maps

-bakeCamera string

Camera to use while baking

-bakeFileFormat string

File format of output images: Alias, Cineon, It, MayaIFF, OpenEXR, SGI8, SGI16, SoftImage, Targa, Tiff8, Tiff16, Tiff32

-bakeFileDepth string

Depth of output images: byte, short, float

Other:

-rep boolean

Do not replace the rendered image if it already exists

-n int

Number of processors to use. 0 indicates use all available.

-compile boolean

Forces compilation of all shaders, even if they already exist.
  • Note
  • Remember to place a space between option flags and their arguments.
  • Any boolean flag will take the following values as TRUE: on, yes, true, or 1.
  • Any boolean flag will take the following values as FALSE: off, no, false, or 0.

More Info

A complete list of the options can also be seen by running:

Render -r rman -h