Support specifying position model/frame of reference for lighting instances#1210
Merged
jturner65 merged 4 commits intoMay 3, 2021
Merged
Conversation
aclegg3
approved these changes
May 3, 2021
Skylion007
reviewed
May 3, 2021
bigbike
reviewed
May 3, 2021
| - The type of the light. "point" and "directional" are currently supported. | ||
| "position_model" | ||
| - string | ||
| - They frame to use to place the light. "global", meaning stage's origin, and "camera", meaning place relative to a (potentially moving) camera, are currently supported. |
Contributor
There was a problem hiding this comment.
Oh, the "object" mode cannot be supported at the moment.
Contributor
Author
There was a problem hiding this comment.
yes, this would require more configuration specifications at the scene instance level, to specify which object instance the light should "orbit"
Contributor
There was a problem hiding this comment.
Not "orbit". Just stay fixed relative to the object.
In that case, the "light" should be in the scene graph, and be attached to a child node of that object.
Contributor
Author
There was a problem hiding this comment.
Fixed orbit :). (but yeah, I was kind of abusing terminology there, excuse me).
bigbike
reviewed
May 3, 2021
bigbike
left a comment
Contributor
There was a problem hiding this comment.
This is great! Thank you very much!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
This PR introduces JSON support, and appropriate testing and documentation, for setting the desired position model/frame of reference for a lighting instance. With this setting, the user can specify whether they wish for a particular light info/instance to be placed in the scene relative to the global origin or the camera. Object-relative positioning is also fully supported in the configuration, but only as a stub currently in the underlying lighting code.
The enum describing the position model value has also been refactored to follow our naming conventions, from ALL_CAPS to pascal case, in the c++ and python code.
How Has This Been Tested
All existing and added c++ and python test cases pass
Types of changes
Checklist