Command Line Rendering

Command line rendering in 3ds Max 6 and higher also allows MAXScript execution - so-called pre-render scripts can be executed before the rendering starts. Below are the supported command line options, including the one related to MAXScript.

Note: As of 3ds Max 2016, output sent to STDOUT by scripts and rendering plug-ins is in UTF-16. You must run the command shell with the /u option to support Unicode output, or output text will appear garbled.

Command Line Options

-? 

Displays a short help listing the options

@command_file 

Command line options in a file. That is, you can list all the options you want in a text file, one per line and pass the file as the command line argument.

-c:camera_name 

Define camera to render

-f:frames 

Frame list "1,10,30-100" or "all"

-g 

Generate job description file (XML). You can use this option to create a job description file from scratch (in order to edit and resubmit it). The tool will parse the scene file, accept whatever other command line option you've given and create a proper job description file.

-h:height 

New output height

-j:job_file 

Use job description file. You would use this to pass an exiting job description file.

-n:job_name 

New job name. Used to rename a job. This is only an issue when submitting a scene to the network. The job description file and the scene file must be the name of the scene. As there cannot be two jobs with a same name, you use this to rename it prior to submitting it to the network.

-k:network_mask 

Defines a network mask other than 255.255.255.0. Only an issue when submitting a scene to the network. If you don't know what this is, you don't need it. If you need it and you don't know it, this is one of those occasions you must (no matter how much I hate those messages) talk to your network administrator.

-o:output_file 

New output file. Defines a new path and name for the output image file max will be rendering to.

Note:

You cannot change the file type (i.e. from Jpeg to AVI) as there is no way to set these from outside max. If you try giving a different extension the tool will simply ignore it and use the original one.

-p:port 

Manager port (for submission). Only an issue when submitting a scene to the network. If you don't know what this is, you don't need it.

-r 

Render (not to be used with -s). This is the default (if no option is given). It exists because if you use the -g option, the scene won't render unless you have this option. That is, this is the default unless you specify -g.

-s[:manager_name] 

Submit to job to network queue (and optionally providing a manager's name or IP address). It cannot be used with -r.

-t:script_file 

Attaches a pre-render MAXScript. Use this option to attach a MAXScript to the scene. If used, the script will be executed prior to the renderer starting. Note that you can use this for both local render (-r) and network render (-s). If submitting to the network, the script will be archived along with the scene and sent to all servers participating. The script can be any MAXScript without UI access.

Warning:

Care should be taken in order to avoid calling any UI functions - they will not work and may cause servers to get stuck!

-v:level 

Verbose level (0 - 5). How much you want the tool to tell you what it is doing. A value of 0 will give you absolutely nothing. A value of 1 will only show errors. A value of 2 will give you errors and some progress information. Values 3, 4, and 5 will give you progressively more information.

-w:width 

New output width.

-x 

Show examples. Use this option to see some examples for the above options.