The redshiftCmdLine tool redshiftCmdLine 工具
The redshiftCmdLine tool allows the rendering of scenes that were exported from you 3d app. This is useful when wanting to render a scene on computers that might not have the necessary 3d app installed on them.
工具允许渲染从你的3 d 应用导出的场景。这是有用的时候,希望渲染场景的计算机上可能没有必要的3 d 应用程序安装在他们。
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.
从一个3 d 应用导出一个场景和导出一个红移代理非常相似。事实上,一个场景文件就是一个代理文件!它与普通代理文件的唯一区别在于,它不仅包含着色器、几何图形和灯光,还包含当前的摄像头、全局渲染选项和 AOV 设置。
To export a scene proxy file simply select the Redshift Proxy option from the File, Export sub-menu.
要导出场景代理文件,只需从文件,导出子菜单中选择红移代理选项。
After specifying an output file, the export options dialog will appear. Adjust the settings and click OK to begin the proxy export process.
指定输出文件后,将出现导出选项对话框。调整设置并单击 OK 开始代理导出过程。
If an animation range has been specified, multiple proxy files will be generated based on the filename and path provided.
如果指定了动画范围,将根据提供的文件名和路径生成多个代理文件。
Arguments
争论
To see a list of available arguments, please run redshiftCmdLine without any arguments.
要查看可用参数列表,请运行不带任何参数的 redshiftCmdLine。
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").
当使用 redshiftCmdLine 渲染3d 应用程序导出的场景文件时,渲染的图像将被保存在3d 应用程序中选择的路径中。但是,这是不可取的,因为该路径可能指向运行 redshiftCmdLine 的计算机中不存在的文件夹!假设我们的场景代理文件“ myscene.rs”通常在网络文件夹(驱动器“ 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:
如果驱动器“ z”不能从我们当前渲染的计算机上访问,我们可以通过-oip 参数将图像重定向到 c: myfolder,如下所示: redshiftcmdlet myscene.rs-oip c: myfolder 这样做将生成图像:
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.
使用-listrenderoptions 参数运行 redshiftCmdLine 将列出可用的呈现选项,如下所示。
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:
我们可以通过-oro 参数重写呈现选项。假设我们要将统一的 min/max 设置强制到 min: 16和 max: 64。我们首先需要创建一个包含以下两行的文本文件(本例中为 myrenderoptionsoverrides.txt) :
UnifiedMinSamples 16 UnifiedMaxSamples 64 |
Then, we'd pass this text file to redshiftCmdLine as follows:
然后,我们将这个文本文件传递给 redshiftCmdLine,如下所示:
redshiftCmdLine myscene.rs -oro myrenderoptionoverrides.txt |
This would render myscene.rs with the two unifie d sampling overrides.
这将使得 myscene.rs 具有两个单一的取样重写。
赶快留个言打破零评论!~