LevelInfo

LevelInfo stores level-wide rendering, environment, lighting, fog, audio, gravity, and map settings.

A normal level should have one main LevelInfo object, usually named:

theLevelInfo

Many systems look up theLevelInfo directly for global level settings such as gravity and environment cubemaps.


Basic example

A typical LevelInfo entry in a level file:

{
  "class": "LevelInfo",
  "name": "theLevelInfo",

  "nearClip": 0.1,
  "visibleDistance": 2000,
  "decalBias": 0.0005,

  "fogDensity": 0.0004,
  "fogAtmosphereHeight": 0,

  "canvasClearColor": [0, 0, 0, 255],

  "gravity": -9.80665,
  "temperatureCurveC": [0, 12, 0.25, 18, 0.5, 24, 0.75, 17, 1, 12],

  "ambientLightBlendPhase": 1,
  "advancedLightmapSupport": false,
  "globalEnviromentMap": "DefaultSkyCubemap",

  "soundAmbience": "AudioAmbienceDefault",
  "soundDistanceModel": "Logarithmic",

  "bigMapLevelBorderVisible": false,
  "bigMapTimeOfDay": 0.13
}

Important fields

Field Type Description
class string Must be "LevelInfo".
name string Usually "theLevelInfo".
nearClip number Closest camera render distance.
visibleDistance number Furthest camera render distance.
decalBias number Near-plane/depth bias used by decals and decal roads.
fogDensity number Exponential fog density.
fogAtmosphereHeight number Height value for altitude-based fog falloff.
canvasClearColor colorI[4] Background clear color before scene/GUI rendering.
gravity number Level gravity, usually negative Z acceleration.
temperatureCurveC array Time/temperature curve in Celsius.
ambientLightBlendPhase number Seconds used to blend between ambient light colors.
ambientLightBlendCurve EaseF Interpolation curve for ambient light blending.
advancedLightmapSupport bool Enables expanded static/dynamic lighting support with advanced lighting.
globalEnviromentMap CubemapData name Global environment cubemap for reflections/IBL fallback.
soundAmbience SFXAmbience name Global ambient sound environment.
soundDistanceModel enum Distance attenuation model for audio.
bigMapLevelBorderVisible bool Shows black border around the level in map mode.
bigMapTimeOfDay number Time of day used by map mode.
The field name is spelled globalEnviromentMap in the engine code. Use that spelling, not globalEnvironmentMap.

Visibility

Visibility settings control the camera render range and decal depth bias.

"nearClip": 0.1,
"visibleDistance": 2000,
"decalBias": 0.0005

nearClip

"nearClip": 0.1

nearClip is the closest distance from the camera that the world is rendered.

Very low values can reduce depth precision and may cause z-fighting. The engine clamps it above zero internally:

minimum effective nearClip = 0.001

Use typical values such as:

0.05 - 0.2

visibleDistance

"visibleDistance": 2000

visibleDistance is the far render distance for the level.

Higher values allow distant terrain and objects to remain visible, but they can increase rendering cost and reduce depth precision.

Use larger values for:

  • Large open maps
  • Oceans or distant terrain
  • Mountain vistas
  • Aerial gameplay

Use smaller values for:

  • Interior maps
  • Small closed maps
  • Performance-constrained scenes

decalBias

"decalBias": 0.0005

decalBias affects decal and DecalRoad rendering.

It helps avoid z-fighting between projected decals and the surfaces underneath.

This should be tuned together with visibleDistance. Very large far distances can require different depth-bias values.


Fog

LevelInfo stores scene fog amount/range data.

"fogDensity": 0.0005,
"fogAtmosphereHeight": 0

fogDensity

"fogDensity": 0.0004

Controls exponential fog density.

Typical values are small. Large values can make the scene disappear into fog very quickly.

Example values:

Value Effect
0 No exponential fog.
0.0001 Very light distance haze.
0.0005 Noticeable atmospheric haze.
0.002 Dense fog.

fogAtmosphereHeight

"fogAtmosphereHeight": 0

Controls altitude-based fog falloff.

A value of 0 disables or minimizes height-based behavior depending on shader/setup. Positive values can be used for atmospheric height fog effects.


Environment

The environment group contains global physics/environment values.


gravity

"gravity": -9.80665

Gravity for the level.

The default value is Earth gravity:

-9.80665
When the LevelInfo object is named theLevelInfo, setting gravity also updates the static LevelInfo::theLevelInfoGravity value used by other systems.

Use negative values for normal downward Z gravity.

Examples:

"gravity": -9.80665
"gravity": -1.62

for moon-like low gravity.


temperatureCurveC

"temperatureCurveC": [0, 12, 0.25, 18, 0.5, 24, 0.75, 17, 1, 12]

temperatureCurveC stores a time/temperature curve in Celsius.

It is an array of pairs:

time0, temp0, time1, temp1, time2, temp2, ...

Time interpretation:

Time Meaning
0 12:00 / noon
0.5 00:00 / midnight
1 Wraps back to 12:00 / noon

The engine validates the curve:

  • If fewer than two pairs are supplied, it creates a flat 15°C curve.
  • First time is forced to 0.
  • Last time is forced to 1.
  • Last temperature is forced to match the first temperature for wraparound.

Minimal valid curve:

"temperatureCurveC": [0, 15, 1, 15]

Example day/night curve:

"temperatureCurveC": [
  0, 18,
  0.25, 24,
  0.5, 12,
  0.75, 10,
  1, 18
]

Canvas clear color

"canvasClearColor": [0, 0, 0, 255]

canvasClearColor is the color used to clear the background before rendering the scene or GUI.

This is usually hidden by sky/scene rendering, but can be visible during loading, camera transitions, missing sky setups, or editor/debug cases.

The type is integer RGBA:

[R, G, B, A]

with values from 0 to 255.


Lighting

Lighting fields affect ambient light transitions, advanced lightmap support, and global cubemap fallback.


ambientLightBlendPhase

"ambientLightBlendPhase": 1

Number of seconds used to blend from one ambient light color to another.

This is applied to the scene manager as ambient light transition time.

Use smaller values for quick changes, larger values for smooth transitions.


ambientLightBlendCurve

"ambientLightBlendCurve": "..."

Controls the interpolation curve used for ambient light blending.

The exact JSON representation depends on how EaseF is serialized in the surrounding engine/editor tools.


advancedLightmapSupport

"advancedLightmapSupport": false

Enables expanded support for mixing static and dynamic lighting in the advanced lighting manager.

When the active light manager is ADVLM, this controls whether the advanced light bin manager enables MRT lightmaps during the pre-pass.

This can improve support for certain baked/static lighting workflows, but may be more expensive.


globalEnviromentMap

"globalEnviromentMap": "DefaultSkyCubemap"

Sets the level’s global environment cubemap.

This cubemap can be used as a fallback when dynamic reflections are disabled or unavailable.

When assigned and the level is already added, the cubemap is recreated and its faces are updated.

The engine helper functions use this lookup order:

  1. theLevelInfo.globalEnviromentMap
  2. $defaultLevelEnviromentMap
  3. No cubemap if neither is valid

Related engine helpers:

getSceneCubemap()
getSceneSpecCubemap()
getSceneSpecCubemapNormalized()

These return the diffuse/specular cubemap or normalization state from the selected CubemapData.

The spelling Enviroment is used in the code and field name. Keep this spelling for compatibility.

Sound

LevelInfo sets global sound ambience and distance attenuation behavior.


soundAmbience

"soundAmbience": "AudioAmbienceDefault"

The global ambient sound environment for the level.

If no ambience is set, the engine tries to use:

AudioAmbienceDefault

On add, LevelInfo gets the global soundscape and assigns the ambience:

BNG_SFX->getSoundscapeManager()->getGlobalSoundscape()

When the LevelInfo is removed, the global soundscape is reset to the default ambience.

Use SFXSpace objects for localized ambience zones.


soundDistanceModel

"soundDistanceModel": "Logarithmic"

Controls the global distance attenuation model used by the audio system.

The default constructor value is:

SFXDistanceModelLogarithmic

Depending on available enum serialization, common values may include model names such as logarithmic/linear-style attenuation modes.

This affects how 3D SFXEmitter and other 3D audio sources attenuate over distance.


Map settings

LevelInfo also stores map-mode behavior.


bigMapLevelBorderVisible

"bigMapLevelBorderVisible": false

Enables a black border around the level in big map mode.


bigMapTimeOfDay

"bigMapTimeOfDay": 0.13

Sets the time of day used in map mode.

This is separate from the active world time-of-day object/settings.


Lifecycle behavior

When a LevelInfo object is added:

  1. It assigns default sound ambience if none is set.
  2. It applies the audio distance model.
  3. It updates the global soundscape ambience.
  4. It creates/updates the global environment cubemap if one is assigned.
  5. It updates the scene graph:
    • near clip
    • visible distance
    • decal bias
    • ambient light transition settings
    • fog data
    • advanced lightmap support
    • canvas clear color

When edited in the inspector, inspectPostApply() reapplies these settings.

When removed, it resets the global soundscape ambience to the default ambience.


Minimal LevelInfo

{
  "class": "LevelInfo",
  "name": "theLevelInfo",
  "nearClip": 0.1,
  "visibleDistance": 1000,
  "fogDensity": 0,
  "canvasClearColor": [0, 0, 0, 255],
  "gravity": -9.80665,
  "soundAmbience": "AudioAmbienceDefault",
  "soundDistanceModel": "Logarithmic"
}

Open-world level example

{
  "class": "LevelInfo",
  "name": "theLevelInfo",

  "nearClip": 0.1,
  "visibleDistance": 3500,
  "decalBias": 0.0005,

  "fogDensity": 0.00025,
  "fogAtmosphereHeight": 1200,

  "canvasClearColor": [120, 160, 210, 255],

  "gravity": -9.80665,
  "temperatureCurveC": [0, 16, 0.25, 22, 0.5, 13, 0.75, 11, 1, 16],

  "ambientLightBlendPhase": 2,
  "advancedLightmapSupport": false,
  "globalEnviromentMap": "SunnySkyCubemap",

  "soundAmbience": "AudioAmbienceDefault",
  "soundDistanceModel": "Logarithmic",

  "bigMapLevelBorderVisible": false,
  "bigMapTimeOfDay": 0.13
}

Foggy level example

{
  "class": "LevelInfo",
  "name": "theLevelInfo",

  "nearClip": 0.1,
  "visibleDistance": 900,
  "decalBias": 0.0005,

  "fogDensity": 0.0015,
  "fogAtmosphereHeight": 200,

  "canvasClearColor": [90, 95, 100, 255],

  "gravity": -9.80665,
  "temperatureCurveC": [0, 8, 0.5, 5, 1, 8],

  "ambientLightBlendPhase": 1,
  "globalEnviromentMap": "OvercastSkyCubemap",

  "soundAmbience": "AudioAmbienceFoggy",
  "soundDistanceModel": "Logarithmic"
}

Small interior/test level example

{
  "class": "LevelInfo",
  "name": "theLevelInfo",

  "nearClip": 0.05,
  "visibleDistance": 250,
  "decalBias": 0.0005,

  "fogDensity": 0,
  "fogAtmosphereHeight": 0,

  "canvasClearColor": [0, 0, 0, 255],

  "gravity": -9.80665,
  "temperatureCurveC": [0, 20, 1, 20],

  "ambientLightBlendPhase": 0.25,
  "advancedLightmapSupport": true,

  "soundAmbience": "AudioAmbienceInterior",
  "soundDistanceModel": "Logarithmic",

  "bigMapLevelBorderVisible": true,
  "bigMapTimeOfDay": 0.13
}

Best practices

  • Use one main LevelInfo named theLevelInfo.
  • Tune visibleDistance for the level size; avoid making it unnecessarily large.
  • Keep nearClip reasonably high for better depth precision.
  • Tune decalBias after choosing visibleDistance.
  • Use fog density/height to hide far clipping and blend distant terrain into the sky.
  • For current ScatterSky levels, tune sky/fog color through the sky atmosphere or a sky profile.
  • Use a valid globalEnviromentMap for consistent fallback reflections.
  • Use soundAmbience for global ambience and SFXSpace for local ambience zones.
  • Keep gravity at -9.80665 unless the level intentionally uses custom gravity.
  • Make temperatureCurveC wrap cleanly by ending with time 1 and the same temperature as time 0.
  • Enable advancedLightmapSupport only when the level needs it.

Common issues

Level settings do not apply

Possible causes:

  • The LevelInfo object is missing.
  • The object is not named theLevelInfo and another system expects that name.
  • Multiple LevelInfo objects exist and tools/systems are reading the wrong one.
  • The object was edited but not reapplied/reloaded.

Gravity does not affect expected systems

Make sure the main object is named:

"name": "theLevelInfo"

The static global gravity value is updated only when the protected gravity field is set on an object named theLevelInfo.


Decals or DecalRoads flicker

Tune:

"decalBias": 0.0005

Also check:

"nearClip": 0.1,
"visibleDistance": 2000

Very large visible distances can reduce depth precision and make z-fighting more visible.


Far terrain disappears too soon

Increase:

"visibleDistance": 3000

Also consider adding fog so the far clip is less noticeable.


Scene is too foggy

Reduce:

"fogDensity": 0.0002

Reflections look wrong or black

Check:

"globalEnviromentMap": "YourCubemapDataName"

Also verify the cubemap exists and can create/update its faces.

If no level cubemap is set, check the fallback variable:

$defaultLevelEnviromentMap

Global ambience is missing

Check:

"soundAmbience": "AudioAmbienceDefault"

Make sure the named SFXAmbience exists.

If no ambience is assigned, the engine attempts to find AudioAmbienceDefault.


Summary

LevelInfo is the level-wide environment control object.

It configures camera visibility, fog, decal bias, canvas clear color, gravity, temperature curve, ambient lighting behavior, global reflection cubemap, global audio ambience, audio distance model, and big map settings.

For normal levels, create one LevelInfo named theLevelInfo and keep it in the main level object hierarchy.

Last modified: July 23, 2026

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.