Ambient lighting is indirect light in the scene. It reaches surfaces after being scattered by the sky, clouds, atmosphere, terrain, buildings, and other surrounding objects.
Unlike direct lights, such as the sun, headlights, or street lamps, ambient lighting does not come from one exact direction. Instead, it fills shadowed areas and connects objects to the environment.
Without ambient lighting, areas outside direct light would become completely black. Use it to control:
In a physically based setup, ambient lighting works with exposure and tone mapping so shadows stay readable without fake fill lights or arbitrary brightness values.
Direct lighting comes from a specific light source.
Examples:
Ambient lighting is indirect environment light.
Examples:
A surface can receive both direct and ambient light at the same time.
In BeamNG, outdoor ambient lighting is mainly driven by the sky and atmosphere. The engine samples the sky and stores the result as directional ambient data using Spherical Harmonics (SH9).
This makes ambient lighting directional:
This gives outdoor lighting more shape than a single flat ambient color.
The current sky pipeline updates ambient data from the atmospheric sky. It accounts for sun direction, sun transmittance, ground contribution, exposure changes, and cloud transmittance when clouds are active.
Ambient lighting changes dynamically with the environment.
It is affected by:
Ambient color also changes throughout the day. Clear noon skies often produce cool blue shadows, overcast skies are softer and more neutral, and sunset can make ambient light warmer, darker, and more saturated. This affects materials, shadows, reflections, fog, and clouds.
For example, a clear noon sky produces strong blue ambient light in shadows, while an overcast sky creates softer and more uniform ambient lighting. At sunset, ambient light can become warmer or darker depending on sun angle and atmosphere.
The engine approximates light reflected from the ground into the lower hemisphere. This prevents downward-facing surfaces from becoming completely black and makes objects sit naturally in the scene.
Ground bounce is influenced by sky and sun contribution and is part of the ambient lighting calculation.
Ambient lighting is affected by ambient occlusion. Ambient occlusion darkens areas where indirect light would be blocked, such as:
This restores depth that would otherwise be lost when ambient light fills shadowed regions.
BeamNG uses GTAO+ for runtime screen-space ambient occlusion. See Lighting Techniques for how it works, what it affects, and its screen-space limitations.
Ambient lighting is also used to normalize static cubemap reflections against the scene. This affects:
Dynamic reflection quality is controlled separately by graphics settings such as dynamic reflections, update rate, distance, and texture size. These settings affect reflection quality and performance, but they do not replace correct ambient lighting.
Fog and clouds also use ambient lighting data. Sky ambient data keeps fog and volumetric effects aligned with the current outdoor lighting.
Fog and clouds can shift with:
Atmospheric fog also uses sun direction, sun radiance, exposure, and ambient/fog color data, so it follows sky, sun, and exposure changes.
Cloud quality settings affect volumetric cloud sampling and shadow/transmittance update cost. This can change how accurately clouds influence the sky ambient result, especially in dynamic weather.
For sky object fields and night-sky authoring, see Sky, Atmosphere, and Night Sky .
For artists and modders, ambient lighting changes:
Avoid judging materials only under direct light. Check shadowed areas and different weather/time conditions.
Possible causes:
Possible causes:
Was this article helpful?