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 \3dsmax6 folder. You can submit command-line rendering jobs that are rendered on a single workstation, or you can take advantage of network rendering and send the job to multiple systems. 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. 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. Open a command prompt window (for example, Windows Start > Run). Enter the following: c:\3dsmax6\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 d 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. Open a command prompt window. Enter the following: c:\3dsmax6\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: Open a command prompt window. Enter the following: c:\3dsmax6\3dsmaxcmd c:\3dsmax6\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. Open a command prompt window. Enter the following: c:\3dsmax6\3dsmaxcmd -outputName:c:\3dsmax6\images\myImage.jpg -w 800 -h 600 c:\3dsmax6\scenes\myScene.max
and press ENTER. 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. Open a command prompt window. Enter the following: c:\3dsmax6\3dsmaxcmd -submit c:\3dsmax6\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. Note: A TXT file can specify only a single scene to render. For multiple scenes, use a BAT file. Open your text editor. 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. To render the scene, open the Windows Start > Run dialog. Enter the following: c:\3dsmax6\3dsmaxcmd @c:\3dsmax6\MyRender.txt -o=c:\3dsmax6\images\MyScene.tga c:\3dsmax6\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. Open your text editor. 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:\3dsmax6\3dsmaxcmd.exe -o=c:\3dsmax6\images\Scene1.jpg -w=320 -h=240 -frame=1-33 c:\3dsmax6\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:\3dsmax6\3dsmaxcmd.exe -o=c:\3dsmax6\images\Scene2.jpg -w=640 -h=480 -force2Sided=true -videoColorCheck=true c:\3dsmax6\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:\3dsmax6\3dsmaxcmd.exe @c:\3dsmax6\FinalRender.txt -o=c:\3dsmax6\images\Scene3.jpg c:\3dsmax6\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. Click OK to start rendering. See also
Command-Line Rendering Switches
-------------------------------------------------------------------------------- Comments
|