Skip to main content

Light

The Light Component attaches a dynamic light source to the Entity. The 'Type' property determines what kind of light is attached and what other properties are available.

Directional

Light Component (Directional)

Omni

Light Component (Omni)

Spot

Light Component (Spot)

Properties

PropertyDescription
TypeThe type of light. Options are: Directional (uniform direction), Spot (cone from a point), Omni (all directions from a point).
ColorThe color of the emitted light.
IntensityThe intensity of the light, acts as a scalar value for the light's color. Range is 0 to 32.
RangeOmni and Spot only. The distance from the light source at which its contribution falls to zero.
Falloff ModeOmni and Spot only. Controls the rate at which a light attenuates from its position. Options are: Linear, Inverse Squared.
Inner Cone AngleSpot only. The angle in degrees from the spotlight direction at which the light starts to fall off.
Outer Cone AngleSpot only. The angle in degrees from the spotlight direction at which the light falls to zero.
ShapeThe shape of the light source for area lighting. Options are: Punctual, Rectangle, Disk, Sphere. Only available when area lights are enabled in render settings.

Lightmap Properties

PropertyDescription
StaticMark this light as non-moving for optimization purposes.
Bake LightmapEnable lightmap baking from this light.
Bake DirectionInclude directional information in baked lightmaps.
Bake SamplesThe number of samples used when baking lightmaps. Range is 1 to 255.
Bake AreaThe spread angle for baking soft shadows. Range is 0 to 180 degrees.
Affect LightmappedIf enabled, this light will affect lightmapped objects at runtime.
Affect DynamicIf enabled, this light will affect non-lightmapped (dynamic) objects.
Affect SpecularityDirectional only. If enabled, this light contributes to specular reflections on materials.

Shadow Properties

PropertyDescription
Cast ShadowsIf enabled, the light will cause shadow casting models to cast shadows.
Shadow Update ModeWhen the shadowmap is updated. Options are: Once (generated once), Realtime (updated every frame).
ResolutionThe resolution of the shadowmap. Options range from 16x16 to 4096x4096. Higher values produce more accurate shadows at the cost of performance.
CascadesDirectional only. The number of shadow cascades. Options are: 1, 2, 3, 4. More cascades provide better shadow quality at different distances.
Cascade DistributionDirectional only. Controls how the shadow cascades are distributed. Range is 0 to 1. Only shown when Cascades is greater than 1.
DistanceThe maximum distance from the camera beyond which shadows are no longer visible.
Shadow IntensityThe darkness of the shadows. Range is 0 (no shadow) to 1 (fully dark).
Shadow TypeThe shadow mapping algorithm. Options are: Shadow Map PCF 1x1, Shadow Map PCF 3x3, Shadow Map PCF 5x5, Variance Shadow Map (16bit), Variance Shadow Map (32bit).
VSM Blur ModeVSM only. The blur algorithm for variance shadow maps. Options are: Box, Gaussian.
VSM Blur SizeVSM only. The size of the blur kernel. Range is 1 to 25.
VSM BiasVSM only. Bias value to reduce shadow artifacts.
Shadow BiasPCF only. Bias value to reduce shadow acne artifacts.
Normal Offset BiasPCF only. Offset along normals to reduce peter-panning artifacts.
PropertyDescription
CookieOmni and Spot only. A texture asset (or cubemap for Omni) to be projected from the light.
Cookie IntensityThe strength of the cookie texture. Range is 0 to 1.
Cookie AngleSpot only. The rotation angle of the cookie texture in degrees.
Cookie OffsetSpot only. The UV offset of the cookie texture.
Cookie ScaleSpot only. The UV scale of the cookie texture.
Cookie FalloffSpot only. If enabled, applies the spotlight falloff to the cookie.
Cookie ChannelThe texture channel(s) to use for the cookie. Options are: R, G, B, A, RGB.

Other Properties

PropertyDescription
LayersThe layers that this light will affect.

See Also

Scripting Interface

You can control a Light Component's properties using a Script Component. The Light Component's scripting interface is here.