Builtin Library
- ..
- .metadata133 B
- README.md1.5 KB
- preset.yaml1.8 KB
README.md
cumulus_default
Default weather preset for VolumetricSky.component. Captures the
v4-tuned cumulus look: visible discrete clouds, warm-afternoon sun,
moderate coverage.
Use
local sky = entity.spawn("sky")
sky.component.add("VolumetricSky", {})
preset.apply("cumulus_default", { entity = sky.id, component = "VolumetricSky" })
The values set the component's preset Field.table as a unit — one
Sync replication carries every shaping/lighting parameter to peers. Tweak
by reading the values and changing them before the component is added:
local values = preset.values("cumulus_default")
values.shaderVariant = "v5" -- swap raymarcher
values.preset.coverage = 0.6 -- sparser sky
sky.component.add("VolumetricSky", values)
Authoring more presets
Capture a sky you have tuned with
preset.capture({ entity = sky.id, component = "VolumetricSky" }, "<name>"),
or drop another <name>.preset/ folder next to this one (or anywhere under
/zero/source/); the asset indexer registers it and preset.values("<name>")
resolves it. Common alternatives:
stratocumulus.preset— broad overcast layer (coverage ~= 0.15,cloudType = 0.5,altitudeHigh ~= 0.65).clear.preset— barely any cloud (coverage ~= 0.7,densityGain ~= 0.2).storm.preset— dense black anvils (coverage ~= 0.1,densityGain ~= 0.85,sunColor ~= [0.6, 0.55, 0.5]).
preset is one Field.table: applying a preset replaces it whole, so
provide every field.