SpotLight¶
-
class
pyrender.light.
SpotLight
(color=None, intensity=None, range=None, innerConeAngle=0.0, outerConeAngle=0.7853981633974483, name=None)[source]¶ Bases:
pyrender.light.Light
Spot lights emit light in a cone in the direction of the local -z axis. The angle and falloff of the cone is defined using two numbers, the
innerConeAngle
andouterConeAngle
. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light’s position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside theinnerConeAngle
(and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). A spot light’s position and orientation are inherited from its node transform. Inherited scale does not affect cone shape, and is ignored except for its effect on position and orientation.Parameters: - color ((3,) float) – RGB value for the light’s color in linear space.
- intensity (float) – Brightness of light in candela (lm/sr).
- range (float) – Cutoff distance at which light’s intensity may be considered to have reached zero. If None, the range is assumed to be infinite.
- innerConeAngle (float) – Angle, in radians, from centre of spotlight where falloff begins.
Must be greater than or equal to
0
and less thanouterConeAngle
. Defaults to0
. - outerConeAngle (float) – Angle, in radians, from centre of spotlight where falloff ends.
Must be greater than
innerConeAngle
and less than or equal toPI / 2.0
. Defaults toPI / 4.0
. - name (str, optional) – Name of the light.
Attributes Summary
color
The light’s color. innerConeAngle
The inner cone angle in radians. intensity
The light’s intensity in candela or lux. name
The user-defined name of this object. outerConeAngle
The outer cone angle in radians. range
The cutoff distance for the light. shadow_texture
A texture used to hold shadow maps for this light. Attributes Documentation