Quick start to command-line rendering with xsibatch

I like to use a batch file to build my xsibatch command lines.
For example:

set SCN=\\EXAMPLE\Support\Project\Scenes\Scene.scn
set PASSES=Default_Pass,Depth
set XSI_BINDIR=C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%"

Note that I call xsibatch.bat, not xsibatch.exe. That is because xsibatch.bat calls setenv.bat, which sets all the environment variables used by xsi.exe and xsibatch.exe. For example, setenv.bat sets the environment variable that specifies the location of the license server.

This xsibatch command line renders all frames and all passes of the specified scene:

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%"

Note that I need to provide the full path to the scene file, and I enclose it in quotation marks (just in case the path name includes spaces).

-frames allows me to render specific frames. For example, this renders a frameset (frames 1 throught 10):

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-10

This renders frames 1,3,5,7,…,99 using the syntax -frames start,end,step:

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1,100,2

-pass specifies a comma-separated list of passes to render:

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-100 -pass "%PASSES%"

-skip tells xsibatch not to re-render frames that have already been rendered (for example, by another render node):

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-100 -pass "%PASSES%" -skip on

-verbose turns on verbose logging during the render. xsibatch will log the renderer diagnostics (Render Manager > mental ray > Diagnostics)

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-100 -pass "%PASSES%" -skip on -verbose on

-output_dir allows you to override the output folder specified in the scene file:

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-10,22 -output_dir %TEMP%

-mb allows you to enable motion blur from the command line:

"%XSI_BINDIR%\xsibatch.bat" -render "%SCN%" -frames 1-10,22 -mb on

If you need to set other mental ray options for a render job, you can use -script with -render. -script allows you to run a script on the scene before it sent to the renderer.

If you run xsibatch -h in a command prompt, you’ll get the usage:
Continue reading