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

3Delight cryptomatte presets #5863

Open
wants to merge 2 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
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Improvements
- Added support for multipart EXR renders by using the same file name parameter on multiple outputs.
- Added support for scalarformat, colorprofile, filterwidth and arbitrary custom NSI outputlayer and outputdriver attributes.
- Updated the default output presets to include scalarformat, colorprofile, filter and filterwidth output parameters.
- Added full multilayer cryptomatte presets to the outputs presets list.
- LightPositionTool : Changed the pointer to `notEditable` when using keyboard combinations that do not apply to the current tool mode.
- LightEditor : Added the ability to register columns for editing any parameter in a light's shader network. The parameter to edit is registered in the form `shaderName.parameterName` when calling `GafferSceneUI.LightEditor.registerParameter`.

Expand Down
46 changes: 43 additions & 3 deletions startup/gui/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@
( "Pref", "Reference Position", "attribute", "point" ),
( "shadow_mask", "Shadow Mask", "shader", "color" ),
( "st", "UV", "attribute", "point" ),
( "id.geometry", "Geometry Cryptomatte", "builtin", "float" ),
( "id.scenepath", "Scene Path Cryptomatte", "builtin", "float" ),
( "id.surfaceshader", "Surface Shader Cryptomatte", "builtin", "float" ),
( "relighting_multiplier", "Relighting Multiplier", "shader", "color" ),
( "relighting_reference", "Relighting Reference", "shader", "color" ),
( "motionvector", "Motion Vector", "builtin", "point" ),
Expand Down Expand Up @@ -269,6 +266,49 @@
)
)

for name, displayName, source, dataType, sortKey, filter in [
( "id.geometry", "Geometry Cryptomatte Header", "builtin", "color", 1, "cryptomatteheader" ),
( "id.geometry", "Geometry Cryptomatte Layer0", "builtin", "quad", 2, "cryptomattelayer0" ),
( "id.geometry", "Geometry Cryptomatte Layer2", "builtin", "quad", 3, "cryptomattelayer2" ),
( "id.surfaceshader", "Surface Shader Cryptomatte Header", "builtin", "color", 1, "cryptomatteheader" ),
( "id.surfaceshader", "Surface Shader Cryptomatte Layer0", "builtin", "quad", 2, "cryptomattelayer0" ),
( "id.surfaceshader", "Surface Shader Cryptomatte Layer2", "builtin", "quad", 3, "cryptomattelayer2" ),
( "id.scenepath", "Scene Path Cryptomatte Header", "builtin", "color", 1, "cryptomatteheader" ),
( "id.scenepath", "Scene Path Cryptomatte Layer0", "builtin", "quad", 2, "cryptomattelayer0" ),
( "id.scenepath", "Scene Path Cryptomatte Layer2", "builtin", "quad", 3, "cryptomattelayer2" ),
] :
GafferScene.Outputs.registerOutput(
"Interactive/3Delight/Cryptomatte/{}".format( displayName ),
IECoreScene.Output(
name,
"ieDisplay",
"{} {}:{}".format( dataType, source, name ),
{
"driverType" : "ClientDisplayDriver",
"displayHost" : "localhost",
"displayPort" : "${image:catalogue:port}",
"remoteDisplayType" : "GafferImage::GafferDisplayDriver",
"scalarformat" : "float",
"sortkey": sortKey,
"filter" : filter,
}
)
)

GafferScene.Outputs.registerOutput(
"Batch/3Delight/Cryptomatte/{}".format( displayName ),
IECoreScene.Output(
"${project:rootDirectory}/renders/${script:name}/${renderPass}/%s/%s.####.exr" % ( name, name ),
"exr",
"{} {}:{}".format( dataType, source, name ),
{
"scalarformat" : "float",
"sortkey": sortKey,
"filter" : filter,
}
)
)

# Add standard cycles AOVs

if os.environ.get( "CYCLES_ROOT" ) and os.environ.get( "GAFFERCYCLES_HIDE_UI", "" ) != "1" :
Expand Down
Loading