Skip to content

Fix mismatch between USD and Hydra for GI_transmission_depth #2288

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [usd#2276](https://github.com/Autodesk/arnold-usd/issues/2276) - Improve default interactive FPS settings in the render delegate
- [usd#2231](https://github.com/Autodesk/arnold-usd/issues/2231) - Fix velocity motion blur coherence when there is varying number of instances
- [usd#2285](https://github.com/Autodesk/arnold-usd/issues/2285) - Use point instancer angular velocity in the render delegate
- [usd#2287](https://github.com/Autodesk/arnold-usd/issues/2287) - Fix mismatch in default value for GI_transmission_depth between USD and Hydra

## Next Bugfix release

Expand Down
1 change: 1 addition & 0 deletions libs/common/rendersettings_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ AtNode* ReadRenderSettings(const UsdPrim &renderSettingsPrim, ArnoldAPIAdapter &
AiNodeSetInt(options, str::AA_samples, 3);
AiNodeSetInt(options, str::GI_diffuse_depth, 1);
AiNodeSetInt(options, str::GI_specular_depth, 1);
AiNodeSetInt(options, str::GI_transmission_depth, 8);

// Eventual render region: in arnold it's expected to be in pixels in the range [0, resolution]
// but in usd it's between [0, 1]
Expand Down
6 changes: 6 additions & 0 deletions libs/translator/writer/write_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ TF_DEFINE_PRIVATE_TOKENS(_tokens,
((aaSamples, "arnold:AA_samples"))
((giDiffuseDepth, "arnold:GI_diffuse_depth"))
((giSpecularDepth, "arnold:GI_specular_depth"))
((giTransmissionDepth, "arnold:GI_transmission_depth"))
((aovDriverFormat, "driver:parameters:aov:format"))
((aovSettingName,"driver:parameters:aov:name"))
((aovGlobalAtmosphere, "arnold:global:atmosphere"))
Expand Down Expand Up @@ -270,6 +271,11 @@ void UsdArnoldWriteOptions::Write(const AtNode *node, UsdArnoldWriter &writer)
AiNodeGetInt(node, str::GI_specular_depth));
_exportedAttrs.insert("GI_specular_depth");

writer.SetAttribute(
prim.CreateAttribute(_tokens->giTransmissionDepth, SdfValueTypeNames->Int),
AiNodeGetInt(node, str::GI_transmission_depth));
_exportedAttrs.insert("GI_transmission_depth");

AtNode* colorManager = (AtNode*) AiNodeGetPtr(node, str::color_manager);
// If the options node has a color manager set, we want to author it in the render settings #1965
if (colorManager) {
Expand Down