Sun & Glare
The Sun section of a World Environment places the scene's sun and sets how it looks in the sky.
| Field | What it does |
|---|---|
| Azimuth, Elevation | Where the sun is, in degrees. Below the horizon its light fades out. |
| Color, Illuminance | The light it casts, in lux. A new sun is 120,000, a bright clear day. |
| Angular Diameter | How big the disc looks, in degrees. Earth's sun is 0.53. |
| Disk Intensity | How bright the disc is. 0 hides it, 1 is physical. |
| Glare | Strength of the bright haze around the sun when it is in view. 0 turns it off; the default is 1.5. Raise Glare Size with care: the wide part of the glare grows with both, and together they soon veil the whole sky. |
| Glare Size | How far the glare spreads from the sun, in degrees. |
| Shadows, Contact Shadows | Whether the sun casts shadow maps and screen-space contact shadows. |
| Length, Thickness, Steps | Inside the Contact Shadows group: how contact shadows are traced, their reach, how thick surfaces are assumed to be, and how many steps each ray takes. See Shadows. |
The moon's settings are folded into a Moon group:
| Field | What it does |
|---|---|
| Moonlight, Moon Color | The light the sun becomes once it has set, in lux, and its colour. 0 keeps nights unlit. |
| Follows Calendar | On by default: the moon's phase is today's real one. Off, it uses Moon Day. |
| Moon Day | Day of the lunar month, 0 to 29.5: 0 new, about 3 a crescent, 7.4 first quarter, 14.8 full, 22.1 last quarter, about 26 a waning crescent. |
| Moon Tint | Colour of the moon's face: warm orange for a harvest moon, white for a high one. |
| Eclipse | 0 to 1. The Earth's shadow sweeps across the moon; at 1 it is a dim, copper-red blood moon. The moon is drawn full during an eclipse, and the moonlight dims and reddens with it. |
| Moon Glow, Moon Size | Strength of the halo around the moon, and its diameter in degrees (1.6 by default, about three times the real moon, so its face reads in a wide view). |
Night
Once the sun is more than a degree below the horizon, its light becomes the moon: it comes from the opposite side of the sky, between 15 and 75 degrees up, in a cool colour, and fades in over the next six degrees of sunset. The moon itself is drawn where the light comes from: a sphere with a generated surface (dark maria, bright highlands, craters and rays), with a glow around it. Its phase follows the day of the lunar month, waxing moons lit on the right and waning ones on the left, and a crescent gives less moonlight than a full moon. The sun's disc and glare stay with the sun. Clouds read the sun's real height, so they fade out at sunset rather than staying lit. The sky light still fades out with the sun, so a night scene is lit by the moon and by its own lamps.
The default Moonlight of 150 lux is several hundred times a real full moon. That is what makes a night readable: auto exposure cannot open far enough to show physical moonlight, and its keep-dark curve still holds the picture to night. Raise it for a brighter night; set it to 0 for one lit by lamps alone.
A new World Environment starts with the sun at mid-morning, azimuth 245.5° and 38.5° up, with contact shadows on and screen-space reflections enabled: high enough to light a street between buildings, low enough that walls are modelled and shadows fall long.
Glare
Looking toward the sun, the glare is what makes it blinding: a hot core around the disc, a wide halo, and a faint lift across the sunward sky.
Bloom cannot make this on its own. It caps how much any single pixel adds to the glow, so a sun disc many thousands of times brighter than the sky blooms only as much as a bright cloud. The glare is drawn separately, before tonemapping, so auto exposure and the camera's tone curve treat it like any other light in the picture.
It fades by itself when something covers the sun. Every frame it compares the disc with the sky just around it, so clouds drifting across, terrain, buildings or the sun leaving the frame all dim it, with nothing to set up. The reading is averaged over the last few frames, so a cloud edge or the noise of ray-traced lighting cannot make it flicker; a cloud crossing the sun dims it within about a tenth of a second. Its strength follows the brightness of the sky around the sun, so it softens through haze and at sunset along with everything else.
The glare needs the sky: a camera only draws it while the World Environment's Atmosphere is on.