Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arnold : Add output presets demonstrating deepexr and LPE outputs #6011

Open
wants to merge 3 commits into
base: 1.4_maintenance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
37 changes: 27 additions & 10 deletions startup/gui/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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" :
Expand All @@ -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(
{
Expand All @@ -153,6 +167,9 @@
}
)

if aov == "lpe" :
interactiveParameters["layerName"] = "lpe"

GafferScene.Outputs.registerOutput(
"Interactive/Arnold/" + label,
IECoreScene.Output(
Expand All @@ -167,7 +184,7 @@
"Batch/Arnold/" + label,
IECoreScene.Output(
"${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( aov, aov ),
"exr",
driver,
data,
parameters,
)
Expand Down Expand Up @@ -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"

Expand All @@ -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",
Expand All @@ -381,7 +398,7 @@ def __registerOutputs( aovs, halfFloat = False, denoise = False ) :
)
)

if denoise:
if denoise :
interactiveOutput["denoise"] = True
batchOutput["denoise"] = True

Expand Down
Loading