Operations
Lighting Operations
CreateDirectionalLight
Create a directional light entity (sun/moon). Creates an entity with Transform and DirectionalLightComponent.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_name | string | Yes | Light entity name |
direction | array | No | Direction [x, y, z] pointing FROM light toward scene (default: [0,-1,0]) |
color | array | No | RGB color [r, g, b] in linear space (default: [1,1,1]) |
intensity | number | No | Intensity multiplier, supports HDR > 1.0 (default: 1.0) |
casts_shadows | boolean | No | Enable shadow casting (default: true) |
shadow_resolution | integer | No | Shadow map resolution 512-4096 (default: 2048) |
position | array | No | Entity position [x, y, z] (used for shadow map calculation) |
parent_guid | string | No | Parent entity GUID |
{
"op": "CreateDirectionalLight",
"params": {
"entity_name": "Sun",
"direction": [-0.5, -0.7, -0.5],
"color": [1.0, 0.95, 0.85],
"intensity": 1.5,
"casts_shadows": true
}
}
CreatePointLight
Create a point light entity. Creates an entity with Transform and PointLightComponent.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_name | string | Yes | Light entity name |
position | array | No | World position [x, y, z] (default: [0,0,0]) |
color | array | No | RGB color [r, g, b] in linear space (default: [1,1,1]) |
intensity | number | No | Intensity multiplier (default: 1.0) |
radius | number | No | Falloff radius in world units (default: 10.0) |
casts_shadows | boolean | No | Enable shadow casting (default: false) |
parent_guid | string | No | Parent entity GUID |
{
"op": "CreatePointLight",
"params": {
"entity_name": "CampfireLight",
"position": [10, 2, -5],
"color": [1.0, 0.6, 0.2],
"intensity": 3.0,
"radius": 20
}
}
ApplyLightingPreset
Apply a predefined lighting setup. Multi-light presets create a parent group entity.
| Parameter | Type | Required | Description |
|---|---|---|---|
preset | string | Yes | Preset name (see table below) |
parent_guid | string | No | Parent entity for the light group |
Available Presets
| Preset | Lights | Description |
|---|---|---|
OutdoorSunny | 1 directional | Warm sun, intensity 1.5, shadows on |
OutdoorCloudy | 1 directional | Cool overcast, intensity 0.8, no shadows |
IndoorBright | 2 point lights | White ceiling lights, intensity 1.2 each |
IndoorDim | 2 point lights | Warm ambient, intensity 0.4 each |
StudioThreePoint | 1 directional + 2 point | Key + fill + rim light setup |
NightMoonlight | 1 directional | Blue moonlight, intensity 0.15, shadows on |
{
"op": "ApplyLightingPreset",
"params": { "preset": "StudioThreePoint" }
}