Render from the command line

Your scene file determines whether you render a single frame or an animation. You can render from a shell or a command line. Before rendering, you may want to close all applications, including Maya, to maximize the amount of memory available for rendering.

If you have not set up command-line rendering for your platform, see Set up command line rendering

When you render from a command line, you can set flags that override some of the Render Settings, saving time during test renders.

Note:

When rendering with Arnold for Maya, you can render a sequence of frames interactively without using the command line renderer. See Render a sequence of frames interactively.

If you perform command line rendering with Arnold for Maya, your images will appear with a watermark. To render images without a watermark, purchase Arnold batch render nodes from Solid Angle; or use your preferred 3rd party renderer.

Getting Help

To get quick renderer-specific information

  1. Type:

    Render -r rendername -help

    where rendername is the name of the renderer.

    Use the following options:

    • sw = software renderer
    • hw = hardware renderer
    • vr = vector renderer
    • hw2 = hardware 2.0 renderer
    • file = the file within which the renderer is specified
      Note: If you get help on a file (-r file -help), only the flags common to all renderers, not a specific renderer, are shown. If you want renderer-specific information, you must specify the renderer.
Note:

To use the command line renderer, you must include the path as part of the command; for example: "C:\Program Files\Autodesk\Maya<version>\bin\Render.exe" -r sw <filename>. You cannot simply navigate to the \bin directory from the command line and run Render.exe -r sw <filename>. On Windows, you can avoid having to type the path each time by setting your PATH environment variable to include the path to your \bin directory. For more information see Set up command line rendering.

To obtain a complete list of command line Render options, from a shell or command line

  1. Type: Render -help

All flags have a short description. Each flag corresponds to the appropriate section of the Render Settings window. See the Render Settings documentation for more detailed information on each option.

To render from the command line

  1. Do one of the following:

    At the command prompt, shell, or Terminal window, type:

    Render -r <renderer name> <options> <filename>
    

    where <renderer name> is the name of the renderer, as shown above for getting Help.

    where <filename> is (generally) a Maya ASCII or Maya Binary file, and <options> is one or more of the options or flags.

    This renders the image or animation using the renderer you specify in the command line.

    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.
  2. At the command prompt, type:
    Render <options> <filename>
    

    This renders the image or animation using the renderer defined in the file.

For descriptions of the common command-line renderer flags, see Common flags for the command line renderer.

For descriptions of the renderer-specific command-line renderer flags, see Renderer-specific flags for the command line renderer.

To render a scene with a specific renderer from a shell or command line

  1. Type: Render -r <renderername> <options> scene
    Tip: You may need to provide the -proj flag when issuing the render command to specify where the scene file is located, or to set a project. For example, type:

    Render <options> -proj <proj path> scene

    An example is as follows:

    /Applications/Autodesk/maya2016/Maya.app/Contents/bin/Render -r sw -v 5 -proj /Users/username/Documents/maya/projects/default /Users/username/Documents/maya/projects/default/myScene.ma

    In this example, Maya renders into the images directory specified after the -proj flag.

To render a scene with the renderer specified in the file from a shell or command line

  1. Whichever renderer is specified in the file is used to render the scene.

    Type: Render -r file

To batch render using user-defined region rendering

  1. Use the -reg flag. For example:

    render -r sw -reg 0 100 0 100 scene.ma

    where -reg 0 100 0 100 indicates the region to be rendered in pixels (left, right, bottom, top).

    The above command renders the lower left 100 x100 pixel region of the scene.