Nürburgring Drive
README.md
nring_look
The Nürburgring Drive environment look in one idempotent call, apply(), made from the
main scene's onEditLoad and onLoad. Call it again after renderer.setQualityTier(...)
or setPreset(...).
Presets (time of day / weather)
local look = require("art.env.nring_look")
look.setPreset("morning") -- unknown names fall back to "golden"
look.apply() -- the next apply() uses the preset
look.preset() --> "morning"
M.PRESET_ORDER = { "golden", "midday", "morning", "overcast" } and M.PRESET_LABELS
(menu text) drive a picker. Each entry of M.PRESETS is a complete look: sun
(azimuth/elevation/intensity/colour), sky fill, display exposure, bloom, vignette, grade,
PhysicalAtmosphere, HeightFog, ProceduralSky (clock, turbidity, gradient), volumetric
cloud preset (clouds = nil = clear sky), shadow-softness factor and optional sun shafts.
apply() writes every field of every part, so switching presets back and forth leaves
nothing of the previous one behind. Presets are a local look: nothing is replicated.
- golden (default) — sun 24° from the WNW, warm; evening-blue dome warming to the horizon, lit cumulus, soft-edged shadows, warm haze.
- midday — sun 58° from the SSW, neutral white; deep blue sky, white cumulus, crisp short shadows, light blue distance haze.
- morning — sun 9° from the E, peach; clear sky, mist lying in the valleys (HeightFog dense at 360 m, gone by ~500 m) with sun shafts (VolumetricLighting) where the tier allows.
- overcast — a full grey cloud deck, sun at 1.0 vs fill 1.9 (soft, nearly shadowless), grey dome, cool desaturated grade, grey haze.
Each preset's grade is baked into its own LUT texture: art/env/nring_grade_lut.texture
(golden), nring_grade_lut_midday, _morning, _overcast. After changing a grade run
look.bakeGradeLut("<preset>") (or "all") in edit mode. M.SUN, M.GRADE, ... still name
the golden values.
Quality tiers (M.TIERS)
High: clouds, GTAO high, SSR, contact shadows, TAA, 96 MB shadow budget, sun shafts (24 steps), and a camera shutter motion blur (120°, 8 taps) in play only. Medium: smaller clouds, GTAO medium, FXAA, 12-step shafts. Low: no clouds, AO, SSR, contact shadows, shafts or motion blur; FXAA, 16 MB coarser shadows, 250 m caster cutoff. A clear-sky preset (morning) spends the cloud budget on shafts, so no preset costs more than golden at the same tier.
Parts
- Light: the scene's
sunandambient.ProceduralSkyhassyncSunToLightoff, so its clock never overwrites the sun; it is the reflection environment and, with clouds, the backdrop behind them. - Air:
env_atmosphere(PhysicalAtmosphere: aerial perspective, plus its own sky when there are no clouds),env_fog(HeightFog),env_clouds(VolumetricSky v4). In edit modebakeCloudsForEdit()bakes the clouds once (the component only bakes fromupdate()). - Film:
env_post(PostProcess): ACES display at the preset's exposure, bloom, the preset's grade LUT, vignette.
Every env_* entity is spawned temporary, so scene saves never duplicate them.
References the look was matched against: design/references/nring_look/.