×
Menu

7.2 Command line rendering


 
This chapter explains the flags specific to Iray for Maya in more detail.
 
Enter the following command in a shell to display a list of all command-line flags for Iray for Maya:
 
To see the available flags for Iray Photoreal:
 
Render -r Iray -help
 
To see the available flags for Iray Interactive:
 
Render -r IrayInteractive -help
 
In the following examples, the scene filename scenename.mb is used as an example of a Maya binary scene file.
 
-of
Defines the output format of the rendered image. Available are jpg, exr, mexr, png, tga, and tif. See Render settings for a detailed description of the format options.
 
-scale
This flag describes the multiplier for the scaling of the image resolution set in the Render Settings window. A value of .5 renders half of the resolution set in the Render Globals. A value of 2 doubles the resolution set in the Render Globals.
 
-percentRes
This flag describes the percentage of the of the image resolution set in the Render Settings window. A value of 50 renders half of the resolution set in the Render Globals. A value of 200 doubles the resolution set in the Render Globals.
 
-activateRegion
Activate/Deactivate region. This flag overwrites the attribute [Active in the Iray Render Settings ➤ Output ➤ Region].
 
-region
Sets a rendering region of the final image. This flag overwrites the attributes Left, Right, Top and Bottom in the [Iray Render Settings ➤ Output ➤ Region]. The flag -region always defines a part of the image relative to the final resolution. -region 0 0.5 0 1 always describes the space (in this case the left part of the image) in the rendered image independent of the defined resolution.
 
-window
Sets a rendering window of the final image. This flag asks for integer numbers to define the window to be rendered. The flag -window defines an absolute part of the image. -window 0 99 0 99 always renders a part of the image with a size of 100 x 100 pixels on the top-left side of the image independent of the defined resolution.
 
-tiling
This flag allows an easy access to set up a tile rendering. The first two numbers define the number of tiles the images is splitted. The second two numbers describe the tile to be rendered. For example: -tiling 2 2 1 1 splits the image in 2 horizontal and 2 vertical tiles and renders tile in the upper left corner.
 
-filterRadius
Overrides the size of the pixel sample for the selected Filtering.
 
-minSamples
Specify this flag to overwrite the value set for Min. Samples in the Render Settings window. This value must be an integer.
 
-maxSamples
Specify this flag to overwrite the value set for Max. Samples in the Render Settings window. This value must be an integer.
 
-intermediateWrite
Use this flag if you want to let Iray write an image after a specified number of samples. There are two behaviours possible: Write at predefined number of samples or write after defined steps of samples.
 
To get images, for example, after 500, 1250, and 4000 samples for a Maya file named scenename.mb, write:
 
Render -r Iray -intermediateWrite select 500,1250,4000 scenename.mb
 
To get images every 500 samples, write:
 
Render -r Iray -intermediateWrite step 500 scenename.mb
 
If you do not want to overwrite the image for every step written and keep each step as a separate image, use the following syntax:
 
Render -r Iray -intermediateWrite step 500 -of exr -im imagename_[Sampels:4] scenename.mb
 
The syntax [Samples:4] sets the number of digits used for the consecutive number of samples. So after every 500 samples a new image will be written named imagename_0500.exr, imagename_1000.exr, imagename_1500.exr, and so on.
 
-postDenoiser
This flag enables the postDenoiser. It has three options:
0 = postDenoiser is disabled
1 = postDenoiser is enabled. Only the denoised image is written
2 = postDenoiser is enabled. The original image and the denoised image are written.
 
-maxTime
Specify this flag to overwrite the value set for Max. Time in the Render Settings window. The format is days hours minutes. Each value must be an integer.
 
-queryR
Print resources. This flag shows the available rendering resources available on the computer and displays detailed hardware information and the corresponding resource number.
 
-rOff
Disable resource. Use this flag to disable specific render resources identified by the resource number.
 
-rOn
Enable resource. Use this flag to enable specific render resources identified by the resource number.
 
-rt
Set active threads. Use this flag to set the number of threads when rendering using CPUs. Make sure that even one thread is available for each GPU when rendering in mixed mode (GPU and CPU)
 
To see which render resources are used by a scene type, enter:
 
Render -r Iray -queryR scenename.mb
 
The output should look something like this:
 
Resource 0 (disabled):CPUs
Active Threads:12
 
Resource 1 (disabled):  Quadro K5000
Memory:                  4095 MB
Cuda Device Id:          1
Cuda Compute Capability: 0 - 3
Clock Rate:              688 MHz
Multi Processor Count:   8
 
Resource 2 (enabled):   Tesla K20c
Memory:                  5119 MB
Cuda Device Id:          0
Cuda Compute Capability: 5 - 3
 
You can see that the numbering for the different render resources and which resources are used for the command line rendering and which not. These settings are exactly the one you set in [Window ➤ Rendering Editors ➤ Iray ➤ Resource Manager].
 
If you want to use all resources for the command line rendering, you have to type:
 
Render -r Iray -rOn 0 -rOn 1 -rOn 2 scenename.mb
 
If you want to use only the GPU resources for the command line rendering, you have to type:
 
Render -r Iray -rOff 0 -rOn 1 -rOn 2 scenename.mb