← All namespaces

environment

Scene, level & world Experimental

Legacy environment build and live ambience: sky, fog, time of day, atmospherics.

What it's for

This namespace groups the operations that shape the look of a level's world: the sky, the fog, the time of day, and the modern volumetric atmospherics. It covers two ways of working. The environment.build verbs create and delete placed environment actors (a sky sphere, a fog volume, procedural terrain) and can export or import an environment snapshot as JSON. The environment.control verbs poke the live editor world instead, adjusting sun and skylight intensity, driving time of day through the directional light, or running a filtered console command.

On top of those there are three typed spawn verbs for the modern UE outdoor-lighting cluster, standing up a SkyAtmosphere, a VolumetricCloud, or a reflection capture and fanning an optional properties object onto the actor's primary component. Use these when you want a full physically-based sky rig rather than the legacy sky sphere.

Reach for environment when you are dressing a scene: setting a mood, dialing lighting for a screenshot, or bootstrapping the atmospherics of a fresh level. Pair the spawn verbs with the lighting namespace (for the directional and sky lights) to build a complete rig, and use property to chain further tweaks from the returned actorPath.

This area is experimental and still changing. The legacy build/control split and the newer typed spawn verbs coexist, and the exact surface may shift as the environment story is consolidated.

Examples

Stand up a physically-based sky

Spawn a sky atmosphere and tune its scattering in one shot, then leave the actor ready for further edits.

You: Add a sky atmosphere with a hazier, thicker look.

  call("environment.spawn_sky_atmosphere", {name:"MoodSky",
        properties:{RayleighScatteringScale:0.04, MieScatteringScale:0.01}})
    → {actorPath:"/Game/Maps/Demo.Demo:PersistentLevel.MoodSky", className:"SkyAtmosphere"}

Done. Sky atmosphere spawned and scattering applied.

Set a golden-hour mood

Drive time of day through the sun and dim its intensity for a warm, low evening light.

You: Make it late afternoon and soften the sun.

  call("environment.control.set_time_of_day", {hour:17.5})
    → {ok:true}
  call("environment.control.set_sun_intensity", {intensity:3.0})
    → {ok:true}

Done. Time of day set to 17:30 and sun dimmed.

Drop in a fog volume

Create a fog volume actor at a spot in the level to add depth to the scene.

You: Add some fog near the valley floor.

  call("environment.build.create_fog_volume", {x:1200, y:-400, z:80})
    → {ok:true, actorName:"FogVolume"}

Done. Fog volume created at (1200, -400, 80).

← Back to all namespaces