A .environment stores ambient light, shadow defaults, a sky, a sun or moon, fog and an optional Standard reflection map. A .postfx stores an ordered camera effect chain.
With nothing selected, choose a New from starter entry in the Environment list in World settings, such as Hot desert, Frozen world or Outer space, to give the world a ready-made sky, sun and fog kept in the world itself. Click Edit or New beside it to change the scene lighting, paint a sky from colours or choose an equirectangular sky image. Select a camera and click Edit or New in its Camera effects section to add Bloom, Grayscale, Vignette or Colour adjustment; its list chooses the effects the camera uses. Either opens as a tab beside Scene, with the preview on the left and the settings on the right. Each field applies when you press Enter or move to another control, and the preview follows. Use in this world or Use on the selected camera saves the preset and assigns it to the scene or the selected camera. Save the world file to retain that assignment.
The tab's Source page has the other shaders, typed values, textures and shadow colour. Existing advanced values survive edits to the settings. Invalid shader preparation leaves the last valid preview visible. Undo and Redo, in the tab or in the Edit menu, step through the draft; Save as... creates a separate file. Edits elsewhere in the scene leave the draft editable; only a change to the preset's own record in the world asks for its tab to be opened again.
Environments affect one world. Camera presets replace one camera's entire effect chain. They do not change application HDR, tone mapping, AA or quality. A preset can require HDR and a particular tone-map mode; configure those in the application first. A later incompatible application change is diagnosed when rendering the affected camera.
Effects must follow scene-linear, display-linear, presentation order, including disabled entries. The shader manifest determines the stage; contradictory order or stage declarations fail. Order within each stage is retained. Multipass graphs and history remain in the shader and renderer. An empty effect list clears the chain.
A sky is either painted or an image. A painted sky needs no file:
"sky": {"top": [60, 120, 205], "horizon": [185, 210, 235], "ground": [95, 90, 82], "clouds": 0.35}
"sun": {"color": [255, 244, 225], "elevation": 50, "azimuth": 135, "disc": 1.2}
"fog": {"color": [185, 210, 235], "near": 80, "far": 600}
top, horizon and ground blend into one another; stars and clouds are amounts from 0 to 1, and cloudColor colours the clouds. sky and skybox cannot both be given.
sun adds a directional light that the world owns, named "Environment sun", turned to elevation degrees above the horizon and azimuth degrees around it, as RotateEntity light,elevation,azimuth,0 would turn it: at azimuth 0 it shines towards +Z. It casts shadows unless shadows is false. A painted sky draws its disc, disc degrees in radius (0 for none), where the light comes from, so a moon is a dim, bluish sun.
fog is linear fog from near to far for every camera whose own fog mode is 0. A camera with fog of its own keeps it. Every part is optional; leaving one out removes what an earlier environment set.
Sky and reflection textures use the existing equirectangular LDR image path. FP16 scene buffers do not add HDR/EXR/RGBE file decoding. Applying a world environment does not overwrite materials or the world's own lights; its sun is a light of its own. Use ApplyEnvironmentMap explicitly on a Standard brush. Light positions and cookies belong to light instances, not environment presets.
"settings": {"environment": "daylight"}
"components": [{"type": "camera", "postfx": "soft"}]
Declare the corresponding required environment/postfx assets in the world's assets array. The appearance sample includes complete descriptors and a world with sky, shadows, a reflective sphere and a camera preset.
A world's look can be a mix of environments. FadeWorldEnvironment fades another environment in on top of the world's own, over a number of seconds that UpdateWorld moves on (UpdateWorld 1 is one sixtieth of a second): day into night, or fine weather into a storm. Colours mix in linear light, fog distances as 1/distance so fog closes in smoothly, and the shadow settings meet in the middle. Two suns that point within 90 degrees of each other turn between them; suns further apart, such as a sun and a moon, fade one into the other. The sky shader shows the two most-weighted skies at once and draws the sun's and moon's discs where they are, so a painted sky does not hold the disc in its image. Reflection maps are bound to materials and do not fade. CameraEnvironmentWeight tells a game how much of an environment a camera saw.
A world file can blend its environments by the time of day: its settings' cycle places environments at hours of the day, and a clock that UpdateWorld moves blends the ones either side of it. In "sun moves with the clock" mode the sun rises, crosses the sky and sets, and the moon follows the same arc by night, while the environments supply the colours, sky and fog; in "fixed looks" mode each time shows its environment as made, sun included, fading in over its own number of hours. SetWorldTimeOfDay, WorldTimeOfDay and SetWorldTimeSpeed control the clock, which only UpdateWorld moves, so a paused game holds its time. In the World Editor, World settings > Time of day sets the cycle up, and its Day and night starter adds a ready-made one. See the world format and samples/appearance/daynight.world.
Zones bring environments in by place rather than time. A zone is a box or sphere in the world, made in the World Editor with Add > Zone, with an environment, camera effects and an audio mix of its own. Each camera mixes in the environments of the zones it is in, after the time of day, so two cameras in different places can show different looks in the same frame; across a zone's fade the look blends, and a zone with a higher priority wins inside a lower one. A zone's camera effects switch on for a camera at least half inside it and give the camera its own effects back when it leaves. ZoneWeight tells a game how far inside a zone any entity is, and CameraZoneLooks keeps a camera, such as a map view, on the world's own look. See the zone component and samples/appearance/zones.world.
ApplyWorldEnvironment, ApplyCameraPostFX and ApplyEnvironmentMap return True on success. On failure, read AppearanceError. Preparation completes before replacement, preserving the last valid appearance on failure. Applied instances retain shader/texture ownership when their source loader world is freed.
Validate files with b3dworldc. Schemas are installed in the world directory. See also reusable resources.
For editor steps and F1 help, see the World Editor User Guide.