This page may include unlocalized contents


Command Line Rendering - redshiftCmdLine

 

Table Of Contents

 

Overview

Redshift can render scenes outside of a host application using the Redshift CmdLine tool. Exporting a scene for rendering with the Redshift CmdLine tool is as easy as exporting a Redshift proxy. Each frame of an animation is exported as a standalone Proxy file, which is then loaded into Redshift CmdLine and rendered.


Exporting a scene

In order to render a scene with the CmdLine tool the proxy must contain all of the necessary elements for your project including the render camera, lights, materials, geometry, animation, global render options, and AOV setup. Set these things up before exporting your proxy.

The output name for the render files can't be changed after a proxy is created, this protects the AOVs there were set up in the host application. However, the output folder can be changed using the -oip argument.

 

 

Launching the Command Line tool and rendering a scene

To render a scene with the command line renderer first we need to understand the syntax expected by the redshiftCmdLine. The syntax describes the formatting and order necessary to render a scene.

The most important part of the syntax is to first designate the redshiftCmdLine path and then designate the path of the Redshift Proxy file. The order and the formatting of this is very important, there must be a space between both paths and they must come in this order:

(redshiftCmdLine path) (proxy file path)

 

On Windows

Using the Windows Command Prompt we can start rendering our scene. In the command prompt window first we need to designate the path to the redshiftCmdLine tool, by default this is found at: C:\ProgramData\redshift\bin\redshiftCmdLine.exe. The proxy file path should point to the proxy file on your PC. A real world example looks like this:

C:\ProgramData\redshift\bin\redshiftCmdLine.exe C:\demo\proxy\RS_Proxy_Demo.rs

 

Typing the above into a Command Prompt and hitting enter will start rendering the scene but there are many ways to use the Command Prompt, like dragging and dropping first the redshiftCmdLine and then the Redshift Proxy file directly into an open command prompt with a space in between. Each time a file is dragged into the window, the path is automatically copied into the command prompt as demonstrated in the video below.

Using the redshiftCmdLine in Windows

 

On Mac

Using the Mac Terminal we can start rendering our scene. In the terminal window first we need to designate the path to the redshiftUsdCmdLine tool, by default this is found at: /Applications/redshift/bin/redshiftCmdLine. The USD file path should point to the USD file on your Mac. A real world example looks like this:

/Applications/redshift/bin/redshiftCmdLine /Users/username/Documents/RS_proxy.rs

 

Typing the above into a Terminal window and hitting enter will start rendering the scene but there are many ways to use the terminal, like dragging and dropping first the redshiftCmdLine and then the Redshift Proxy file directly into an open terminal with a space in between. Each time a file is dragged into the window, the path is automatically copied into the terminal.

 

Command Line Arguments

Command line arguments are options that can be used to modify the behavior of the tool and the rendered output. These are added after the proxy file path, this describes the order:

(redshiftCmdLine path) (proxy file path) (command line arguments)

 

Here is a real world example, note the space between each section:

C:\ProgramData\redshift\bin\redshiftCmdLine.exe C:\demo\proxy\RS_Proxy_Demo.rs -oip C:\demo\proxy\images

 

To see a list of available arguments, run the redshiftCmdLine without any arguments.


Example: Overriding the folder path of the rendered images

When rendering with redshiftCmdLine, by default the images are saved in the path chosen in the 3d app. This can be undesirable because that path might be pointing to a folder that doesn't exist in the computer running redshiftCmdLine!

For this example let's assume our proxy file "myscene.rs" normally renders the following two images in a network folder (drive "z").

z:\myprojectpath\images\myscene.exr

z:\myprojectpath\images\myscene.diffuseLighting.exr

 

If drive "z" is not accessible from the computer we're currently rendering from, we can redirect the images to c:\myfolder via the -oip argument as shown below:

redshiftCmdLine myscene.rs -oip c:\myfolder

 

Doing so will render the images to the following path instead:

c:\myfolder\myscene.exr
c:\myfolder\myscene.diffuseLighting.exr

 

Example: Overriding render options

Render options can be overridden using the -oro argument. In this example let's assume we want to force the unified min/max settings to min:16 and max:64.

First we need to create a text file (in this case: myrenderoptionsoverrides.txt) containing the following two lines:

UnifiedMinSamples 16
UnifiedMaxSamples 64

 

Then, we pass this text file to redshiftCmdLine as follows:

redshiftCmdLine myscene.rs -oro myrenderoptionoverrides.txt

 

This renders myscene.rs with the two unified sampling overrides.

 

Example: Listing all render options

Running redshiftCmdLine with the -listrenderoptions argument lists the available render options, as shown in the dropdown below.

redshiftCmdLine -listrenderoptions