Local lights are used for fixtures, street lamps, tunnels, interiors, vehicle-adjacent props, signs, industrial areas, and any other scene element that needs direct illumination beyond the sun, sky, and ambient lighting.
BeamNG supports two main local light objects:
| Light type | Use for | Main controls | Default unit |
|---|---|---|---|
PointLight |
Omnidirectional sources such as bulbs, small lamps, interior lights, and local fill | radius |
Lumens (lm) |
SpotLight |
Directional sources such as street lamps, headlights, floodlights, tunnel lights, and projected beams | range, innerAngle, outerAngle |
Candelas (cd) |
Both light types use physically based intensity values and inverse squared falloff. The light radius or range limits how far the light is allowed to contribute, but it does not create a custom linear falloff.
Create local lights from the World Editor object creation tools under the environment/object categories, then tune them in the Inspector.
A typical setup order:
lm for point lights or cd for spot lights.radius or range only as large as needed.castShadows only where shadows add visible value.For night-only level lights, mark the light as a night light instead of leaving it active all day. See Night Lighting for the automatic day/night workflow.
These values are only starting points. Final values depend on fixture size, mounting height, cone angle, exposure, fog, material brightness, and nearby lights.
| Use case | Light type | Suggested setup |
|---|---|---|
| Small warm bulb | PointLight |
400-1000 lm, radius 5-12 m, no shadows |
| Interior lamp | PointLight |
500-2000 lm, tight radius, shadows only if close and important |
| Street lamp | SpotLight |
10000-50000 cd, range 25-60 m, wide cone, optional IES cookie |
| Tunnel fixture | SpotLight |
Repeated moderate cd lights, limited range, cookies for fixture shape |
| Floodlight | SpotLight |
High cd, long range, aimed at a specific area, shadows only on key lights |
| Decorative distant lamp | PointLight or SpotLight |
Small range, usually no shadows, visible emissive/flare for readability |
For first-time users, start with one representative light, make it correct, then duplicate it. For experienced users, build lighting families: one setup for each fixture type, with consistent intensity, color temperature, range, shadow use, naming, and night-light fields.
Official levels usually keep the visible fixture mesh and the actual light emitter as separate objects. For example, a pole, tunnel lamp, or gas station canopy mesh is a TSStatic, while the illumination comes from one or more nearby SpotLight or PointLight objects.
For night lighting, the mesh and light are linked with dynamic fields:
child on the fixture mesh points to one or more light object names.nightEmissive makes the fixture mesh glow at night.nightEmissiveColor sets an explicit glow color when the mesh is not inheriting color from a linked light.nightLight can also mark a light directly for automatic night control.isEnabled:false is preferred on night-only lights so they are not active during the day.This split workflow makes it easier to group meshes separately from emitters, copy tuned light families, and keep visible glow matched to real illumination. Double-headed poles and larger fixtures can link multiple lights with child, child1, child2, and similar indexed fields. When a mesh links to lights, the first linked light provides the mesh’s night emissive color.
Common official patterns:
| Fixture family | Typical setup |
|---|---|
| Street poles | Wide SpotLight, range around 45-60 m, warm or cool color, often shadowed near roads |
| Tunnel lights | Repeated short-range SpotLight objects, usually around 15 m range, often with dayIntensity and nightIntensity |
| Port / industrial floodlights | Aimed high-intensity SpotLight objects, longer range, shadows only on key fixtures |
| Gas station canopy lights | Wide downward SpotLight objects with moderate intensity and matched emissive canopy meshes |
| Interior bulbs | Small PointLight or short-range SpotLight, tight range, shadows only if close and visible |
| Visual-only helpers | Tiny or zero-range light with flareType, used for a visible sparkle, not real illumination |
Both PointLight and SpotLight inherit common fields from LightBase.
| Field | Description |
|---|---|
isEnabled |
Enables or disables the light. |
color |
Linear RGBA light color. Prefer realistic color temperature where possible. |
useColorTemperature |
Editor metadata that enables Kelvin-based color authoring for the light. |
colorTemperatureKelvin |
Saved Kelvin value used by the color temperature editor. |
colorTemperatureFilamentId |
Saved filament or lamp type used to tint the Kelvin color, such as blackbody, tungsten, halogen, sodium, or xenonHid. |
colorTemperatureDegradation |
Saved aging/degradation amount from 0 to 1 for filament types that support degradation tinting. |
intensity |
Preferred physical light intensity value. |
intensityUnit |
Editor/runtime unit such as lm, cd, or ev. |
brightness |
Legacy intensity field. Prefer intensity for new content. |
castShadows |
Enables shadows from this light. |
priority |
Increases importance for light/shadow selection when budgets are limited. |
cookie |
Optional projected texture used to shape the light output. |
texSize |
Requested shadow texture size for the light. |
flareType, flareScale |
Visual flare effect. Flares do not illuminate the scene. |
animate, animationType |
Optional light animation, such as flicker, fire, or rotating beacons. |
animationPeriod, animationPhase |
Animation timing and offset. Use phase to avoid rows of lights flickering in sync. |
brightness. New content should use intensity with the correct unit so values remain predictable with physically based lighting.The Inspector can show intensity in lumens, candelas, or EV, but the engine stores the canonical value on the light:
PointLight stores intensity as lumens.SpotLight stores intensity as candelas.intensityUnit is saved as editor metadata so the value can be shown in the chosen unit.SpotLight is edited in lumens, conversion uses the current outerAngle.The color temperature option is saved as editor metadata. When enabled, the Kelvin control drives the saved linear color, while these dynamic fields preserve the authoring setup:
useColorTemperature: enables Kelvin-based authoring.colorTemperatureKelvin: stores the selected Kelvin value.colorTemperatureFilamentId: stores the selected filament or lamp type.colorTemperatureDegradation: stores the aging/degradation tint amount from 0 to 1.Kelvin sets the base white point. The filament type adds a lamp-specific tint for technologies such as tungsten, halogen, sodium vapor, mercury vapor, metal halide, phosphor LED, and xenon HID. Degradation can be used to add subtle variation or worn-lamp color shifts on supported filament types.
If a light already has a color but no saved Kelvin metadata, the editor can initialize the color temperature control by matching the color to the nearest known preset. After that, changing Kelvin, preset, filament type, or degradation updates the light’s saved color.
PointLight and SpotLight do not use normal object scale for their light size. Use radius for point lights and range / cone angles for spot lights.
attenuationRatio may still appear in some editor fields or older content, but all local lights use inverse squared falloff.
PointLight emits in all directions from a position. It is best for sources that are roughly omnidirectional:
The main field is radius.
{
"class": "PointLight",
"name": "garage_bulb",
"intensity": 800,
"intensityUnit": "lm",
"radius": 10,
"color": [1, 0.86, 0.65, 1],
"castShadows": false
}
radius is the maximum effective range of the light. Keep it close to the real area the fixture should affect. A point light with a very large radius touches many more pixels and clusters, and can become expensive even if the intensity is modest.
Avoid using point lights for beams, headlights, street lamps, or floodlights. Those should usually be SpotLight objects because they have a direction and a controlled cone.
SpotLight emits in a cone. It is best for sources that aim light in a specific direction:
The main fields are range, innerAngle, and outerAngle.
{
"class": "SpotLight",
"name": "street_lamp",
"intensity": 25000,
"intensityUnit": "cd",
"range": 35,
"innerAngle": 35,
"outerAngle": 65,
"color": [1, 0.78, 0.48, 1],
"castShadows": true
}
range is the maximum cone length. innerAngle is the full intensity part of the cone, and outerAngle is where the light fades out to zero. The inner angle is clamped so it cannot be larger than the outer angle.
When using candelas, the intensity describes directional brightness. Changing the cone angle changes where the light goes, but not the center-beam candela value. When using lumens, the same total light is spread over the cone, so wider cones appear less concentrated.
For a spotlight aimed directly at a surface:
lux = candela / distance²
For example, 25000 cd at 25 m gives roughly 40 lux before losses from angle, cookies, fog, occlusion, and surface response.
Cookies are textures that mask the light output by direction. White keeps the full configured light intensity, gray reduces it, and black blocks it.
Use cookies for:
A cookie does not make the light brighter than its intensity. It only shapes where the light goes. This is important for physically based lighting: the intensity remains a real value, while the cookie represents the fixture optics.
Cookies are most common on spot lights, but point lights can also use cookies for directional variation around the source. Reuse cookie textures where possible. The clustered lighting path has a limited number of unique cookie textures available per frame, so many unique IES textures in one view can compete with each other.
IES files can be converted into cookie textures with the IES Cookie Importer. The usual output is a *.color.png cookie texture and a matching *.cookie.json metadata file. When matching metadata is available, Apply IES if available can apply useful values such as intensity, cone angle, and color temperature to the selected light.
See Physically Based Lighting for the IES workflow.
There are two separate visual glow systems:
flareType / flareScale uses a LightFlareData asset. This is an author-controlled screen-space flare and does not illuminate the scene.These systems are independent. Setting flareType does not control the automatic clustered distance corona, and the automatic corona does not replace a manually authored flare.
Use flares for visible bright fixtures, warning lights, small bulbs, or far-away points of interest. Keep the flare color and scale consistent with the real light and emissive mesh.
Local lights can cast dynamic shadows with castShadows.
Shadows are useful for:
Avoid shadows on:
Since BeamNG version 0.39, the local lighting path uses clustered shading for point and spot lights. Instead of drawing every light over large screen areas one by one, the camera view is divided into a 3D grid of clusters. Local lights are assigned only to the clusters they can affect, and the shader evaluates the relevant lights for each pixel.
In practical terms, this means:
The clustered grid has finite per-cluster limits. If too many large lights overlap the same view area, the renderer has to cull and prioritize. Keeping lights local and avoiding excessive overlap gives better quality and more stable performance.
Clustered shading also has a local light LOD system. The renderer estimates how large each light’s influence is on screen. When a light becomes very small on screen, the real clustered light can be faded out and replaced by a cheap additive billboard/corona.
This fake distant light keeps small far-away lamps readable without paying the full cost of shading the scene with every distant light. The transition is crossfaded: as the real light approaches the screen-size cutoff it fades down, while the cheap flare fades in. When the light is below the cutoff, only the flare remains.
For SpotLight, the fake flare is also direction aware. A spotlight only gets the corona when the camera is inside or near its beam, so a lamp facing away does not glow like an omnidirectional bulb.
For content creators, this means:
Point and spot light shadows use a shared clustered shadow atlas. The atlas is a large texture budget used by local lights that need shadows. Spot lights usually need one shadow view. Point lights can need up to six views because they cast in all directions.
The renderer schedules atlas updates based on visibility, screen size, priority, distance, and timing budget. Important nearby lights may update more often or receive better atlas space, while distant or low-impact lights may update less often or be skipped.
For content creators, this means:
SpotLight is usually cheaper than a shadowed PointLight.The clustered shadow system only gives full attention to a limited number of local shadow casters at once. Spot lights are more efficient because they usually need one shadow view. Point lights can need up to six views, so they consume more atlas and update budget.
SpotLight. It gives better control, works well with cookies/IES profiles, and is usually cheaper to shadow than an omnidirectional point light.Use the World Editor Inspector for detailed light authoring, including color temperature, intensity units, cookies, cone angles, shadows, night lighting settings, and advanced fields.
Use the IES Cookie Importer to create cookie textures and sidecar metadata from IES profiles. These can then be assigned with Apply IES if available in the Inspector.
The cost of a local light depends mostly on how much of the scene it affects and whether it casts shadows.
Important cost factors:
Clustered shading improves the base cost of many local lights, but it does not make light setup free. A level with hundreds of small, limited, mostly unshadowed night lights can perform well. A level with many large overlapping shadowed lights can still become expensive in certain situations.
SpotLight for directional fixtures.PointLight only when light really needs to emit in all directions.radius and range as small as the art allows.For larger or more polished scenes, check these before finalizing lighting:
dayIntensity and nightIntensity used for tunnels or always-present fixtures instead of duplicating lights?outerAngle values above 160-170 degrees on shadow-casting spot lights.Check exposure, intensity unit, range/radius, distance to the surface, cone angle, and cookie brightness. For spot lights, estimate the expected surface lux from the candela value and distance.
Flares and emissive materials do not light the scene by themselves. Make sure the actual PointLight or SpotLight has suitable physical intensity and range.
Check the object rotation. A SpotLight uses its transform direction to aim the cone.
Check castShadows, shadow quality settings, distance, and whether too many shadowed lights are competing for the atlas.
Reduce active shadowed lights first, then reduce range/radius and overlap. Large shadowed point lights are especially expensive compared to targeted spot lights.
Was this article helpful?