Geometry lights support in the render delegate #1080
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
First implementation of usd geometry lights in hydra. This currently supports the usd primitive
UsdLuxGeometryLight
which is what our writer authors.This required the following changes :
_RemovePrim
doesn't have the USDIMAGING_API tag and so the symbol isn't exported. Even if I hack it by redefining the function, I still get strange behaviours. So instead, I'm just inheriting from the base UsdImagingPrimAdapter class. In this adapter, I can redefine the functionGet
so that when we're asked to return thegeometry
relationship, we look for the mesh path, convert it to the render index path, and provide that SdfPath to the delegateGet
function explained above so that we can get the path to the mesh light. Then we look for it in the arnold universe and set it to the mesh light.arnold:visibility
in our writer. But the render delegate current only support bool flags likearnold:visibility:camera
, etc... (the procedural supports both). I added support for full visibility being set in the delegate too (in utils.cpp).I realized we didn't have any test for mesh lights in our procedural testsuite so I made one as test_0209. I verified that I get a similar result in Hydra now
Issues fixed in this pull request
Fixes #971