From e614d376e68101bdcf029ccd83d1769acd8f0a48 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:25:33 -0700 Subject: [PATCH] Outputs config : Add `deep_beauty` and `deep_alpha` presets for Arnold --- Changes.md | 1 + startup/gui/outputs.py | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Changes.md b/Changes.md index 8bd57cfd402..46a489c11f4 100644 --- a/Changes.md +++ b/Changes.md @@ -13,6 +13,7 @@ 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. API --- diff --git a/startup/gui/outputs.py b/startup/gui/outputs.py index 9f10e6ee823..31999129871 100644 --- a/startup/gui/outputs.py +++ b/startup/gui/outputs.py @@ -118,12 +118,14 @@ "motionvector", "normal", "depth", + "deep_alpha", + "deep_beauty", ] : 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": data = "color N" @@ -140,9 +142,18 @@ if aov == "depth": parameters["layerName"] = "Z" - if aov not in { "motionvector", "emission", "background" } : + if aov not in { "motionvector", "emission", "background", "deep_alpha" } : 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( { @@ -167,7 +178,7 @@ "Batch/Arnold/" + label, IECoreScene.Output( "${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( aov, aov ), - "exr", + driver, data, parameters, )