# Dynamic procedural sky a Preetham analytic day-night sweep driving IBL. ```{raw} html ▶ Run in browser ``` **Tags:** `3d` `sky` `procedural` `preetham` `ibl` `lighting` Setting ``WorldEnvironment.sky_mode = "procedural"`` (design D12) makes the renderer synthesize a Preetham analytic sky cubemap from the scene's first DirectionalLight3D (the sun), its ``sky_turbidity`` (atmospheric haze) and its ``sky_ground_albedo`` (ground bounce). The cube drives BOTH the skybox background (horizon gradient + a warm sun disc, fading to night as the sun sets) AND the image-based lighting: the metal and rough spheres pick up the sky's colour and the sun's glint through the split-sum IBL path, re-baked incrementally as the sun sweeps. No cubemap texture asset is loaded: the whole sky is closed form. Press SPACE to pause the sweep. Usage: uv run python examples/features/3d/dynamic_sky.py ## Source ```{literalinclude} ../../examples/features/3d/dynamic_sky.py :language: python :linenos: ```