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 3dsvizcmd.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.
Warning: Command-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.
To view the 3dsvizcmd help file:
The 3dsvizcmd.exe file contains a built-in help system that you can access from a command prompt.
To view a list of sample command lines with descriptions of what they do:
The 3dsvizcmd.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.
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:
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.
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.
Note: A command-line job cannot be run on a system already running the Backburner server.
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.
Note: A TXT file can specify only a single scene to render. For multiple scenes, use a BAT file.
Enter your list of commands, such as:
-bitmapPath=\\mapServer\maps\myMaps -cam=myCamera -width=800 -height=600 -vfb=true -frames=all -force2Sided=true
Once all the switches are entered, save the files as a TXT file, such as myrender.txt.
c:\program files\viz2008\3dsvizcmd @c:\program files\viz2008\myrender.txt -o=c:\program files\viz2008\images\myscene.tga c:\program files\viz2008\scenes\myscene.max
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.
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\viz2008\3dsvizcmd.exe -o=c:\program files\viz2008\images\scene1.jpg -w=320 -h=240 -frame=1-33 c:\program files\viz2008\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\viz2008\3dsvizcmd.exe -o=c:\program files\viz2008\images\scene2.jpg -w=640 -h=480 -force2Sided=true -videoColorCheck=true c:\program files\viz2008\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\viz2008\3dsmaxcmd.exe @c:\program files\viz2008\finalrender.txt -o=c:\program files\viz2008\images\scene3.jpg c:\program files\viz2008\scenes\scene3.max
After entering these three command lines, save your file as a BAT file.
From the Windows Start > Run dialog, browse to the BAT file and click Open.