Batch Render Tool - Batch Render Warning Dialog
Rendering
Command-Line Rendering Switches
Autodesk 3ds Max Design Help > Rendering >
Command-Line Rendering
The command-line rendering tool lets you perform batch rendering jobs without having to manipulate
parameters by hand in a MAX file. Simple, “one-shot” rendering jobs can be submitted from the Start > Run
dialog. More elaborate, batched jobs can be rendered through the use of text files; for example,
MyRender.bat or MyRender.xml. The ability to edit text files is what provides the power to this tool. You can
quickly make changes to your rendering parameters, or output formats, simply by opening your text editor
and editing the batch settings.
Command-line rendering is provided by the 3dsmaxcmd.exe program, found in your program install folder.
You can submit command-line rendering jobs that are rendered on a single workstation, or you can take
advantage of network rendering and let the Backburner utility manage the jobs across multiple systems.
The Batch Render tool is another way to quickly create BAT files that can be used with the command-line
rendering. The Batch Render tool lets you create a queue of camera tasks with specific output parameters,
rendering presets or automatic loading of scene states. Once your queue is complete, you can export the
tasks to a BAT file that is stored in the \scenes folder.
WarningCommand-line rendering is a professional feature and can perform destructive operations. You will
not see messages or warning dialogs informing you about potential mistakes, such as overwriting an existing
frame on your drive.
See Also
Command-Line Rendering Switches
Procedures
To view the 3dsmaxcmd help file:
The 3dsmaxcmd.exe file contains a built-in help system that you can access from a command prompt.
1. Open a command prompt window (for example, Windows Start > Run > enter CMD).
2. Enter the following: “c:\program files\autodesk\[program folder name]\3dsmaxcmd” -? and press
Enter.
The list of switches and options will scroll on to the window.
To view a list of sample command lines with descriptions of what they do:
The 3dsmaxcmd.exe file also has an extensive list of sample text strings that describe many of the most
common scenarios you'd use command-line rendering to accomplish.
1. Open a command prompt window.
2. Enter the following: “c:\program files\autodesk\[program folder name]\3dsmaxcmd” -x and press
Enter.
Setting up the simplest rendering:
In its simplest form, just a render command using all the settings that are stored with a scene, would look like
this:
1. Open a command prompt window.
2. Enter the following: “c:\program files\autodesk\[program folder name]\3dsmaxcmd” “c:\program
files\autodesk\[program folder name]\scenes\myscene.max” and press Enter.
Example: Rendering to a JPG file at 800x600 resolution:
Perhaps the last time you rendered your scene, you had the output resolution set to 320x240 and rendered a
BMP file. Re-rendering the scene using different output settings is fast and efficient with command-line
rendering.
1. Open a command prompt window.
2. Enter the following:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -outputName:“c:\program
files\autodesk\[program folder name]\renderoutput\myImage.jpg” -w 800 -h 600 “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
and press Enter.
NoteThe specified output path must already exist. If it doesn't, the image doesn't render and you get
an error message.
Network rendering from the command line:
If you have your system networked and have access to other systems, you can take advantage of network
rendering.
NoteA command-line job cannot be run on a system already running the Backburner server.
1. Open a command prompt window.
2. Enter the following:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -submit “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
and press Enter.
Example: Rendering from a text file:
Command-line rendering gives you the ability to set a series of common switches that can be quickly re-used
for rendering a single job from Start > Run, or for rendering a group of scenes specified in a BAT file. You can
build your text file using any text editor.
NoteA TXT file can specify only a single scene to render. For multiple scenes, use a BAT file.
1. Open your text editor.
2. Enter your list of commands, such as:
-bitmapPath=\\mapServer\maps\myMaps
-cam=myCamera
-width=800
-height=600
-vfb=true
-frames=all
-force2Sided=true
3. Once all the switches are entered, save the files as a TXT file, such as myrender.txt.
4. To render the scene, open the Windows Start > Run dialog.
5. Enter the following:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” @c:\myrender.txt -o=“c:\program
files\autodesk\[program folder name]\renderoutput\myImage.tga” “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
and click OK.
Using a TXT file that contains your favorite settings, in conjunction with a command line that
specifies the output file format and scene of your choice, gives you the flexibility to re-use the TXT
file without having to edit it each time you want to render. You can create several TXT files with
settings for different stages of scene development, such as testrender.txt or finalrender.txt.
Example: Rendering from a BAT file:
If you want to render several scenes in a batch process, you can create a BAT file containing all the scenes
and switches needed to get the results you want. Just like a text file, you can build your BAT file using any
text editor. For this example, let's say you have three scenes, in various stages, and you want each rendered
using different settings.
1. Open your text editor.
2. On the first line, enter the following text. This example assumes that the scene is far from finished,
but that you want to test a chunk of animation.
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -o=“c:\program
files\autodesk\[program folder name]\renderoutput\scene1.jpg” -w=320 -h=240 -frame=1-33
“c:\program files\autodesk\[program folder name]\scenes\scene1.max”
The second scene is almost ready, but you need to test the look of some materials and do a video
color check:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -o=“c:\program
files\autodesk\[program folder name]\renderoutput\scene2.jpg” -w=640 -h=480 -force2Sided=true -
videoColorCheck=true “c:\program files\autodesk\[program folder name]\scenes\scene2.max”
The last scene is complete, and you want to render a higher-resolution image using settings you've
saved in a TXT file that you always use for final renderings:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” @c:\finalrender.txt -o=“c:\program
files\autodesk\[program folder name]\renderoutput\scene3.jpg” “c:\program files\autodesk\[program
folder name]\scenes\scene3.max”
3. After entering these three command lines, save your file as a BAT file.
4. From the Windows Start > Run dialog, browse to the BAT file and click Open.
5. Click OK to start rendering.
Topics in this section
Command-Line Rendering Switches
Backburner Command Line Control
Please send us your comment about this page
Command-Line Rendering
Command-Line Rendering
Backburner Command Line Control
Autodesk 3ds Max Design Help > Rendering > Command-Line Rendering >
Command-Line Rendering Switches
In order to use command-line rendering, you should be familiar with DOS and understand the structure of
command lines.
Command-Line Switches
You can use the following switches after 3dsmaxcmd on the command line of a command prompt window, or
as entries in a text file. The following tables show switches and their effects.
NoteSwitches are not case sensitive.
At Verbosity level 5, the output message from command-line rendering includes both a timestamp and a date
stamp. The timestamp is separated from the main message by a semicolon, and the elapsed time message
is separated from the Frame Completed message by a semicolon. This lets you pipe the message to a file,
and then open it in a spreadsheet program with appropriate columns by setting the delimiter character.
Separators
Many switches are displayed in the following charts with trailing colons, such as -w: or -h:. The use of a colon
separator is optional, and can be replaced with a space or an equal sign (=). Therefore, command lines such
as:
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -outputName:“c:\program
files\autodesk\[program folder name]\renderoutput\myImage.jpg” -w:640 -h:480 “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -outputName “c:\program
files\autodesk\[program folder name]\renderoutput\myImage.jpg” -w 640 -h 480 “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -outputName=“c:\program
files\autodesk\[program folder name]\renderoutput\myImage.jpg” -w=640 -h=480 “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
will give you the same results. The use of the equal sign can give your command-line files more of an INI file
appearance.
NoteThe switch -submit:[manager_name] is the only case where a colon is necessary.
On/Off Command-Line Switches
Many of the switches you'll use are simple on/off toggles, such as the -rfw: and -renderFields: switches. If
you prefer, instead of using a 1 or 0 to designate their states, you can use True or False. For example, to
render a scene to a specified file type and display the Rendered Frame Window, your command line might
look like this;
“c:\program files\autodesk\[program folder name]\3dsmaxcmd” -outputName=“c:\program
files\autodesk\[program folder name]\renderoutput\myImage.jpg” -rfw=true “c:\program
files\autodesk\[program folder name]\scenes\myscene.max”
Basic Options
Switch Effect
-? Displays a list of these switches in the DOS window.
-x Shows a list of example command lines.
Sets the verbosity level, where # is an integer from 0 (least verbose) to 5
-v:#
(most verbose).
@command_file or -
Points to a separate file containing command-line options.
cmdFile:command_file
-preset: or -
Uses a render preset file where is the name of the preset file.
rps:
-sceneState:
-batchRender Renders all enabled tasks in the Batch Render dialog.
-batchRender:
-preRenderScript:
Uses a pre-render script where is the name of the script file.
or -script:
-postRenderScript: Uses a post-render script where is the name of the script file.
-workPath: Root location for job data folders.
-pathFile: Path configuration file (MXP format).
(obsolete) Provides an extra bitmap path. Multiple paths can be entered and
-bitmapPath:
UNC naming conventions can be used.
(obsolete) Lets you specify extra XRef paths. Multiple paths can be entered
-xrefPath:
and UNC naming conventions can be used.
-split: Split render: number of strips, overlap amount.
Split render: number of strips, overlap amount, strip number (starting with 1).
This is similar to the -split switch, but lets you render a specific, individual
strip.
-strip:
NoteThe strip value has no effect when submitting the job to Backburner. The
job will still render all strips. Split and Stitch functionality is intended for local
rendering only.
Stitches strips (see above), combining them into a single image: number of
-stitch:
strips, overlap amount. Stitch functionality is intended for local rendering only.
Specifies a date format to be used in message timestamp, at verbosity level 5.
-dateFormat:
Defaults to locale-dependent format. For details, use the
3dsmaxcmd3dsvizcmd -x option.
Specifies a time format to be used in message timestamp, at verbosity level 5.
-timeFormat: Defaults to locale-dependent format and 24–hour clock. For details, use the
3dsmaxcmd -x option.
Render Parameters
NoteAny command-line switches that are on/off toggles can be switched by entering either 1, 0, on or off.
Switch Effect
-outputName: or -
Sets an output file name and format.
o:
-camera: or -cam: Specifies a camera name.
-width: or -w: Sets the output width in pixels.
-height: or -h: Sets the output height in pixels.
-pixelAspect: Sets the pixel aspect ratio.
-start: Sets the rendering sequence start frame.
-end Sets the rendering sequence end frame.
-nthFrame Sets the Every Nth Frame value.
-frames Lets you specify a frame list; for example, (1,3,5-12) or all.
Indicates that this is a still-frame render; no frame suffix will be
-stillFrame or -sf
added.
-imageSequenceFile: Image-sequence file creation: 0=none; 1=.imsq; 2=.ifl
-gammaCorrection: Toggles gamma correction. “1”=On, “0”=Off.
-gammaValueIn: Sets the Input Gamma value.
-gammaValueOut: Sets the Output Gamma value.
If an error is encountered, the software attempts to continue
-continueOnError
rendering.
-videopostJob: Turns Video Post on or off for the job.
Render Flags
Switch Effect
-showRFW: or -rfw: Toggles the Rendered Frame Window. “1”=On, “0”=Off.
-skipRenderedFrames: Toggles Skip Existing Images. “1”=On, “0”=Off.
-videoColorCheck: Toggles Video Color Check. “1”=On, “0”=Off.
-force2Sided: Toggles Force 2-Sided. “1”=On, “0”=Off.
-renderHidden: Toggles Render Hidden. “1”=On, “0”=Off.
-atmospherics: Toggles Atmospherics. “1”=On, “0”=Off.
-superBlack: Toggles Super Black. “1”=On, “0”=Off.
-renderFields: Toggles Render Fields. “1”=On, “0”=Off.
-fieldOrder:even or odd Toggles Field Order. Default=”Odd”.
-displacements: Toggles Displacement Mapping. “1”=On, “0”=Off.
-effects: Toggles Render Effects. “1”=On, “0”=Off.
-useAreaLights: Toggles area lights/shadows. “1”=On, “0”=Off.
-useAdvLight: Toggles use advanced lighting. “1”=On, “0”=Off.
-computeAdvLight: Toggles compute advanced lighting. “1”=On, “0”=Off.
-ditherPaletted: Toggles Output Dithering (paletted). “1”=On, “0”=Off.
-ditherTrueColor: Toggles Output Dithering (true-color). “1”=On, “0”=Off.
-renderElements: Toggles render elements (true-color). “1”=On, “0”=Off.
Backburner Job Submission
These switches concern submitting a rendering job for network rendering. For further information, see
Network Rendering. Also, for a different method of network rendering via the command line, see Backburner
Command Line Control.
Switch Effect
Submits the scene, to a specific manager system for network
-submit[:manager_name]
rendering.
or -s[:manager_name]
NoteThis is the only switch that requires a colon separator.
-port: Specifies a manager port number.
-netmask: Lets you specify a network mask other than 255.255.255.0.
-jobName: Lets you specify a job name to render.
-priority Sets job priority.
-suspended: Toggles initially suspended. “1”=Yes, “0”=No.
Writes all job settings to an XML file. The file uses the same name as the MAX
-writeJobFile
file, so, for example, test.max produces test.xml.
-readJobFile: Reads all job settings from an XML file.
-waitLoad: The amount of time to wait for 3ds Max Design to load, in minutes. Default=20.
-waitRender: The amount of time to wait for 3ds Max Design to render, in minutes. Default=600.
-waitUnload: The amount of time to wait for 3ds Max Design to unload, in minutes. Default=10.
The platform (either 32– or 64–bit) that your scene will be rendered on. Use this
–platform:32 or 64 switch when you want to render your scene on a different platform from the
platform where you created your scene.
Bitmap Parameters
Switch Effect
-BMP_TYPE:2 or 8 Sets the type of BMP file being rendered. “2”=paletted, “8”=true 24-bit.
-JPEG_QUALITY:1 to 100 Sets the JPG quality value. Ranges from 1 to 100.
-JPEG_SMOOTHING:1 to 100 Sets the JPG smoothing value. Ranges from 1 to 100.
-TARGA_COLORDEPTH:16, 24 or
Sets the color depth for TGA files.
32
-TARGA_COMPRESSED: Toggles TGA Compression. “1”=On, “0”=Off.
-TARGA_ALPHASPLIT: Toggles TGA Alpha Split. “1”=On, “0”=Off.
-TARGA_PREMULTALPHA: Toggles TGA Pre-Multiplied Alpha. “1”=On, “0”=Off.
Sets the TIF type. “0”=mono, “1”=color, “2”=logl, “3”=logluv, “4”=16–bit
-TIF_TYPE:
color.
-TIF_ALPHA: Toggles TIF file alpha. “1”=On, “0”=Off.
-TIF_COMPRESSION: Toggles TIF Compression. “1”=On, “0”=Off.
-TIF_DPI: Sets the dots-per-inch value for TIF files.
For each of the following -RLA_xxxx switches, there is a corresponding -RPF_xxxx option.
Switch Effect
-RLA_COLORDEPTH:8, 16 or 32 Sets the RLA color bitdepth.
-RLA_ALPHA:: Toggles RLA Alpha. “1”=On, “0”=Off.
-RLA_PREMULTALPHA: Toggles RLA Premultiplied Alpha. “1”=On, “0”=Off.
-RLA_DESCRIPTION: Lets you specify an RLA description (in quotes).
-RLA_AUTHOR: Lets you specify an RLA author name (in quotes).
-RLA_ZDEPTHCHANNEL: Toggles RLA Z-Depth Channel. “1”=On, “0”=Off.
-RLA_MTLIDCHANNEL: Toggles RLA Material Effects Channel. “1”=On, “0”=Off.
-RLA_OBJECTIDCHANNEL: Toggles RLA Object Channel. “1”=On, “0”=Off.
-RLA_UVCHANNEL: Toggles RLA UV Coordinates Channel. “1”=On, “0”=Off.
-RLA_NORMALCHANNEL: Toggles RLA Surface Normals Channel. “1”=On, “0”=Off.
Toggles RLA Non-Clamped Color Channel. “1”=On,
-RLA_NONCLAMPEDCOLORCHANNEL:
“0”=Off.
-RLA_COVERAGECHANNEL: Toggles RLA Coverage Channel. “1”=On, “0”=Off.
The following -RPF_xxxx switches do not have corresponding -RLA_xxxx options.
Switch Effect
-RPF_NODERENDERIDCHANNEL Turns on RPF Node Render ID Channel.
-RPF_COLORCHANNEL Turns on RPF Color Channel.
-RPF_TRANSPCHANNEL Turns on RPF Transparency Channel.
-RPF_VELOCCHANNEL Turns on RPF Velocity Channel.
-RPF_WEIGHTCHANNEL Turns on RPF Sub-Pixel Weight Channel.
-RPF_MASKCHANNEL Turns on RPF Sub-Pixel Mask Channel.
Switch Effect
-EXR_USEEXPONENT EXR use exponent on/off
-EXR_EXPONENT EXR exponent value (decimal)
-EXR_PREMULTALPHA EXR premultiplied alpha on/off
-EXR_ALPHA EXR save alpha component on/off
-EXR_RED EXR save red component on/off
-EXR_GREEN EXR save green component on/off
-EXR_BLUE EXR save blue component on/off
-EXR_BITDEPTH EXR bit depth: 0=8–bit integers; 1=half float; 2=float
-
EXR_USEFRAMENUMDIGIT EXR use number of frame digits on/off
S
-EXR_FRAMENUMDIGITS EXR number of frame digits (integer)
EXR compression type: 0=no compression; 1=RLE; 2=ZIP (1 scanline); 3=ZIP
-EXR_COMPRESSIONTYPE
(16 scanlines); 4=PIZ
-EXR_USEREALPIX EXR use RealPix RGB data on/off
Please send us your comment about this page
Command-Line Rendering Switches
Command-Line Rendering
Effects and Environments
Autodesk 3ds Max Design Help > Rendering > Command-Line Rendering >
Backburner Command Line Control
The Backburner command line plug-in allows you to submit batch, executable, or script files to Backburner
as “custom” jobs. This cmdjob.exe tool, found in the Backburner program folder, provides more flexibility in
running custom jobs than is offered by the 3ds Max Design 3dsmaxcmd.exe plug-in.
For a list of the command-line switches that you can use with the Backburner command line plug-in, see
Command-Line Rendering Switches. Some examples of how these commands can be used with 3ds Max
Design are listed below.
NoteIn order to use command-line rendering, you should be familiar with DOS and understand the structure
of command lines.
Examples of CmdJob Usage
Setting a registry value on all render servers
The following command line string will run regedit on all machines and add the registry key and string
value specified in the bb.reg file (see below).
cmdjob -jobname "set bb registry" -manager managername -perserver regedit /s
\\fileserver\pcsetup\bb.reg
The bb.reg file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\backburner\2008.1]
"CfgPath"="c:\\Program Files\Autodesk\Backburner\\Network\\nrapi.conf"
NoteAs Autodesk Backburner is a 32-bit application only, this key will be found in the 32-bit registry of
a Windows x64 system. Consult the Windows x64 documentation for accessing the 32-bit registry.
Getting registry values on all render servers and reporting it back to a central location
Runs regedit on all machines and saves the registry settings from Backburner keys to a file on
\\fileserver\pcsetup.
cmdjob –jobname “get bb registry” –manager managername –perserver regedit /e
\\fileserver\pcsetup\%computername%_bbregistry.reg
“HKEY_Local_machine\software\Autodesk\Backburner\2008.1”
Batch Export of Objects in a Series of MAX Files
Running the following batch file export all objects out of a series of 3ds Max Design files on a file
server using 3ds Max Design and MAXScript.
The export.ms file:
exportFile (maxfilepath + maxfilename + ".obj") #noPrompt using:
Wavefront_ObjectExporterPlugin
The batch file:
rem begin batch file
dir \\fileserver\maxfiles\*.max /s /b >c:\fileslist.txt
c:
cd "\Program Files\Autodesk\3ds Max 2009"
cmdjob -jobname "batch export objects from max files" -manager managername
-tasklist c:\filelist.txt 3dsmax.exe %%tp1 -U MAXScript
\\fileserver\scripts\export.ms
rem end batch file
The second line of the batch file (dir) writes out the list of files to fileslist.txt. (see image below) This
text file is used as the tasklist. In the cmdjob line, the –taskname parameter has the value 1 which,
means that each task will get its taskname from the first column of the taskfile. The %tp1 parameter
specified after “3dsmax.exe” tells the cmdjob plugin to use task parameter 1 (column 1) from the
tasklist as an argument to pass to 3dsmax.exe.
The tasklist text file
The Task Summary in the Queue Monitor.
Controlling Adobe After Effects Rendering
The concept for controlling After Effects rendering is similar to creating a batch export of objects. To
effectively control After Effects, you need to use a tasklist. For example, you want to render frames 0
to frame 250 of an After Effects file named aetest.aep. This file has one comp (Comp1). In your render
farm, 10 servers are available to use for rendering. So the tasklist is defined in a tab-delimited file with
three columns: The first column is used as the taskname –taskname 1; the second column used is
referred to as %tp2; and the third column is %tp3. The last two parameters are passed as arguments
for the start and end frame for aerender.exe
cmdjob –jobname “after effects test” –manager managername –taskfile c:\aejobs\tasklist.txt –
taskname 1 c:\ae6.5\aerender.exe –project c:\aejobs\aetest.aep –comp “comp1” –s %tp2 –e %tp3
The tasklist.txt file:
frames 0-
0 24
24
frames
25 49
25-49
frames
50 74
50-74
frames
75 99
75-99
frames
100 124
100-124
frames
125 149
125-149
frames
150 174
150-174
frames
175 199
175-199
frames
200 224
200-224
frames
225 250
225-250
See Also
Command-Line Rendering
Please send us your comment about this page