blenderproc.python.types.LightUtility module¶
-
class
blenderproc.python.types.LightUtility.
Light
(type='POINT', name='light', blender_obj=None)[source]¶ Bases:
blenderproc.python.types.EntityUtility.Entity
-
get_color
(frame=None)[source]¶ Returns the RGB color of the light.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: Color
Returns: The color at the specified frame.
-
get_distance
(frame=None)[source]¶ Returns the falloff distance of the light (point where light is half the original intensity).
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: float
Returns: The falloff distance at the specified frame.
-
get_energy
(frame=None)[source]¶ Returns the energy of the light.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: float
Returns: The energy at the specified frame.
-
get_type
(frame=None)[source]¶ Returns the type of the light.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: str
Returns: The type at the specified frame.
-
set_distance
(distance, frame=None)[source]¶ Sets the falloff distance of the light = point where light is half the original intensity.
Parameters:
-
setup_as_projector
(pattern, frame=None)[source]¶ - Sets a spot light source as projector of a pattern image. Sets location and angle of projector to current
- camera. Adjusts scale of pattern image to fit field-of-view of camera: $(0.5 +
rac{X}{Z cdot F}, 0.5 + rac{X}{Z cdot F cdot r}, 0)$
where $F$ is focal length and $r$ aspect ratio. WARNING: This should be done after the camera parameters are set!
param pattern: pattern image to be projected onto scene as np.ndarray. param frame: The frame number which the value should be set to. If None is given, the current frame number is used.
-