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

Use arnold instancer node in the procedural #1007

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

sebastienblor
Copy link
Collaborator

@sebastienblor sebastienblor commented Jan 20, 2022

With this PR, we read usd PointInstancer primitives as arnold "instancer" nodes (instead of creating lots of ginstance nodes).
We now set the primvars similarly to what usd does.
I'm adding test_0196 where the primvars are set on the parent instancer, that was already working in the render delegate. All the other tests are working correctly.
I noticed the performance is better than in the previous implementation

Issues fixed in this pull request
Fixes #949
Fixes #938
Fixes #956

@sebastienblor
Copy link
Collaborator Author

In the latest commit I'm also fixing the double transformation issues with point instancer reported in #956.
I could have done it in a separate PR but it required this one to be merged first so I'm putting everything under the same hat.

There were 2 problems to be addressed, both happening when an instancer prototype is a nested usd procedural (which we need to do e.g. when the prototype is a xform in the usd scene) :

  1. when this prototype has a xform, it was being applied twice. This happened because an instance inherit_xform only applies to the child procedural's matrix, not to its root primitive's matrix. So we need to exclude the prototype matrix in that use case.

  2. these child usd procedurals have a root primitive (object_path set in the procedural) so that it only loads the expected prototype. But when we compute primitive's matrices in this procedural, we consider the ones from the root prim's ancestors, which shouldn't happen

@sebastienblor sebastienblor self-assigned this Jan 20, 2022
@sebastienblor sebastienblor merged commit a71e2a0 into Autodesk:master Jan 21, 2022
@sebastienblor sebastienblor deleted the pr/949 branch January 21, 2022 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants