diff --git a/Changes.md b/Changes.md index 8bd57cfd402..66c805ffc14 100644 --- a/Changes.md +++ b/Changes.md @@ -13,6 +13,9 @@ Improvements - Added the ability to edit the scale of node icons. - Improved layout of Box node plug creator visibility toggles. - ArnoldShader : Moved the `toon` shader's `*_tonemap_hue_saturation` parameters to appropriate sections in the UI. +- Arnold : + - Added `deep_alpha` and `deep_beauty` output presets demonstrating outputs that produce deep images. + - Added `lpe` output preset demonstrating an output using a light path expression. API --- diff --git a/startup/gui/outputs.py b/startup/gui/outputs.py index 9f10e6ee823..a12a043a60e 100644 --- a/startup/gui/outputs.py +++ b/startup/gui/outputs.py @@ -118,16 +118,21 @@ "motionvector", "normal", "depth", + "deep_alpha", + "deep_beauty", + "lpe", ] : label = aov.replace( "_", " " ).title().replace( " ", "_" ) - if aov == "beauty": + if aov in ( "beauty", "deep_beauty" ) : data = "rgba" - elif aov == "depth": + elif aov in ( "depth", "deep_alpha" ) : data = "float Z" - elif aov == "normal": + elif aov == "normal" : data = "color N" - else: + elif aov == "lpe" : + data = "lpe C.*" + else : data = "color " + aov if aov == "motionvector" : @@ -137,12 +142,21 @@ else : parameters = {} - if aov == "depth": + if aov == "depth" : parameters["layerName"] = "Z" - if aov not in { "motionvector", "emission", "background" } : + if aov not in { "motionvector", "emission", "background", "deep_alpha", "lpe" } : parameters["layerPerLightGroup"] = False + if aov.startswith( "deep_" ) : + driver = "deepexr" + parameters["alpha_tolerance"] = 0.01 + parameters["depth_tolerance"] = 0.01 + parameters["alpha_half_precision"] = False + parameters["depth_half_precision"] = False + else : + driver = "exr" + interactiveParameters = parameters.copy() interactiveParameters.update( { @@ -153,6 +167,9 @@ } ) + if aov == "lpe" : + interactiveParameters["layerName"] = "lpe" + GafferScene.Outputs.registerOutput( "Interactive/Arnold/" + label, IECoreScene.Output( @@ -167,7 +184,7 @@ "Batch/Arnold/" + label, IECoreScene.Output( "${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( aov, aov ), - "exr", + driver, data, parameters, ) @@ -348,7 +365,7 @@ def __registerOutputs( aovs, halfFloat = False, denoise = False ) : "halfFloat" : halfFloat } - if data == "lightgroup": + if data == "lightgroup" : data = "lg lightgroup" label = "Light_Group" @@ -372,7 +389,7 @@ def __registerOutputs( aovs, halfFloat = False, denoise = False ) : ) GafferScene.Outputs.registerOutput( - "Batch/Cycles/" + label, + "Batch/Cycles/" + label, IECoreScene.Output( "${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( aov, aov ), "exr", @@ -381,7 +398,7 @@ def __registerOutputs( aovs, halfFloat = False, denoise = False ) : ) ) - if denoise: + if denoise : interactiveOutput["denoise"] = True batchOutput["denoise"] = True