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

Support light linking on instances #1128

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

sebastienblor
Copy link
Collaborator

Changes proposed in this pull request
In order to resolve light/shadow linking, we call sceneDelegate->GetCategories(rprim->GetId()) to get the list of collections that include the current shape. Then, in ApplyLightLinking we check which lights were linked to this any of these collections.
But in the case of a point instancer (or with instances in general), we should also consider the collections for the instancer node.

In this PR, we append both the collections for the current shape, with the ones of the eventual instancer.
When no instances are found, we avoid copying the collections array and just pass the reference. But in the case of instances with light linking, we compute a new array and append all the required elements.

Adding test_0223 with such a use case, so that it can be tested in both the procedural and the delegate

Issues fixed in this pull request
Fixes #1060

@sebastienblor sebastienblor added bug Something isn't working render delegate Related to the Arnold Render Delegate user Reported by a user labels Apr 15, 2022
@sebastienblor sebastienblor self-assigned this Apr 15, 2022
@sebastienblor sebastienblor merged commit f1b1400 into Autodesk:master Apr 19, 2022
@sebastienblor sebastienblor deleted the pr/1060 branch April 19, 2022 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working render delegate Related to the Arnold Render Delegate user Reported by a user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Light linking with point instancers
2 participants