Distant Light#

A DistantLight emits parallel light along its local -Z axis. Its position does not affect illumination; rotate it to set the direction. Increasing its angular diameter produces softer shadows. It also uses the common light attributes.

A test scene lit by a distant light, producing directional illumination and shadows

A distant light illuminates the scene from one direction.#

USD declaration

Description

float inputs:angle = 0.53

Angular diameter in degrees, clipped to the range 0 ≤ angle < 360. Zero produces parallel rays; larger values soften shadows.

The following examples create a distant light approximating the angular size and brightness of the Sun:

def DistantLight "Sun"
{
    float inputs:angle = 0.53
    float inputs:intensity = 50000
    bool inputs:normalize = true
}
light = UsdLux.DistantLight.Define(stage, "/World/Sun")
light.GetAngleAttr().Set(0.53)
light.LightAPI().GetIntensityAttr().Set(50000.0)
light.LightAPI().GetNormalizeAttr().Set(True)