DirectionalLight

class pyrender.light.DirectionalLight(color=None, intensity=None, name=None)[source]

Bases: pyrender.light.Light

Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local -z axis. This light type inherits the orientation of the node that it belongs to; position and scale are ignored except for their effect on the inherited node orientation. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2).

Parameters:
  • color ((3,) float, optional) – RGB value for the light’s color in linear space. Defaults to white (i.e. [1.0, 1.0, 1.0]).
  • intensity (float, optional) – Brightness of light, in lux (lm/m^2). Defaults to 1.0
  • name (str, optional) – Name of the light.

Attributes Summary

color The light’s color.
intensity The light’s intensity in candela or lux.
name The user-defined name of this object.
shadow_texture A texture used to hold shadow maps for this light.

Attributes Documentation

color

The light’s color.

Type:(3,) float
intensity

The light’s intensity in candela or lux.

Type:float
name

The user-defined name of this object.

Type:str
shadow_texture

A texture used to hold shadow maps for this light.

Type:Texture