Razorbill
Operations

Lighting Operations

CreateDirectionalLight

Create a directional light entity (sun/moon). Creates an entity with Transform and DirectionalLightComponent.

ParameterTypeRequiredDescription
entity_namestringYesLight entity name
directionarrayNoDirection [x, y, z] pointing FROM light toward scene (default: [0,-1,0])
colorarrayNoRGB color [r, g, b] in linear space (default: [1,1,1])
intensitynumberNoIntensity multiplier, supports HDR > 1.0 (default: 1.0)
casts_shadowsbooleanNoEnable shadow casting (default: true)
shadow_resolutionintegerNoShadow map resolution 512-4096 (default: 2048)
positionarrayNoEntity position [x, y, z] (used for shadow map calculation)
parent_guidstringNoParent 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.

ParameterTypeRequiredDescription
entity_namestringYesLight entity name
positionarrayNoWorld position [x, y, z] (default: [0,0,0])
colorarrayNoRGB color [r, g, b] in linear space (default: [1,1,1])
intensitynumberNoIntensity multiplier (default: 1.0)
radiusnumberNoFalloff radius in world units (default: 10.0)
casts_shadowsbooleanNoEnable shadow casting (default: false)
parent_guidstringNoParent 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.

ParameterTypeRequiredDescription
presetstringYesPreset name (see table below)
parent_guidstringNoParent entity for the light group

Available Presets

PresetLightsDescription
OutdoorSunny1 directionalWarm sun, intensity 1.5, shadows on
OutdoorCloudy1 directionalCool overcast, intensity 0.8, no shadows
IndoorBright2 point lightsWhite ceiling lights, intensity 1.2 each
IndoorDim2 point lightsWarm ambient, intensity 0.4 each
StudioThreePoint1 directional + 2 pointKey + fill + rim light setup
NightMoonlight1 directionalBlue moonlight, intensity 0.15, shadows on
{
  "op": "ApplyLightingPreset",
  "params": { "preset": "StudioThreePoint" }
}

On this page