Batch Rendering


You can use command-line options to render scenes without opening the Softimage user interface. This is known as batch rendering or command line rendering. In addition, you can export render archives as well as create and run batch or script files from the command line.

NoteThe previous syntax for batch rendering using the -r switch has been deprecated and is no longer recommended. Use render events in place of the -prescript and -postscript options.

To render in batch mode you use the xsi or xsibatch command with the -render or -export switch followed by any of the supported batch rendering options you wish to specify. For example, you can do any of the following:

xsi -render bob.scn -pass specular -frames 1,3,60
xsi -export bob.scn
xsi -script foo.vbs
xsi -render bob.scn -script foo.vbs

xsi and xsibatch support the same options. The difference is that xsibatch is the remote-friendly version of the xsi command compiled specifically for Windows. This allows you to render in batch mode remotely using Telnet for example, or perform other tasks such as automatically close the command window when you want to run several scripts one after another from a single batch file. For more information about batch scripting, see Issues in Batch Scripting [SDK Guide].

NoteOn Windows, there is a batch file ScriptXSI.bat in the Application\bin directory of the Softimage installation location. You can drag a .scn file onto this file to batch-render a scene. You can also create a shortcut on your desktop (or anywhere else) for this batch file and render .scn files by dropping them onto the shortcut.

Rendering in Batch Mode

To render in batch mode, you must set the environment and then enter rendering commands and options on a command line.

  • To set the environment on Windows:

    • Open a Softimage command prompt window.

    • Choose Start Programs Autodesk Autodesk Softimage 2013 Command Prompt.

  • To set the environment on Linux:

    • Open a shell or terminal window and source the .xsi_2013 Softimage resource file.

  • To render in batch mode:

    • At the command line, run xsi or xsibatch (remote-friendly version for Windows) with the -render or -export option.

    • For example:

      		xsi -render mypath/myscene.scn
      		xsibatch -render mypath/myscene.scn

Batch Rendering Options

Here are the batch rendering options you can use on a command line with the -render or -export switch. These batch rendering options are general scene and pass-level rendering options that are controlled by Softimage. If you want to modify options that are specific to the renderer, you can use the -script option to specify a script as described in Using Scripts to Set Renderer Specific Options.


xsi|xsibatch <-render|-export> <path to scene> 
				[-pass <pass1,pass2,...,passN>] 
				[-frames <start,end[,step]>|<frame set>] 
				[-output_dir <dir>] 
				[-mb <on|off>] 
				[-skip <on|off>]


-render <scene>

Loads the given scene and renders it.

-export <scene>

Loads the given scene and exports it to a render archive.

-pass <pass1,pass2,...,passN> 

Gives the list of passes to render. If no pass is specified, then all passes are rendered.

-frames <start,end[,step]>|<frame set>

Overrides the frame settings of all passes. The frame setting can be given either as a list of two or three comma separated numbers, or any other string, which will get interpreted as a frame set. If a frame set is required but it consists of only two or three frames, it is possible to give the frame set like 2-2,5-5, since a string that contains a hyphen (-) will always be interpreted as a frame set. Alternatively the string can also be surrounded by single quotes.

-output_dir <dir>

Override the output directory of the scene render options.

-mb <on|off>

Enable or disable motion blur for all passes.

-skip <on|off>

Enable or disable frame skipping for all passes.

Using Scripts to Set Renderer Specific Options

If you want to modify other options than those provided with the -render and -export switches, you can use the -script option to specify a script. The script runs after the scene has been loaded and modifications performed on the passes and scene render options according to the specified command line options. The render or export starts after the script has finished.

Example 1

To turn final gathering on or off, create a script called RenderScript.vbs containing this procedure:

Sub RenderScript( fg_enable )
	SetValue "Passes.List.*.mentalray.FGEnable", CBool( fg_enable )
End Sub

This can be used on the command line as follows:

xsi -render <.scn file> -script RenderScript.vbs -main RenderScript -args -fg_enable True

Example 2

To set the mental ray verbosity level to full, create a script called VerboseFull.vbs with the following line:

SetValue "Passes.List.*.mentalray.Verbosity", 252

This can be used on the command line as follows:

xsi -render <.scn file> -script VerboseFull.vbs

Batch Rendering with Scripts

There are two methods for batch rendering using scripts:

xsi -render bob.scn -script foo.vbs

When using -script together with -render, you do not need to include any render commands in the script itself. The -render option will take care of rendering the scene file after the script has finished.

xsi -script foo.vbs

When using -script without -render, you can use the RenderPass command to render the specified pass, or the current pass if none is specified, with its current rendering options. You can also use the RenderAllPasses and RenderPassesFrameSet commands. Use GetValue and SetValue to work with renderer options.

A good example of a script that includes rendering commands is Rendering.vbs in the DSScripts subdirectory. You can open this file in the script editor to see how it works.

ImportantThe Rendering.vbs is a core system file. Modifying this file may corrupt your installation. Do not edit and save the file.

Remember that you must provide an argument to specify which scene file to render, because scripts run from the command line cannot require any interactivity such as selecting a scene. Before running a script in batch mode, you may need to prepare it first.

For information about scripting, batch scripting, and the script editor in general, see Issues in Batch Scripting [SDK Guide].