-
Notifications
You must be signed in to change notification settings - Fork 234
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
Adding SpotLight to Lighting kit #219
Conversation
Added the spot_blend and spot_size parameters into the lights.py file. Spot Blend is the roughness of the beam Spot Size is the radius in deg 0 - 180 Blender.py was changed to add the needed parameters inside the blender handler. I think I added the correct identifiers and what not. I just copied the standard implementation as it was written. The SpotLight was added in with the other forms of Lights ---------- Still need to look at the colors of the lights. Maybe refer to the issue in the main github of Kubric regarding the Color Class and its implementation.
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.
Two minor comments, otherwise LGTM.
Thanks for adding this!
kubric/renderer/blender.py
Outdated
@@ -474,6 +474,22 @@ def _add_asset(self, obj: core.DirectionalLight): # pylint: disable=function-re | |||
obj.observe(KeyframeSetter(sun, "energy"), "intensity", type="keyframe") | |||
return sun_obj | |||
|
|||
def _add_asset(self, obj: core.SpotLight): # pylint: disable=function-redefined | |||
SpotLight = bpy.data.lights.new(obj.uid, "SPOT") |
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.
nit: lowercase variable names please (snake case)
Awesome notes from Qwlouse! can be found at PR google-research#219
As per google-research#225 fix implemented
updateeeee
#225 has been addressed in the PR as it is a one liner
|
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.
two more bugfixes :-)
Co-authored-by: Klaus Greff <[email protected]>
Bug Fix noted by Qwlouse
Added the spot_blend and spot_size parameters into the lights.py file.
Spot Blend is the roughness of the beam
Spot Size is the radius in deg 0 - 180 # This might be incorrect?
Blender.py was changed to add the needed parameters inside the blender handler. I think I added the correct identifiers and what not. I just copied the standard implementation as it was written.
The SpotLight was added in with the other forms of Lights
Personal Note:
Still need to look at the colors of the lights. Maybe refer to the issue in the main github of Kubric regarding the Color Class and its implementation and look at reworking for a more wide-spread color use. Need to look into the color implementation.