Mirage Wells: Desert Dunes, Oasis and Ruins Kit
README.md
DesertAtmos
The desert's time of day and weather on worldClockKit's shared clock, and the look, air and sound each machine makes of them. Started by the DesertAtmosphere component; modelled on tropicalKit's Atmos.
local DesertAtmos = require("desertKit.DesertAtmos")
DesertAtmos.setTime("dusk", { hold = true }) -- every player: "dawn" | "midday" | "dusk" | "night"
DesertAtmos.dustStorm({ approach = 45, duration = 60, clear = 25 }) -- a haboob rolls in for everyone
DesertAtmos.setWeather("clear") -- or "storm" (stays until changed), or any worldClockKit weather
print(DesertAtmos.report().time, DesertAtmos.report().ambience.levels)
setTime(name, { hold? }): set the shared clock to a preset (hold = truepauses it there).dustStorm(opts)/clearStorm(fade?): a dust storm for every player (seeDustStorm);setWeather(name, { fade? }).configure(opts): what this machine draws and plays:look,grade,haze,shimmer,storm,milkyWay,ambience,ambienceVolume,footsteps,footprints,stormEveryMinutes.override({ dawn = { haze = 0.003, heat = 0.2, grade = { saturation = 1.2 } }, ... }): per-time overrides on top of the presets.current()/lookFor(weights, storm, overrides?)(pure): the blended{ grade, haze, hazeTint, hazeTintMix, heat, storm, weights }.weights()/weightsAt(solar),timeOfDay(),stormAmount(),weather(),hourForSolar(solar).report(): time, weights, storm amount and state, weather, clock hour, look, shimmer, sky, ambience levels and calls, footstep counts, footprints.PRESETS,STORM,KEYS,CAMPFIRE,start(opts, holder)/stop(holder)/tick(dt).
The presets (compared against the reference sheet design/references/mirage_wells)
| time | solar hour | look | reference |
|---|---|---|---|
| dawn | 6.35 | pink-peach light on the crests, blue-violet shadow, a low pink dust mist (haze 0.0026) | time_dawn |
| midday | 12.3 | bleached high white sun, short shadows, pale hazy blue-white sky, heat shimmer 1 and a mirage on the horizon, grade desaturated (0.86) | time_midday_heat_shimmer2 |
| dusk | 17.75 | sun on the horizon, amber and rust dunes, orange-to-magenta sky, purple shadows, palms in silhouette | time_dusk |
| night | 22.4 | high bright moon (silver-blue light), navy sky with stars and the Milky Way, sand readable, a cool blue grade | time_night |
The light and sky colours are the "desert" sky look (DesertSky.SKY_LOOK), so they apply with the WorldClock's skyMode "kit" (the clock's sky shader) and "engine" (the scene's ProceduralSky, coloured by DesertSky).
What it does on each machine
- Holds the "desert" sky look (
look = falsefrees it), colours the engine sky in skyMode "engine". - Three of the engine's post passes for the grade (colorGrade, color_correction tint, vignette) per time and storm.
- Wraps the clock director's
evaluateso its fog becomes dust haze (chained after other kits' hooks). - Heat shimmer (
HeatShimmer), the storm (DustStorm), the Milky Way (DesertSky), each one full-screen pass, registered only when it has something to draw. - Campfires: every Light whose entity carries attribute
desertLight = "campfire"is lit warm and flickering from dusk to dawn and put out by day (CAMPFIRE). - Ambience (
DesertAmbience), footsteps (DesertFootsteps) and tropicalKit'sFootprints, taught the desert's sand and mud.