Skip to main content

Light

The light component attaches a dynamic light source to an entity. The 'Type' property determines what kind of light is attached and what other properties are available.

The light component can be enabled or disabled using the toggle in the top-right of the component panel. When enabled, the light illuminates the scene.

Directional

Light component (Directional)

Omni

Light component (Omni)

Spot

Light component (Spot)

Properties

PropertyDescription
TypeCan be one of the following:
  • Directional: A light that illuminates in a uniform direction
  • Omni: A light that illuminates in all directions
  • Spot: A light that illuminates from the apex of a cone
ColorThe color of the emitted light.
IntensityThe intensity of the light, acting as a scalar value for the light color. This value can exceed 1.
RangeOmni and Spot only. The distance from the spotlight source at which the light's contribution reaches 0.
Falloff ModeOmni and Spot only. Controls the rate at which the light attenuates from its position.
Inner Cone AngleThe angle at which the spotlight cone starts to fade off. The angle is specified in degrees. Only affects spot lights.
Outer Cone AngleThe angle at which the spotlight cone completely disappears. The angle is specified in degrees. Only affects spot lights.
StaticMarks the light as immovable (optimization).
Bake LightmapEnables lightmap baking for this light.
Bake DirectionWhen enabled and bake is true, the light's direction contributes to directional lightmaps.
Bake SamplesThe number of samples used to bake this light into the lightmap.
Bake AreaThe penumbra angle in degrees, allowing for soft shadow boundaries.
Affect LightmappedWhen enabled, the light affects lightmapped objects.
Affect DynamicWhen enabled, the light affects non-lightmapped objects.
Cast ShadowsWhen checked, models that cast shadows will cast shadows from this light.
Shadow Update ModeDetermines when this light's shadowmap is updated. Can be one of:
  • Once: Created once and never again. Useful when casters, receivers, and light are static.
  • Realtime: Updated every frame.
DistanceDirectional light only. Shadow distance is the maximum distance from the camera at which shadows from directional lights are no longer visible. Smaller values produce more detailed shadows. The closer the limit, the less shadow data needs to be mapped, represented by the shadowmap. Since shadowmap pixels are mapped spatially, the smaller the distance the shadowmap needs to cover, the smaller the pixels become, resulting in higher shadow resolution.
Shadow IntensityThe intensity of shadow darkness, where 1 means the shadow is completely black.
Shadow BiasBias values enable shadow adjustment to remove rendering artifacts, namely 'shadow acne' and 'peter-panning'. The two values are shadow bias and normal offset bias.
Normal Offset BiasNormal offset depth bias.
CookieOmni and Spot only. The texture asset to be projected from the light.
Cookie IntensityOmni and Spot only. Defines the intensity of the cookie texture.
Cookie FalloffSpot only. Disables spotlight fadeoff.
LayersThe layers this light will affect.

Scripting Interface

You can control the light component's properties using a script component. The light component's scripting interface is here.