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.

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, and then open (run) the file.
  4. Click OK to start rendering.
See Also
  • Command-Line Rendering Switches

    In order to use command-line rendering, you should be familiar with DOS and understand the structure of command lines.

  • 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 Max3dsmaxcmd.exe plug-in.