Skip to content

Commit

Permalink
Outputs config : Add deep_beauty and deep_alpha presets for Arnold
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Sep 4, 2024
1 parent 2293ae1 commit e614d37
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
19 changes: 15 additions & 4 deletions startup/gui/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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(
{
Expand All @@ -167,7 +178,7 @@
"Batch/Arnold/" + label,
IECoreScene.Output(
"${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( aov, aov ),
"exr",
driver,
data,
parameters,
)
Expand Down

0 comments on commit e614d37

Please sign in to comment.