-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat(cpp): add light manager #749
Conversation
karjonas
commented
Mar 21, 2019
- Add a light manager to the scene
- Add spotlight and quadlight light sources, only supported in OSPRay for now
- Expose adding/removing of lights as RPCs
179abcd
to
160912d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you have my last (partial) code review for you. I hope you enjoy it as usually 😉
brayns/engine/LightManager.h
Outdated
|
||
/** | ||
* @brief addQuadLight Creates a quad light. The quad light is a planar, | ||
* procedural area light source emitting uniformly on one side into the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
procedural?
brayns/engine/LightManager.h
Outdated
|
||
/** | ||
* @brief addQuadLight Creates a quad light. The quad light is a planar, | ||
* procedural area light source emitting uniformly on one side into the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not entirely clear to me. If each point in the light surface emit uniformly in the half-space, the integral over the area doesn't produce a uniform distribution over a solid angle (as I understand the sphere light does). For that to happen the area needs to be infinite. I would be more careful with the wording.
* Add a light manager to the scene * Add spotlight and quadlight light sources, only supported in OSPRay for now * Expose adding/removing of lights as RPCs
I rewrote this PR a bit so that each light is actually a different class without any property map. The light manager now stores the ids for the added lights. The lights serialization is done with a generic RPCLight class which is populated in the rockets plugin. |