Skip to content

Light component

Local Point and Spot lights. For the scene sun, see Scene sun.

Light component
  1. Create a GameObject.
  2. Add a Light component.
  3. Choose Point or Spot.
  4. Set Lumens (default 800).
  5. Enable Cast Shadows only on lights that need them.
Widget Purpose Default
Tint RGB color. white
Temperature (K) Color temperature. 6500
Lumens Output. 800
Range (m) Distance where the light fades out. 10
Cast Specular Contribute to highlights. on
Cast Shadows Request a local shadow map. off
Ignore Distance Culling Keep the light when far from the camera. off

Spot only:

Widget Purpose Default
Cone Angle (deg) Half-angle of the cone. 45

There is no local directional light.

Widget Purpose Default
Cast Shadows Opt this light into the local-shadow budget. off
Shadow Bias Acne offset. Point default 0.1. Spot default 0.03 (set when you switch to Spot).
Shadow Normal Bias Offset along normals. 1.0
Shadow Blur Edge softness. 1.0

Up to 16 local lights can cast shadows at once. Engine Settings Local Light Shadows must be on. See Local shadows.

Widget Purpose
Active This light feeds volumetric fog.
Strength Fog contribution.

Read the light component and set its properties from C#. Property setters route to the native light:

using Kolpa.Engine;
public class Dimmer : MonoBehaviour
{
public override void OnCreate()
{
PointLight light = gameObject.GetComponent<PointLight>();
if (light != null)
{
light.Intensity = 4f;
light.Color = Color.White;
light.Range = 12f;
light.CastsShadows = true;
}
}
}

DirectionalLight, PointLight, and SpotLight share the Intensity, Color, Range, and CastsShadows properties. See PointLight.

Previous: Scene sun: global sun and CSM.

Next: Local shadows: per-light shadows and Engine Settings limits.