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

USDScene : Load bounds from UsdGeomModelAPI extents hints #1421

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

johnhaddon
Copy link
Member

This can provide significant performance improvements where the ModelAPI has been used to provide cached extents. This knocks around 30% off the time taken to open the file and compute the root bound of the ALab in Gaffer. If USD composition time is omitted so only the bound computation is measured in isolation, a full 95% is knocked off the time. In the case of the ALab, the new root bound is also far more reasonable for some reason - I suspect the model extents are masking a bad authored extent on a leaf object elsewhere in the scene.

This has the potential to be surprising for any folks who have authored inaccurate model extents in the past, so I've made it possible to turn off the behaviour using an environment variable. I'd like to default things on in Cortex itself, but we can debate the appropriate default for Gaffer when we next update the Cortex version.

This can provide significant performance improvements where the ModelAPI has been used to provide cached extents. This knocks around 30% off the time taken to open the file and compute the root bound of the ALab in Gaffer. If USD composition time is omitted so only the bound computation is measured in isolation, a full 95% is knocked off the time. In the case of the ALab, the new root bound is also far more reasonable for some reason - I suspect the model extents are masking a bad authored extent on a leaf object elsewhere in the scene.

This has the potential to be surprising for any folks who have authored inaccurate model extents in the past, so I've made it possible to turn off the behaviour using an environment variable. I'd like to default things on in Cortex itself, but we can debate the appropriate default for Gaffer when we next update the Cortex version.
@johnhaddon johnhaddon self-assigned this Jun 21, 2024
Copy link
Collaborator

@murraystevenson murraystevenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice win! On by default sounds good to me.

@murraystevenson murraystevenson merged commit 94bddf2 into ImageEngine:RB-10.5 Jun 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants