In order to use command-line rendering, you should be familiar with DOS and understand the structure of command lines.
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.
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.
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.
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”
Switch | Effect |
---|---|
-? | Displays a list of these switches in the DOS window. |
-x | Shows a list of example command lines. |
-v:# | Sets the verbosity level, where # is an integer from 0 (least verbose) to 5 (most verbose). |
@command_file or -cmdFile:command_file | Points to a separate file containing command-line options. |
-preset:<filename> or -rps:<filename> | Uses a render preset file where <filename> is the name of the preset file. |
-sceneState:<scene-state-name> | Loads the specified scene state file before rendering the image. |
-batchRender | Renders all enabled tasks in the Batch Render dialog. |
-batchRender:<batch-render-name> | Renders batch renders in the file named batch-render-name. |
-preRenderScript:<filename> or -script:<filename> | Uses a pre-render script where <filename> is the name of the script file. |
-postRenderScript:<filename> | Uses a post-render script where <filename> is the name of the script file. |
-workPath:<pathname> | Root location for job data folders. |
-pathFile:<pathname> | Path configuration file (MXP format). |
-bitmapPath:<pathname> | (obsolete) Provides an extra bitmap path. Multiple paths can be entered and UNC naming conventions can be used. |
-xrefPath:<pathname> | (obsolete) Lets you specify extra XRef paths. Multiple paths can be entered and UNC naming conventions can be used. |
-split:<strips, overlap> | Split render: number of strips, overlap amount. |
-strip:<strips, overlap, strip> | 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. |
-stitch:<strips, overlap> | Stitches strips (see above), combining them into a single image: number of strips, overlap amount. Stitch functionality is intended for local rendering only. |
-dateFormat:<dateformat> | Specifies a date format to be used in message timestamp, at verbosity level 5. Defaults to locale-dependent format. For details, use the 3dsmaxcmd3dsvizcmd -x option. |
-timeFormat:<timeformat> | Specifies a time format to be used in message timestamp, at verbosity level 5. Defaults to locale-dependent format and 24–hour clock. For details, use the 3dsmaxcmd -x option. |
Switch | Effect |
---|---|
-outputName:<filename> or -o:<filename> | Sets an output file name and format. |
-camera:<string> or -cam:<string> | Specifies a camera name. |
-width:<integer> or -w:<integer> | Sets the output width in pixels. |
-height:<integer> or -h:<integer> | Sets the output height in pixels. |
-pixelAspect:<number> | Sets the pixel aspect ratio. |
-start:<integer> | Sets the rendering sequence start frame. |
-end<integer> | Sets the rendering sequence end frame. |
-nthFrame<integer> | Sets the Every Nth Frame value. |
-frames<string> | Lets you specify a frame list; for example, (1,3,5-12) or all. |
-stillFrame or -sf | Indicates that this is a still-frame render; no frame suffix will be added. |
-imageSequenceFile:<0/1/2> | Image-sequence file creation: 0=none; 1=.imsq; 2=.ifl |
-gammaCorrection:<1/0> | Toggles gamma correction. “1”=On, “0”=Off. |
-gammaValueIn:<number> | Sets the Input Gamma value. |
-gammaValueOut:<number> | Sets the Output Gamma value. |
-continueOnError | If an error is encountered, 3ds Max attempts to continue rendering. |
-videopostJob:<1/0> | Turns Video Post on or off for the job. |
Switch | Effect |
---|---|
-showRFW:<1/0> or -rfw:<1/0> | Toggles the Rendered Frame Window. “1”=On, “0”=Off. |
-skipRenderedFrames:<1/0> | Toggles Skip Existing Images. “1”=On, “0”=Off. |
-videoColorCheck:<1/0> | Toggles Video Color Check. “1”=On, “0”=Off. |
-force2Sided:<1/0> | Toggles Force 2-Sided. “1”=On, “0”=Off. |
-renderHidden:<1/0> | Toggles Render Hidden. “1”=On, “0”=Off. |
-atmospherics:<1/0> | Toggles Atmospherics. “1”=On, “0”=Off. |
-superBlack:<1/0> | Toggles Super Black. “1”=On, “0”=Off. |
-renderFields:<1/0> | Toggles Render Fields. “1”=On, “0”=Off. |
-fieldOrder:even or odd | Toggles Field Order. Default=”Odd”. |
-displacements:<1/0> | Toggles Displacement Mapping. “1”=On, “0”=Off. |
-effects:<1/0> | Toggles Render Effects. “1”=On, “0”=Off. |
-useAreaLights:<1/0> | Toggles area lights/shadows. “1”=On, “0”=Off. |
-useAdvLight:<1/0> | Toggles use advanced lighting. “1”=On, “0”=Off. |
-computeAdvLight:<1/0> | Toggles compute advanced lighting. “1”=On, “0”=Off. |
-ditherPaletted:<1/0> | Toggles Output Dithering (paletted). “1”=On, “0”=Off. |
-ditherTrueColor:<1/0> | Toggles Output Dithering (true-color). “1”=On, “0”=Off. |
-renderElements:<1/0> | Toggles render elements (true-color). “1”=On, “0”=Off. |
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 |
---|---|
-submit[:manager_name] or -s[:manager_name] | Submits the scene, <filename> to a specific manager system for network rendering. |
-port:<integer> | Specifies a manager port number. |
-netmask:<string> | Lets you specify a network mask other than 255.255.255.0. |
-jobName:<string> | Lets you specify a job name to render. |
-priority<integer> | Sets job priority. |
-suspended:<1/0> | Toggles initially suspended. “1”=Yes, “0”=No. |
-writeJobFile | Writes all job settings to an XML file. The file uses the same name as the MAX file, so, for example, test.max produces test.xml. |
-readJobFile:<filename> | Reads all job settings from an XML file. |
-waitLoad:<integer> | The amount of time to wait for 3ds Max to load, in minutes. Default=20. |
-waitRender:<integer> | The amount of time to wait for 3ds Max to render, in minutes. Default=600. |
-waitUnload:<integer> | The amount of time to wait for 3ds Max to unload, in minutes. Default=10. |
–platform:32 or 64 | The platform (either 32– or 64–bit) that your scene will be rendered on. Use this switch when you want to render your scene on a different platform from the platform where you created your scene. |
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 32 | Sets the color depth for TGA files. |
-TARGA_COMPRESSED:<1/0> | Toggles TGA Compression. “1”=On, “0”=Off. |
-TARGA_ALPHASPLIT:<1/0> | Toggles TGA Alpha Split. “1”=On, “0”=Off. |
-TARGA_PREMULTALPHA:<1/0> | Toggles TGA Pre-Multiplied Alpha. “1”=On, “0”=Off. |
-TIF_TYPE:<0/1/2/3/4> | Sets the TIF type. “0”=mono, “1”=color, “2”=logl, “3”=logluv, “4”=16–bit color. |
-TIF_ALPHA:<1/0> | Toggles TIF file alpha. “1”=On, “0”=Off. |
-TIF_COMPRESSION:<1/0> | Toggles TIF Compression. “1”=On, “0”=Off. |
-TIF_DPI:<number> | 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:<1/0>: | Toggles RLA Alpha. “1”=On, “0”=Off. |
-RLA_PREMULTALPHA:<1/0> | Toggles RLA Premultiplied Alpha. “1”=On, “0”=Off. |
-RLA_DESCRIPTION:<string> | Lets you specify an RLA description (in quotes). |
-RLA_AUTHOR:<string> | Lets you specify an RLA author name (in quotes). |
-RLA_ZDEPTHCHANNEL:<1/0> | Toggles RLA Z-Depth Channel. “1”=On, “0”=Off. |
-RLA_MTLIDCHANNEL:<1/0> | Toggles RLA Material ID Channel. “1”=On, “0”=Off. |
-RLA_OBJECTIDCHANNEL:<1/0> | Toggles RLA Object Channel. “1”=On, “0”=Off. |
-RLA_UVCHANNEL:<1/0> | Toggles RLA UV Coordinates Channel. “1”=On, “0”=Off. |
-RLA_NORMALCHANNEL:<1/0> | Toggles RLA Surface Normals Channel. “1”=On, “0”=Off. |
-RLA_NONCLAMPEDCOLORCHANNEL:<1/0> | Toggles RLA Non-Clamped Color Channel. “1”=On, “0”=Off. |
-RLA_COVERAGECHANNEL:<1/0> | 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<1/0> | 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_USEFRAMENUMDIGITS | EXR use number of frame digits on/off |
-EXR_FRAMENUMDIGITS | EXR number of frame digits (integer) |
-EXR_COMPRESSIONTYPE | EXR compression type: 0=no compression; 1=RLE; 2=ZIP (1 scanline); 3=ZIP (16 scanlines); 4=PIZ |
-EXR_USEREALPIX | EXR use RealPix RGB data on/off |