Light component
Local Point and Spot lights. For the scene sun, see Scene sun.
- Create a GameObject.
- Add a Light component.
- Choose Point or Spot.
- Set Lumens (default 800).
- Enable Cast Shadows only on lights that need them.
Shared properties
Section titled “Shared properties”| 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.
Shadows
Section titled “Shadows”| 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.
Volumetric fog
Section titled “Volumetric fog”| Widget | Purpose |
|---|---|
| Active | This light feeds volumetric fog. |
| Strength | Fog contribution. |
Scripting
Section titled “Scripting”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.
Continue reading
Section titled “Continue reading”Previous: Scene sun: global sun and CSM.
Next: Local shadows: per-light shadows and Engine Settings limits.
