redshiftCmdLineツールを使用すると、3Dアプリからエクスポートされたシーンをレンダリングできます。 これは、必要な3Dアプリケーションがインストールされていない可能性のあるコンピュータでシーンをレンダリングする場合に便利です。
シーンをエクスポートする方法
3Dアプリケーションからシーンを書き出すことは、Redshiftプロキシを書き出すことと非常によく似ています。 実際、シーンファイルはプロキシファイルです! 通常のプロキシファイルとの唯一の違いは、シェーダ、ジオメトリ、ライトだけでなく、現在のカメラ、グローバルレンダリングオプション、およびAOV設定が含まれていることです。
引数
使用可能な引数のリストを表示するには、引数なしで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はレンダリングされるシーンを含む.rsプロキシファイルです
-oip パスの後にイメージファイルのパスを上書きします。
これには、すべてのAOVのパスが含まれます
例えば、シーンが一般的な画像をレンダリングする場合、
z:\myprojectpath\images\myscene.exr
z:\myprojectpath\images\myscene.diffuseLighting.exr
次のようにして、それらをc:\ myfolderにリダイレクトできます。
redshiftCmdLine test.rs -oip c:\myfolder
This will produce images:
c:\myfolder\myscene.exr
c:\myfolder\myscene.diffuseLighting.exr
-opbp パスに続いて、ポイントベースのテクニックファイルのパスを上書きします
これには、 photon mapping, irradiance point cloud, irradiance cache, および
subsurface scattering生成またはロードされたファイルが含まれる
例えば、あるシーンが次の場所に irradiance point cloudファイルを生成するとします。
z:\myprojectpath\pointcloudfiles\irradiance_pointcloud_auto.234.rsmap
ポイントクラウドファイルをc:\ myfolderにリダイレクトするには、次のようにします。
redshiftCmdLine test.rs -opbp c:\myfolder
これでファイルが生成されます:
c:\myfolder\irradiance_pointcloud_auto.234.rsmap
-ores 続いて<w> x <h>という形式の解像度が出力解像度よりも優先されます
たとえば、1920x1080解像度で画像をレンダリングするには、次のようにします。
redshiftCmdLine test.rs -ores 1920x1080
-oro テキストファイルを使用してレンダリングオプションをオーバーライドします
テキストファイルには、各行にオプションの名前と値のペアが含まれている必要があります。例:
UnifiedMaxSamples 1500
UnifiedFilterSize 3.4
ProgressiveRenderingEnabled false
MotionBlurEnabled true
UnifiedFilterType RS_AAFILTER_MITCHELL
レンダリングオプションを表示するには、-listrenderoptionsを使用します。
-gpu それに続いてデバイス順序番号NがそのGPUでレンダリングすることを可能にします
たとえば、シーン 'test.rs'を最初の2つのGPUでレンダリングするには、次のようにします。
redshiftCmdLine test.rs -gpu 0 -gpu 1
-cachepath その後にPATHを設定し、キャッシュパスフォルダを設定します
デフォルトのWindowsキャッシュフォルダは次のとおりです。 '%LOCALAPPDATA%\Redshift\Cache'
デフォルトのLinuxキャッシュフォルダは次のとおりです。 '$REDSHIFT_LOCALDATAPATH/cache'
-texturecachebudget テクスチャキャッシュのサイズ(メガバイト単位)を設定します。
たとえば、シーン 'test.rs'をレンダリングし、texキャッシュを20GBに設定するには、次のようにします。
redshiftCmdLine test.rs -texturecachebudget 20000
利用可能なレンダーオプションと終了を一覧表示します。
-crop cropOffsetX cropOffsetY cropWidthおよびcropHeight(ピクセル単位)
レンダリングするカスタムクロップ領域/ nたとえば、(10,10) - (30,30)にクロップ
領域を設定するには、次のようにします。
redshiftCmdLine test.rs -crop 10 10 20 20
-fileinfo プロキシ・パスが続き、プロキシ・ファイルに関するさまざまな情報を出力します
-printdependencies プロキシパスが続き、このプロキシが参照するファイルのリストを出力します
例:最後にレンダリングされたイメージのパスを上書きする
redshiftCmdLineを使用して3Dアプリケーションで書き出したシーンファイルをレンダリングすると、レンダリングされたイメージは3Dアプリケーションで選択されたパスに保存されます。
ただし、これは、そのパスがredshiftCmdLineを実行しているコンピュータに存在しないフォルダを指している可能性があるため、望ましくないことがあります。
シーンプロキシファイル "myscene.rs"は通常、ネットワークフォルダ(ドライブ "z")にこれらの2つのイメージをレンダリングすると仮定しましょう。
z:\myprojectpath\images\myscene.exr
z:\myprojectpath\images\myscene.diffuseLighting.exr
私たちが現在レンダリングしているコンピュータからドライブ "z"にアクセスできない場合、以下のように-oip引数を使ってイメージをc:\ myfolderにリダイレクトできます:redshiftCmdLine myscene.rs -oip c:\ myfolder 画像を生成する:
c:\myfolder\myscene.exr
c:\myfolder\myscene.diffuseLighting.exr
例:レンダリングオプションのリストをダンプする
-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)
例:レンダリングオプションのオーバーライド
レンダリングオプションは-o引数でオーバーライドすることができます。
統一された最小/最大設定を最小:16と最大:64に強制したいと仮定しましょう。
まず、次の2行を含むテキストファイル(この場合はmyrenderoptionsoverrides.txt)を作成する必要があります。
UnifiedMinSamples 16 UnifiedMaxSamples 64
次に、このテキストファイルをredshiftCmdLineに次のように渡します。
redshiftCmdLine myscene.rs -oro myrenderoptionoverrides.txt
これにより、myscene.rsは2つのunifie dサンプリングオーバーライドでレンダリングされます。