Skip to content

Commit

Permalink
Imagers should be applied to all drivers #2084
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor committed Aug 30, 2024
1 parent ab33049 commit 518ecdc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- [usd#2061](https://github.com/Autodesk/arnold-usd/issues/2061) - Support arnold light groups in Hydra
- [usd#2067](https://github.com/Autodesk/arnold-usd/issues/2067) - Do not author useless "normals" user data in meshes/curves through the procedural
- [usd#1118](https://github.com/Autodesk/arnold-usd/issues/1118) - Add profile/stats settings to the Render Settings
- [usd#2084](https://github.com/Autodesk/arnold-usd/issues/2084) - Imagers should be applied to all drivers

### Bug fixes
- [usd#1961](https://github.com/Autodesk/arnold-usd/issues/1961) - Random curves width in Hydra when radius primvars are authored
Expand Down
7 changes: 3 additions & 4 deletions libs/common/rendersettings_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ AtNode* ReadRenderSettings(const UsdPrim &renderSettingsPrim, ArnoldAPIAdapter &
// Needed further down
const std::string driverType(AiNodeEntryGetName(AiNodeGetNodeEntry(driver)));

// Set imager in the driver
UsdArnoldNodeGraphConnection(driver, renderSettingsPrim, renderSettingsPrim.GetAttribute(_tokens->aovGlobalImager), "input", context, time);

// Render Products have a list of Render Vars, which correspond to an AOV.
// For each Render Var, we will need one element in options.outputs
UsdRelationship renderVarsRel = renderProduct.GetOrderedVarsRel();
Expand Down Expand Up @@ -784,10 +787,6 @@ AtNode* ReadRenderSettings(const UsdPrim &renderSettingsPrim, ArnoldAPIAdapter &
UsdArnoldNodeGraphConnection(options, renderSettingsPrim, renderSettingsPrim.GetAttribute(_tokens->aovGlobalBackground), "background", context, time);
UsdArnoldNodeGraphAovConnection(options, renderSettingsPrim, renderSettingsPrim.GetAttribute(_tokens->aovGlobalAovs), "aov_shaders", context, time);

for (auto driver: beautyDrivers) {
UsdArnoldNodeGraphConnection(driver, renderSettingsPrim, renderSettingsPrim.GetAttribute(_tokens->aovGlobalImager), "input", context, time);
}

// Setup color manager
AtNode* colorManager = nullptr;
const char *ocio_path = std::getenv("OCIO");
Expand Down
5 changes: 2 additions & 3 deletions libs/render_delegate/render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,7 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
"%s %s %s %s", aovName, arnoldTypes.outputString, filterName, AiNodeGetName(buffer.driver))
.c_str()};

if (!strcmp(aovName, "RGBA")) {
AiNodeSetPtr(buffer.driver, str::input, imager);
}
AiNodeSetPtr(buffer.driver, str::input, imager);

}
outputs.push_back(output);
Expand Down Expand Up @@ -923,6 +921,7 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
AiNodeSetArray(customProduct.driver, str::layer_enable_filtering, enableFilteringArray);
AiNodeSetArray(customProduct.driver, str::layer_half_precision, halfPrecisionArray);
}
AiNodeSetPtr(customProduct.driver, str::input, imager);
_customProducts.push_back(std::move(customProduct));
}

Expand Down

0 comments on commit 518ecdc

Please sign in to comment.