The redshiftCmdLine tool

Table Of Contents


How To Export Scenes

Exporting a scene from a 3d app is very similar to exporting a Redshift proxy. In fact, a scene file is a proxy file! Its only difference with a regular proxy file is that it contains not only shaders, geometry and lights but also the current camera, global render options and AOV setup.




Arguments

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


Redshift Command-Line Renderer (version 2.6.10 - API: 2601)
Copyright 2017 Redshift Rendering Technologies
Not enough parameters
Usage:
redshiftCmdLine scenefile [-oip PATH] [-opbp PATH] [-oro FILENAME]
[-gpu N] [-cachepath PATH] [-texturecachebudget N]
or
redshiftCmdLine -listrenderoptions
or
redshiftCmdLine -fileinfo proxyFilename
or
redshiftCmdLine -printdependencies proxyFilename
Parameters:
scenefile is the .rs proxy file containing the scene to be rendered
-oip followed by a path, overrides the image file paths
This includes the paths of all the AOVs
For example, if a scene normally renders images:
z:\myprojectpath\images\myscene.exr
z:\myprojectpath\images\myscene.diffuseLighting.exr
You can redirect them to c:\myfolder by doing:
redshiftCmdLine test.rs -oip c:\myfolder
This will produce images:
c:\myfolder\myscene.exr
c:\myfolder\myscene.diffuseLighting.exr
-opbp followed by a path, overrides the point-based technique file paths
This includes the photon mapping, irradiance point cloud, irradiance cache
and subsurface scattering generated or loaded files
For example, say a scene produces an irradiance point cloud file at:
z:\myprojectpath\pointcloudfiles\irradiance_pointcloud_auto.234.rsmap
You can redirect the point cloud files go to c:\myfolder by doing:
redshiftCmdLine test.rs -opbp c:\myfolder
This will produce the file:
c:\myfolder\irradiance_pointcloud_auto.234.rsmap
-ores followed by a resolution of the form <w>x<h>, overrides the output resolution
For example, to render the images in 1920x1080 resolution do:
redshiftCmdLine test.rs -ores 1920x1080
-oro followed by a filename, overrides render options using a text file
The text file should contain option name-value pairs on each line, for example:
UnifiedMaxSamples 1500
UnifiedFilterSize 3.4
ProgressiveRenderingEnabled false
MotionBlurEnabled true
UnifiedFilterType RS_AAFILTER_MITCHELL
To list the render options, use -listrenderoptions
-gpu followed by the device ordinal N enables that GPU for rendering
For example, to render scene 'test.rs' with the first two GPUs, do:
redshiftCmdLine test.rs -gpu 0 -gpu 1
-cachepath followed by a PATH, sets the cache path folder
The default Windows cache folder is '%LOCALAPPDATA%\Redshift\Cache'
The default Linux cache folder is '$REDSHIFT_LOCALDATAPATH/cache'
-texturecachebudget sets the texture cache size (in megabytes)
For example, to render scene 'test.rs' and set the tex cache to 20GB, do:
redshiftCmdLine test.rs -texturecachebudget 20000
-listrenderoptions lists the available render options and exits
-crop followed by cropOffsetX cropOffsetY cropWidth and cropHeight in pixels sets
a custom cropped region to be rendered/n For example, to set the crop region to (10,10) - (30, 30), do:
redshiftCmdLine test.rs -crop 10 10 20 20
-fileinfo followed by the proxy path, prints out various bits of
information about the proxy file
-printdependencies followed by the proxy path, prints out a list of
the files referenced by this proxy


Example: Overriding the path of the final rendered images

When rendering 3d-app-exported scene file with redshiftCmdLine, the rendered images will be saved in the path chosen in the 3d app.
This, however, this can be undesirable because that path might be pointing to a folder that doesn't exist in the computer running redshiftCmdLine!
Let's assume that our scene proxy file "myscene.rs" normally renders these 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 produce images:


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


Example: Dumping the list of render options

Running redshiftCmdLine with the -listrenderoptions argument will list the available render options, as shown below.


redshiftCmdLine -listrenderoptions


Num available options: 200
0: FrameID (Type: uint)
1: BlockRenderingOrder (Type: string)
        RS_BLOCKRENDERINGORDER_SCANLINE_X - Horizontal
        RS_BLOCKRENDERINGORDER_SPIRAL - Spiral
        RS_BLOCKRENDERINGORDER_HILBERT - Hilbert
2: BlockSize (Type: uint)
3: ProgressiveRenderingEnabled (Type: bool)
4: ProgressiveRenderingNumPasses (Type: uint)
5: ProgressiveRenderingDownrezRate (Type: uint)
6: UnifiedMinSamples (Type: uint)
7: UnifiedMaxSamples (Type: uint)
8: UnifiedAdaptiveErrorThreshold (Type: float)
9: UnifiedFilterType (Type: string)
        RS_AAFILTER_BOX - Box
        RS_AAFILTER_TRIANGLE - Triangle
        RS_AAFILTER_GAUSS - Gauss
        RS_AAFILTER_MITCHELL - Mitchell
        RS_AAFILTER_LANCZOS - Lanczos
10: UnifiedFilterSize (Type: float)
11: UnifiedMaxOverbright (Type: float)
12: UnifiedDebugDrawSamples (Type: bool)
13: UnifiedDisableDivision (Type: bool)
14: UnifiedRandomizePattern (Type: bool)
15: MotionBlurEnabled (Type: bool)
16: MotionBlurDeformationEnabled (Type: bool)
17: MotionBlurNumTransformationSteps (Type: uint)
18: MotionBlurNumDeformationSteps (Type: uint)
19: MotionBlurFrameDuration (Type: float)
20: MotionBlurShutterStart (Type: float)
21: MotionBlurShutterEnd (Type: float)
22: MotionBlurShutterPosition (Type: string)
        RS_MOTIONBLUR_SHUTTERPOSITION_CENTERONFRAME - Center on frame
        RS_MOTIONBLUR_SHUTTERPOSITION_STARTONFRAME - Start on frame
        RS_MOTIONBLUR_SHUTTERPOSITION_ENDONFRAME - End on frame
23: MotionBlurShutterEfficiencyType (Type: string)
        RS_MOTIONBLUR_SHUTTEREFFICIENCYTYPE_TRAPEZOIDAL - Trapezoidal
        RS_MOTIONBLUR_SHUTTEREFFICIENCYTYPE_LOOKUPTABLE - Lookup table
24: MotionBlurShutterEfficiencyForTrapezoidal (Type: float)
25: DenoiseEngine (Type: string)
        RS_DENOISEENGINE_NONE - None
        RS_DENOISEENGINE_ALTUS_SINGLEPASS - Altus single pass
        RS_DENOISEENGINE_ALTUS_DUALPASS - Altus dual pass
        RS_DENOISEENGINE_OPTIX - OptiX
26: DenoiseAltusKC1 (Type: float)
27: DenoiseAltusKC2 (Type: float)
28: DenoiseAltusKC4 (Type: float)
29: DenoiseAltusKF (Type: float)
30: DenoiseAutoCreateAovs (Type: bool)
31: DenoiseSaveBuffers (Type: bool)
32: Do8BitQuantizationAndDithering (Type: bool)
33: MaxTraceDepthReflection (Type: uint)
34: MaxTraceDepthRefraction (Type: uint)
35: MaxTraceDepthCombined (Type: uint)
36: MPWHairEnabled (Type: bool)
37: MPWHairAutoThreshold (Type: bool)
38: MPWHairThreshold (Type: float)
39: MPWHairTraceDepth (Type: uint)
40: RussianRouletteImportanceThreshold (Type: float)
41: RussianRouletteFalloff (Type: float)
42: ImportanceEnable (Type: bool)
43: DirectLightingShadowCutOffThreshold (Type: float)
44: DiffuseSamplingCutOffThreshold (Type: float)
45: ReflectionSamplingCutOffThreshold (Type: float)
46: RefractionSamplingCutOffThreshold (Type: float)
47: GlossyRayMaxOverbright (Type: float)
48: DirectLightingCutOffThreshold (Type: float)
49: SpecularEnable (Type: bool)
50: ReflectionsEnable (Type: bool)
51: RefractionsEnable (Type: bool)
52: SubsurfaceScatteringEnable (Type: bool)
53: EmissionEnable (Type: bool)
54: TessellationDisplacementEnable (Type: bool)
55: EnableMaterialsMaxCombinedOverrides (Type: bool)
56: DomeLightsAffectedByRefractionEnable (Type: bool)
57: AreaLightsAffectedByRefractionEnable (Type: bool)
58: ReflectSamplesEnabled (Type: bool)
59: ReflectSamplesMode (Type: uint)
60: ReflectSamplesCount (Type: uint)
61: ReflectSamplesScale (Type: float)
62: RefractSamplesEnabled (Type: bool)
63: RefractSamplesMode (Type: uint)
64: RefractSamplesCount (Type: uint)
65: RefractSamplesScale (Type: float)
66: AOSamplesEnabled (Type: bool)
67: AOSamplesMode (Type: uint)
68: AOSamplesCount (Type: uint)
69: AOSamplesScale (Type: float)
70: LightSamplesEnabled (Type: bool)
71: LightSamplesMode (Type: uint)
72: LightSamplesCount (Type: uint)
73: LightSamplesScale (Type: float)
74: VolumeSamplesEnabled (Type: bool)
75: VolumeSamplesMode (Type: uint)
76: VolumeSamplesCount (Type: uint)
77: VolumeSamplesScale (Type: float)
78: SingleScatteringSamplesEnabled (Type: bool)
79: SingleScatteringSamplesMode (Type: uint)
80: SingleScatteringSamplesCount (Type: uint)
81: SingleScatteringSamplesScale (Type: float)
82: MultipleScatteringSamplesEnabled (Type: bool)
83: MultipleScatteringSamplesMode (Type: uint)
84: MultipleScatteringSamplesCount (Type: uint)
85: MultipleScatteringSamplesScale (Type: float)
86: PrimaryGIEngine (Type: string)
        RS_GIENGINE_NONE - None
        RS_GIENGINE_PHOTON_MAPPING - Photon mapping
        RS_GIENGINE_IRRADIANCE_POINT_CLOUD - Irradiance point cloud
        RS_GIENGINE_IRRADIANCE_CACHE - Irradiance cache
        RS_GIENGINE_BRUTE_FORCE - Brute force
87: SecondaryGIEngine (Type: string)
        RS_GIENGINE_NONE - None
        RS_GIENGINE_PHOTON_MAPPING - Photon mapping
        RS_GIENGINE_IRRADIANCE_POINT_CLOUD - Irradiance point cloud
        RS_GIENGINE_IRRADIANCE_CACHE - Irradiance cache
        RS_GIENGINE_BRUTE_FORCE - Brute force
88: NumGIBounces (Type: uint)
89: ConserveGIReflectionEnergy (Type: bool)
90: PhotonGIEnable (Type: bool)
91: PhotonCausticsEnable (Type: bool)
92: PhotonMode (Type: string)
        RS_PHOTON_MODE_REBUILD - Rebuild
        RS_PHOTON_MODE_LOAD - Load
        RS_PHOTON_MODE_REBUILD_DONT_SAVE - Rebuild (don't save)
93: PhotonFilename (Type: string)
94: PhotonFirstBounceIDToUse (Type: uint)
95: PhotonMaxTraceDepthReflection (Type: uint)
96: PhotonMaxTraceDepthRefraction (Type: uint)
97: PhotonMaxTraceDepthCombined (Type: uint)
98: PhotonGISearchRadius (Type: float)
99: PhotonGIMaxNumToGather (Type: uint)
100: PhotonCausticsSearchRadius (Type: float)
101: PhotonCausticsMaxNumToGather (Type: uint)
102: PhotonUsePerPhotonIrradiance (Type: bool)
103: PhotonDebugDrawPoints (Type: bool)
104: BruteForceGINumRays (Type: uint)
105: IrradiancePointCloudMode (Type: string)
        RS_IRRADIANCE_POINT_CLOUD_MODE_REBUILD - Rebuild
        RS_IRRADIANCE_POINT_CLOUD_MODE_LOAD - Load
        RS_IRRADIANCE_POINT_CLOUD_MODE_REBUILD_PREPASSONLY - Rebuild (prepass only)
        RS_IRRADIANCE_POINT_CLOUD_MODE_REBUILD_DONT_SAVE - Rebuild (don't save)
106: IrradiancePointCloudFilename (Type: string)
107: ShowIrradiancePointCloudCalculation (Type: bool)
108: IrradiancePointCloudScreenRadius (Type: uint)
109: IrradiancePointCloudNumSamplesPerPixel (Type: uint)
110: IrradiancePointCloudFilterSize (Type: float)
111: IrradiancePointCloudRetraceThreshold (Type: float)
112: IrradiancePointCloudDebugDrawPoints (Type: bool)
113: IrradianceCacheMode (Type: string)
        RS_IRRADIANCE_CACHE_MODE_REBUILD - Rebuild
        RS_IRRADIANCE_CACHE_MODE_LOAD - Load
        RS_IRRADIANCE_CACHE_MODE_REBUILD_PREPASSONLY - Rebuild (prepass only)
        RS_IRRADIANCE_CACHE_MODE_REBUILD_DONT_SAVE - Rebuild (don't save)
114: IrradianceCacheFilename (Type: string)
115: IrradianceCacheFlythroughMode (Type: bool)
116: ShowIrradianceCacheCalculation (Type: bool)
117: IrradianceCacheUseSeparatePointsForSecondaryRays (Type: bool)
118: IrradianceCacheMinRate (Type: int)
119: IrradianceCacheMaxRate (Type: int)
120: IrradianceCacheColorThreshold (Type: float)
121: IrradianceCacheDistanceThreshold (Type: float)
122: IrradianceCacheNormalThreshold (Type: float)
123: IrradianceCacheMinDetail (Type: float)
124: IrradianceCacheRadiusFactor (Type: float)
125: IrradianceCacheNumRays (Type: uint)
126: IrradianceCacheAdaptiveAmount (Type: float)
127: IrradianceCacheAdaptiveErrorThreshold (Type: float)
128: IrradianceCacheNumSmoothingPasses (Type: uint)
129: IrradianceCacheDebugDrawPoints (Type: bool)
130: SubsurfaceScatteringMode (Type: string)
        RS_SUBSURFACE_SCATTERING_MODE_REBUILD - Rebuild
        RS_SUBSURFACE_SCATTERING_MODE_LOAD - Load
        RS_SUBSURFACE_SCATTERING_MODE_REBUILD_PREPASSONLY - Rebuild (prepass only)
        RS_SUBSURFACE_SCATTERING_MODE_REBUILD_DONT_SAVE - Rebuild (don't save)
131: SubsurfaceScatteringFilename (Type: string)
132: SubsurfaceScatteringRate (Type: int)
133: SubsurfaceScatteringInterpolationQuality (Type: float)
134: SubsurfaceScatteringNumGIRays (Type: uint)
135: SubsurfaceScatteringOverrideMode (Type: string)
        RS_SUBSURFACE_SCATTERING_OVERRIDEMODE_NONE - None
        RS_SUBSURFACE_SCATTERING_OVERRIDEMODE_RAYTRACED - Ray-Traced
        RS_SUBSURFACE_SCATTERING_OVERRIDEMODE_POINTBASED - Point-Based
136: TextureSamplingTechnique (Type: string)
        RS_TEXTURESAMPLINGTECHNIQUE_FELINE - Anisotropic
        RS_TEXTURESAMPLINGTECHNIQUE_BILINEAR - Bilinear
        RS_TEXTURESAMPLINGTECHNIQUE_POINT - Point
137: CopyToTextureCache (Type: bool)
138: EnableAutomaticReprocessingOfPreConvertedTextures (Type: bool)
139: EnableDetailedTextureProcessingReporting (Type: bool)
140: BumpMapBias (Type: float)
141: PhotometricUnitsToMeterScale (Type: float)
142: PhotometricCandelaMetersSquaredFactor (Type: float)
143: DisableShadowRayBiasing (Type: bool)
144: DoCompleteRTHConstruction (Type: bool)
145: RTHMaxNumLeafPrimitives (Type: uint)
146: RTHPolygonSplitThreshold (Type: float)
147: AbortOnLicenseFail (Type: bool)
148: AbortOnMissingResource (Type: bool)
149: RenderInCameraSpace (Type: bool)
150: FreezeTessellation (Type: bool)
151: EnableLegacyVolumeGridEmission (Type: bool)
152: DisableBumpSmoothingOnLightingSilhouettes (Type: bool)
153: HairTessellationMode (Type: string)
        RS_HAIRTESSELLATIONMODE_NONE - None
        RS_HAIRTESSELLATIONMODE_4 - 4-steps
        RS_HAIRTESSELLATIONMODE_8 - 8-steps
154: SuppressTiledTextureWarnings (Type: bool)
155: SuppressTextureConversionMessage (Type: bool)
156: EnableSecondaryRayClampingOnFirstBounce (Type: bool)
157: EnableLegacyCutOffsRules (Type: bool)
158: EnableLegacyNonInverseSquareLightDecay (Type: bool)
159: EnableLegacyBumpSamplingTechnique (Type: bool)
160: GammaCorrectColorInputs (Type: bool)
161: GammaCorrectColorAttributes (Type: string)
        RS_GAMMACORRECTATTRIBUTES_NONE - None
        RS_GAMMACORRECTATTRIBUTES_VERTEXCOLORS - Vertex Colors
        RS_GAMMACORRECTATTRIBUTES_USERDATACOLORS - User Data Colors
        RS_GAMMACORRECTATTRIBUTES_ALL - All
162: AutomaticMemoryManagement (Type: bool)
163: GPUMemoryInactivityTimeout (Type: uint)
164: PercentageOfGPUMemoryToUse (Type: uint)
165: MaxNumGPUMBForIrradiancePointCloudHierarchy (Type: uint)
166: MaxNumGPUMBForForICPHierarchy (Type: uint)
167: PercentageOfFreeMemoryUsedForTextureCache (Type: uint)
168: MaxNumGPUMBForTextureCache (Type: uint)
169: NumGPUMBToReserveForRays (Type: uint)
170: MaxNumCPUMBForTextureCache (Type: uint)
171: EnableDebugCapture (Type: bool)
172: EnableDebugCaptureShaderIntegrityCheck (Type: bool)
173: EnableDetailedTextureSamplingStats (Type: bool)
174: DisplacementDebugLevel (Type: uint)
175: AOVDeepMergeMode (Type: string)
        RS_AOVDEEPMERGEMODE_Z - Z
        RS_AOVDEEPMERGEMODE_OBJECTID - ObjectID
176: AOVDeepMergeZThreshold (Type: float)
177: AOVMaxOverbright (Type: float)
178: AOVMaxOverbrightEnable (Type: bool)
179: AOVDisableImportanceOptimizations (Type: bool)
180: AOVFixRawHaloArtifacts (Type: bool)
181: VolLightingEnabled (Type: bool)
182: VolLightingTint (Type: vector3)
183: VolLightingFogAmbient (Type: vector3)
184: VolLightingFogOrigin (Type: vector3)
185: VolLightingFogNormal (Type: vector3)
186: VolLightingApplyExposureCompensation (Type: bool)
187: VolLightingFogHeight (Type: float)
188: VolLightingFogHorizonBlur (Type: float)
189: VolLightingScatteringCoefficient (Type: float)
190: VolLightingExtinctionCoefficient (Type: float)
191: VolLightingPhase (Type: float)
192: VolLightingRayContributionEnvironment (Type: float)
193: VolLightingRayContributionCamera (Type: float)
194: VolLightingRayContributionReflection (Type: float)
195: VolLightingRayContributionGI (Type: float)
196: VolLightingReplaceAlphaOnEnvironment (Type: bool)
197: ShadowLinkingMode (Type: string)
        RS_SHADOWLINKINGMODE_USELIGHTLINKS - Use light links
        RS_SHADOWLINKINGMODE_USESHADOWLINKS - Use shadow links
        RS_SHADOWLINKINGMODE_ALL - All
198: MaterialOverrideEnabled (Type: bool)
199: MaterialOverrideColor (Type: vector3)


Example: Overriding render options

We can override render options through the -oro argument.
Let's assume we want to force the unified min/max settings to min:16 and max:64.
We would first need to create a text file (in this case: myrenderoptionsoverrides.txt) containing the following two lines:

UnifiedMinSamples 16
UnifiedMaxSamples 64


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

redshiftCmdLine myscene.rs -oro myrenderoptionoverrides.txt

This would render myscene.rs with the two unifie d sampling overrides.