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

Fix slowness in the render delegate due to scene update when the camera moves #1855

Merged
merged 4 commits into from
Feb 15, 2024
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

## [fix-7.2.5]

### Bug fixes
- [usd#1854](https://github.com/Autodesk/arnold-usd/issues/1854) - Fix unnecessary updating of the scene in the render delegate when the camera is moving. This improves the interactivity in Solaris.

## [7.2.5.2]

### Bug fixes

- [usd#1808](https://github.com/Autodesk/arnold-usd/issues/1808) - Fix the error "Cannot load _htoa_pygeo library required for volume rendering in Solaris" in Houdini 19.5+.
- [usd#1812](https://github.com/Autodesk/arnold-usd/issues/1812) - Improve Material network creation by caching the node entries and the osl code.
- [usd#1781](https://github.com/Autodesk/arnold-usd/issues/1781) - Fix a crash happening in a aiStandin usd when scrolling the timeline in maya.
Expand Down
4 changes: 2 additions & 2 deletions libs/render_delegate/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void HdArnoldCamera::Sync(HdSceneDelegate* sceneDelegate, HdRenderParam* renderP

// Check if the user changed the projection type
if (isPersp) {
if (AtString(AiNodeEntryGetTypeName(AiNodeGetNodeEntry(_camera))) != str::persp_camera) {
if (!AiNodeIs(_camera, str::persp_camera)) {
// the name might be the same ??
AtNode *newCamera = _delegate->CreateArnoldNode(str::persp_camera, AtString(GetId().GetText()));
SetCamera(newCamera);
Expand All @@ -282,7 +282,7 @@ void HdArnoldCamera::Sync(HdSceneDelegate* sceneDelegate, HdRenderParam* renderP
const auto fov = static_cast<float>(GfRadiansToDegrees(atan(1.0 / projMatrix[0][0]) * 2.0));
AiNodeSetFlt(_camera, str::fov, fov);
} else if (isOrtho) {
if (AtString(AiNodeEntryGetTypeName(AiNodeGetNodeEntry(_camera))) != str::ortho_camera) {
if (!AiNodeIs(_camera, str::ortho_camera)) {
AtNode *newCamera = _delegate->CreateArnoldNode(str::ortho_camera, AtString(GetId().GetText()));
SetCamera(newCamera);
AiNodeSetStr(newCamera, str::name, AtString(GetId().GetText()));
Expand Down