BeamNG levels use two main local light object classes:
PointLightSpotLightBoth inherit common behavior from LightBase, but they emit light differently and use different default physical units.
PointLight emits light in all directions, while SpotLight emits light in a cone.
| Class | Description | Default physical unit |
|---|---|---|
PointLight |
Emits light in all directions from a point. | Lumens (lm) |
SpotLight |
Emits light in a directional cone. | Candelas (cd) |
Use PointLight for omnidirectional sources such as bulbs, lamps, small glow sources, or area-like fill lights.
Use SpotLight for directional sources such as headlights, flashlights, street lamps, spot lamps, and projected beam patterns.
{
"class": "PointLight",
"name": "garage_bulb",
"position": [10, 20, 3],
"rotationMatrix": [1,0,0,0,1,0,0,0,1],
"color": [1, 0.86, 0.65, 1],
"intensity": 800,
"intensityUnit": "lm",
"radius": 12,
"castShadows": false,
"isEnabled": true
}
{
"class": "SpotLight",
"name": "street_lamp",
"position": [10, 20, 6],
"rotationMatrix": [1,0,0,0,1,0,0,0,1],
"color": [1, 0.86, 0.65, 1],
"intensity": 25000,
"intensityUnit": "cd",
"range": 35,
"innerAngle": 35,
"outerAngle": 65,
"castShadows": true,
"isEnabled": true
}
These fields are shared by both PointLight and SpotLight.
| Field | Type | Description |
|---|---|---|
isEnabled |
bool | Enables or disables the light. |
color |
ColorLinear4F | Light color. Usually RGB + alpha. |
intensity |
number | Physical light intensity value. Unit depends on intensityUnit or light type. |
intensityUnit |
string | Unit used by the editor/runtime, such as lm, cd, or ev. |
brightness |
number | Legacy compatibility/fallback value. Prefer intensity. |
castShadows |
bool | Enables shadows from this light. |
priority |
number | Used by the light manager when sorting/selecting lights. |
animate |
bool | Enables light animation. |
animationType |
LightAnimData | Light animation datablock. |
animationPeriod |
number | Animation playback period in seconds. |
animationPhase |
number | Animation time offset. Useful to desynchronize nearby lights. |
flareType |
LightFlareData | Light flare datablock. |
flareScale |
number | Global scale multiplier for the flare. |
Some renderer/light-manager-specific fields may be injected at runtime or exposed by editor tools depending on the active renderer.
Modern lighting should use intensity with a physical unit.
PointLight uses lumens by default.
"intensity": 800,
"intensityUnit": "lm"
Lumens describe total emitted luminous flux in all directions.
This is useful for sources like:
SpotLight uses candelas by default.
"intensity": 25000,
"intensityUnit": "cd"
Candelas describe directional luminous intensity.
This is useful for:
For a spotlight aimed directly at a surface, a rough estimate is:
lux = candela / distance²
For example, 25,000 cd at 25 m gives approximately 40 lux.
The brightness field exists for compatibility with older content.
Modern content should use:
"intensity": 1000,
"intensityUnit": "lm"
or:
"intensity": 1000,
"intensityUnit": "cd"
instead of relying on brightness.
Light color is stored as linear RGBA:
"color": [1, 0.86, 0.65, 1]
For realistic lights, use color temperature/Kelvin controls in the editor when possible.
Typical examples:
| Light source | Approx. Kelvin |
|---|---|
| Candle / warm lamp | 1900–2700 K |
| Incandescent / halogen | 3000–3500 K |
| Neutral white LED | 4000–5000 K |
| Daylight | 5500–6500 K |
| Cool sky/shade | 8000 K+ |
PointLight emits light in all directions from a point.
It is best for lights that should illuminate evenly around the source.
| Field | Type | Description |
|---|---|---|
radius |
number | Effective light range in meters. Also controls the editor visualization sphere. |
Example:
{
"class": "PointLight",
"name": "interior_light",
"position": [0, 0, 2],
"intensity": 400,
"intensityUnit": "lm",
"radius": 8,
"color": [1, 0.82, 0.6, 1]
}
radius defines how far the light is allowed to contribute.
"radius": 8
The light still uses inverse squared falloff. The radius only limits/clamps the light’s effective range.
Large radius values can increase cost because the light affects more objects and pixels.
Use PointLight for:
Avoid using point lights for directional beams such as headlights or street lamps. Use SpotLight instead.
SpotLight emits light in a cone.
It is best for lights that have a clear direction and beam shape.
| Field | Type | Description |
|---|---|---|
range |
number | Effective cone length/range in meters. |
innerAngle |
number | Inner cone angle in degrees. Full intensity inside this cone. |
outerAngle |
number | Outer cone angle in degrees. Light fades toward this limit. |
Example:
{
"class": "SpotLight",
"name": "headlight_left",
"position": [0.9, 2.4, 0.6],
"intensity": 45000,
"intensityUnit": "cd",
"range": 120,
"innerAngle": 12,
"outerAngle": 45,
"color": [1, 0.92, 0.78, 1]
}
range defines how far the spotlight cone extends.
"range": 35
Like PointLight.radius, this clamps contribution range. It does not create non-physical falloff.
The spotlight cone is controlled by two angles:
"innerAngle": 35,
"outerAngle": 65
innerAngle, the light is at full cone intensity.innerAngle and outerAngle, the light fades out.outerAngle, the light does not contribute.innerAngle is clamped so it cannot be greater than outerAngle.
When using candelas, the intensity represents directional brightness and is not reduced by changing cone angle.
When using lumens, the emitted luminous flux is distributed across the cone. A wider cone spreads the same light over a larger area.
With cd, cone angle changes the beam shape but not the center-beam candela value.
With lm, cone angle affects how concentrated the light appears.
Use SpotLight for:
Both PointLight and SpotLight can cast shadows:
"castShadows": true
Shadows improve realism but are expensive.
Use shadow-casting lights carefully, especially if there are many lights in the scene.
Good candidates for shadows:
Poor candidates:
priority helps the light manager decide which lights are more important.
"priority": 1
Higher-priority lights are preferred when the renderer needs to sort or limit light influence.
Use higher priority for important gameplay or visual lights, and lower priority for decorative lights.
Spotlights can use cookie textures to shape their beam.
A cookie masks the light spatially:
Cookies are useful for:
Example:
"cookie": "/levels/example/art/lights/streetlamp_cookie.color.png"
IES files can be converted into cookie textures using the IES Cookie Importer.
The generated cookie texture represents the measured light distribution pattern, while the light intensity remains controlled by lumens or candelas.
Useful for:
See Physically Based Lighting for more information about IES profiles and cookies.
Lights can reference LightAnimData through animationType.
Example:
{
"animate": true,
"animationType": "FlickerLightAnim",
"animationPeriod": 5,
"animationPhase": 0.25
}
Light animation can affect properties such as:
Common uses:
animationPhase is useful to offset multiple lights so they do not all animate identically.
Lights can reference LightFlareData through flareType.
Example:
{
"flareType": "LightFlareExample0",
"flareScale": 1
}
Flares are visual screen-space/lens-style effects. They do not add real illumination.
Use flares for:
Avoid relying on flares to fake lighting. Use actual light intensity for illumination.
When a light is selected, the editor can display its shape:
PointLight shows a sphere using radiusSpotLight shows a cone using range and outerAngleThe visualization helps understand what area the light affects.
PointLight and SpotLight remove normal object scale from the inspector because their size is controlled by light-specific fields:
| Light | Size fields |
|---|---|
PointLight |
radius |
SpotLight |
range, innerAngle, outerAngle |
Internally, editor scaling may modify these fields, but serialized content should use the explicit light fields.
Local lights can be expensive depending on:
General rules:
PointLight for omnidirectional lights.SpotLight for directional beams.priority for important lights.brightness.Possible causes:
isEnabled is falseintensity is too lowintensityUnitCheck:
Check the object rotation. SpotLight uses its transform direction to aim the cone.
Possible causes:
castShadows is falsePossible causes:
Flares are visual effects only. Increase the actual light intensity or add a real light source.
Reduce:
PointLight and SpotLight are the main local light classes used in levels.
PointLight emits in all directions and uses lumens by default.SpotLight emits in a cone and uses candelas by default.Use physically based values, realistic ranges, and limited shadow casting for the best balance between quality and performance.
For a level-wide nighttime workflow, see Night Lighting .
Was this article helpful?