Skip to main content

Crate bevy_elements

Crate bevy_elements 

Source
Expand description

§bevy_elements

⚠️ Vibe Coded. Written by AI agents working from a human’s direction, covered by tests rather than a line-by-line human review. Read the code before you rely on it for something you care about.

Living environments for Bevy 0.20: a sun and moon on real ephemerides, the bright-star sky, a seeded climate that schedules hourly weather, a GPU wind field, volumetric clouds, rain and snow, lightning and thunder, fog, heightfield terrain with erosion and flooding, ground cover, rocks, dust, paths and trails — all in compute shaders, for anyone building an open world that has to look alive without a weather artist.

crates.io docs.rs CI Bevy License

The sky over one morning: a clear sky, then a broken cumulus deck, then full stratus cover, then fog, the preset named on screen and the HUD printing the temperature, cover, wind and visibility

weather_tour forcing WeatherPreset::Clear, PartlyCloudy, Overcast and Fog in turn at 10.00 h on 20 April 2026 — the first three hours of its tour of all ten presets.

Status: usable · Bevy 0.20 · MSRV 1.97.1

Why: the obvious alternative is a sky shader plus a rain particle system, which gives you weather but not a world — nothing to ask about the ground, the water, the light or the wind, and nothing that survives a save. This crate keeps one simulation behind an Environment query, so gameplay reads the weather instead of guessing at it.

§Quick start

cargo add bevy_elements
use bevy::prelude::*;
use bevy_elements::*;

fn main() {
    App::new()
        .add_plugins((DefaultPlugins, ElementsPlugins))
        .insert_resource(WorldClock::new(CivilDate::new(2026, 6, 21)).at_hour(7.0))
        .insert_resource(Climate::temperate())
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    // The environment follows and renders for the `ElementsCamera`.
    commands.spawn((
        Camera3d::default(),
        ElementsCamera::default(),
        Transform::from_xyz(0.0, 160.0, 0.0).looking_at(Vec3::new(100.0, 100.0, 0.0), Vec3::Y),
    ));
    // 2 km of rolling hills, centred on the origin.
    commands.spawn(Terrain::procedural(ProceduralTerrain::hills(42)));
}

§Try it

cargo run --release --example quickstart

The example lifts the camera to 6 m above the ground and holds it there while the clock runs; add ELEMENTS_FRAMES=600 ELEMENTS_SHOT=/tmp/x.png to capture it unattended.

§What you can do

  • Put a living sky over any scene — sun, moon and 8 404 stars from real ephemerides, with exposure that keeps night dark: sky, weather and light.
  • Let a seeded climate schedule the weather — Clear through Blizzard, hourly, with seasons and a snow season a game sets by date: climate, seasons and weather.
  • Rain, snow, fog and lightning that read from every camera — including an orthographic, isometric or strategy view, with PrecipitationLook::readable() for far-off cameras: precipitation.
  • Generate, sculpt and save a terrain — procedural presets, a height map or flat ground, brushes that edit the live heightfield, snapshots to save and restore it: terrain.
  • Wear the ground down realistically — snow that drifts and melts, wetness and puddles, wind-blown sand, trodden paths and pressed footprints: ground cover, paths.
  • Flood it, and answer what the water is doing — shallow-water hydrology with erosion, lakes, rivers, and wakes from anything moving through: rivers, lakes and waves.
  • Ask the simulation anything — ground height and normal, water depth and velocity, snow depth, cloud shadow, light needed for a night lamp: gameplay queries.

An isometric town 1500 m from its camera, which follows the walker: rain, snow, fog and a partly cloudy afternoon

Clear at 10.00 h on 20 April: cover 0.05, 40 000 m visibility, wind 3.0 m/s, the sun 40.1° up

The isometric example: an orthographic camera 1 500 m back, following a walker, in the crate’s rain, snow and fog.

§Part of the Coven

bevy_elements is one crate in the coven, a family of Bevy crates that cover the parts of a game only human authoring scales: world, life, interface and spectacle. In Grimoire it is an optional cargo feature whose map environment panel edits this crate’s own serde settings — the clock, the climate, the forced weather, snow, wetness, rocks and dust.

§Bevy compatibility

bevy_elementsbevynotes
0.70.20current
0.1 – 0.60.20isomesh needs isomesh/bevy_isomesh 0.0.11; flora needs bevy_flora 0.46

§Learn more

§Who and licence

Maintained by @Ladvien. Questions and bugs: the issue tracker. Contributions follow the org’s CONTRIBUTING.md; docs follow DOCUMENTATION.md.

MIT OR Apache-2.0, at your option.

Modules§

astro
Positional astronomy at Meeus accuracy: pure f64 functions, no ECS.
light
What a game’s own light has to be, to read against the crate’s exposure.

Structs§

CelestialPlugin
Sun, moon and exposure.
CelestialSettings
What CelestialPlugin puts in the world. Insert it first to override; both default on.
CivilDate
A proleptic Gregorian calendar date.
Climate
The long-run character of a place. Drives the weather scheduler and the temperature model.
ClimateHistory
The weather of the last days, recorded from Weather as the WorldClock runs: one DayConditions per local calendar day, so a game can ask what the last few days were like (recent, summary, or the same through Environment).
ClimatePlugin
Climate, seasons, weather, surface weathering and the record of recent days.
ClimateSummary
The days of a window summed up: the counts of the daily indices, the means weighted by the observed hours, the extremes and the totals.
CloudLayer
Where the cloud layer is: a spherical shell whose base and top are altitudes above the planet surface (y = 0).
CloudPlugin
Volumetric clouds.
CloudQuality
Cloud rendering cost per ElementsQuality.
CloudShadows
The cloud shadow map: sun (or moon) transmittance through the clouds for the plane y = 0, 1024² rgba16float over an 8 km square centred on the camera. R is the direct transmittance T, G the optical depth (clamped to 60), B the precipitation darkening of the weather map.
CloudWeatherMap
The 512² rgba8unorm weather map the clouds are built from, covering 32 km around the camera: R coverage, G precipitation (never above precipitation_mm_h / 25, zero where there is no cloud), B cloud type. Sample it with a bilinear, repeating sampler at uv = (p.xz − origin) / extent, p a world position in the metre frame (world ÷ crate::ElementsUnits::units_per_metre; the same as world for the default 1.0).
CoverBand
Where one kind of cover (snow or a wet film) lies on a surface: an amount, the steepest face that holds it and the heights it reaches. Evaluated per face, from its geometric normal and its height, by coverage; the shader of a WeatheredExtension evaluates the same function per pixel.
CoverState
The cover layers of the active terrain. Present while a terrain and the plugin exist.
CoverStats
What the cover simulation has done, for tests and examples that wait on game time. Reset when the terrain is rebuilt.
DayConditions
One local calendar day of weather at the climate’s reference elevation, as recorded while the clock ran through it.
DustPlugin
Aeolian transport and the dust particles’ and haze’s partner on the ground.
DustSettings
The aeolian transport’s settings. Insert it before the plugin to override the defaults.
DustStats
What the transport has done, for tests and examples that wait on it. Reset when the terrain is rebuilt.
ElementsCamera
Marks the camera the environment follows and renders for.
ElementsExposure
The camera’s exposure, as the crate meters it, published every frame.
ElementsFloraPlugin
Drives bevy_flora’s FloraWind, FloraSeason and FloraWetness from this crate.
ElementsGlobals
What the crate tells every weathered material, rewritten each frame after ElementsSystems::Simulation by WeatheredPlugin and uploaded to one shared GPU storage buffer (surface_cover::ElementsGlobals, eight vec4<f32>, 128 B).
ElementsPlugins
Every domain plugin that exists in this version, in dependency order.
ElementsReadback
How often GPU state is copied back for gameplay queries.
ElementsUnits
How many world units make a metre: 1.0 (the default) for a world in metres, 3.2808 for one in feet, 100.0 in centimetres (docs/research/units.md).
Environment
Ask about the environment from gameplay systems. Order such systems .after(ElementsSystems::Readback).
EnvironmentSetup
A scene’s clock, place, climate and forced weather: what an author chooses and a game loads.
EnvironmentSnapshot
CPU copies of GPU simulation state, filled by the throttled readback (ElementsReadback). Read it through Environment.
ErodeTerrain
Start an erosion bake: hydrology runs at the quality’s full substep rate with rain_mm_h of uniform liquid rain (the weather’s rain is ignored) until duration_s of simulated time has passed, then TerrainBaked is written. A bake requested during a bake starts when the first one ends; a bake interrupted by the terrain being rebuilt or removed restarts in full on the next terrain.
ErosionSettings
Hydraulic and thermal erosion. The water flows whether or not erosion is enabled.
FogPlugin
Distance fog on every ElementsCamera and a ground-fog volume around the followed one.
GeoLocation
Where the observer stands on Earth.
GroundCoverPlugin
Ground cover: snow and wetness maps, their kernels and their readback.
GroundExtension
Shades a consumer’s own mesh as the terrain’s ground (TerrainRender::External): snow covers it, it darkens and glosses when wet, water standing on it shows as a puddle with ripples while it rains, and cloud shadows fall on it, all by world XZ. It does not displace or blend layers; the mesh keeps its own geometry and vertex shader (so snow whitens it but does not raise it).
GroundFog
Marks the camera-following ground-fog FogVolume this crate spawns.
GroundLayerTextures
One ground layer’s PBR set (a Unity Terrain Layer, a glTF material’s maps). The maps are read as glTF stores them, whatever sRGB flag the images were loaded with: the base colour is sRGB-encoded; the normal is tangent space with +Y up (OpenGL; DirectX maps set flip_normal_map_y); the roughness is the G channel and the occlusion the R channel, so one glTF metallic-roughness or occlusion-roughness-metallic image may serve both, and a greyscale map either; the height is the R channel. The images must keep their CPU data (the default when loading).
GroundLook
What the terrain’s ground cover reads as at a point, in the shader’s own terms (Environment::ground_look_at).
GroundParams
Uniform of GroundExtension. Mirrors GroundParams of ground.wesl.
HydrologyPlugin
Hydrology, erosion and the water readback.
HydrologySettings
The water simulation’s settings. Insert it before the plugin to override the defaults.
HydrologyStats
What the simulation has done, for tests and examples that wait on simulated time. Reset when the terrain is rebuilt.
Imprint
Presses into the ground under it: a footprint, a hoof, a wheel, a body.
LightningFlash
The current lightning flash: written each frame by the lightning plugin, read by the cloud march to light the clouds from inside. intensity_cd 0 means no flash.
LightningPlugin
Lightning, thunder and the flash resource.
LightningStrike
A bolt struck, at the moment of the flash.
Moon
Marks the moon’s DirectionalLight.
Path
A route across the terrain.
PathHit
The nearest route to a point (Environment::nearest_path).
PathNetwork
The routes over the terrain, published by the game. Insert it or change it at any time: the mask is rasterised off the frame on Bevy’s AsyncComputeTaskPool, and the previous mask keeps rendering until the new one is ready (docs/research/paths.md).
PathState
The path mask the materials read, once it has been rasterised.
PathSurface
What the ground under a point is, on or near a route (Environment::surface_at, Environment::nearest_path).
PathsPlugin
Lays the game’s PathNetwork into the terrain’s ground (docs/research/paths.md).
PrecipitationBlocker
A box that stops precipitation: a roof, an awning, a tent. The box is half_extents in the entity’s local space, placed by its GlobalTransform (rotation and scale included), so any oriented box works. Drops and flakes that reach it are respawned at the top of the box (rain splashes on its top face); the nearest MAX_PRECIPITATION_BLOCKERS to the camera are tested.
PrecipitationLook
How rain and snow are drawn. Draw-only: the particles’ simulation, the wetness and snow they leave, the splashes, the fog and the gameplay queries never read it. The default is the physical look; PrecipitationLook::readable is a stylised one for orthographic and strategy cameras, where physically sized drops and flakes read as sleet and noise. Insert one before the plugins to start with it, or change it at any time.
PrecipitationPlugin
Rain and snow around the followed ElementsCamera.
PrecipitationState
The GPU particle and splash buffers, for tests and custom effects that want to read them.
ProceduralTerrain
Parameters of the procedural generator (Musgrave fBm blended with a ridged multifractal).
RainbowSettings
Settings of the rainbow (crate::CloudPlugin).
RestoreTerrain
Put the ground of a region back as a TerrainSnapshot held it: the undo of a stroke that has no SculptTerrain::inverse (Smooth, Flatten, Noise), or of any stroke, without respawning the terrain and so without losing the water, the cover maps or the trails.
RockSettings
How many rocks lie on the ground and where. Insert it before the plugin to override the defaults; a change rebuilds the scatter.
RockStats
How many rocks are on the ground now, and in how many tiles.
RocksPlugin
Rocks scattered on the Terrain: see RockSettings.
ScatteredRock
One scattered rock: the entity that carries its transform. Its two children draw it (a near and a far mesh, crossfaded by VisibilityRange); the near child’s mesh is kept in the main world, so a game can build a collider from it when this component is added.
SculptTerrain
One brush stroke on the live Terrain, applied on the next frame the terrain is live. A drag is a message per sample; one is applied per frame, in order.
SeasonChanged
The season changed. Also written once on the first frame, so a reader can sync without polling SeasonState.
SeasonState
Where the year is, for foliage and anything else that follows the seasons.
SetupError
A setup that failed EnvironmentSetup::validate, or could not be applied.
SnowSeason
The dates between which snow may fall: a game’s calendar over the physical phase model (docs/research/snow-season.md).
SnowSettings
How snow behaves: its density, how fast it settles and melts, when the wind moves it and which slopes shed it. Insert it before the plugin to override the defaults.
SnowyField
A voxel field with snow on it: the union of base and a slab that exists only over each column’s top.
StillWater
A body of water that stands at a fixed level and is not simulated: a sea, a lake or a moat a host declares (docs/research/still-water.md). Insert it as a resource (or remove it).
StrikeLightning
Script a strike: lightning hits at (the attachment point, in world units; its y is the ground height) on the next frame.
Sun
Marks the sun’s DirectionalLight.
SunState
Where the sun and moon are and how much of the moon is lit.
SurfaceCover
A snow and wetness cover that a material wears whatever the weather is: put it on a WeatheredExtension with with_cover, for the mesh of a voxel volume, a level’s prop or a preview of a season the scene is not in.
SurfaceSetup
The ground, water and cover settings: what an author tunes and a game loads.
SurfaceWeathering
How wet and snowy exposed ground is around the camera. Feeds foliage and any material that wants to look rained or snowed on.
Terrain
The terrain. Spawn one entity with it. It is centred on the entity’s Transform (the grid’s minimum corner is translation.xz − extent / 2 and a stored height h is the height translation.y + h, both read through ElementsUnits: Terrain’s own lengths are metres); rotation and scale are ignored. One terrain exists at a time: a second Terrain entity logs a warning and is ignored.
TerrainBaked
A bake finished: its duration_s of simulated time has run.
TerrainExtension
The extension that turns a StandardMaterial into the terrain’s displaced, layer-blended ground. The crate fills it.
TerrainExtensionKey
The pipeline key of TerrainExtension: whether a texture set (TerrainTextures) is bound, and whether one of its layers takes its own colour. The textured path is compiled only into the pipeline that has a set (the GROUND_TEXTURES shader def), so a ground without one pays nothing for it, and the colour lanes only into the pipeline of a set that takes its colour (GROUND_COLOURS): read in the hot path, they cost the meadow’s opaque pass 10 %, which a set over the crate’s colour (the default) does not pay. Changing whether a set takes its colour compiles a pipeline once.
TerrainGrid
Placement of the terrain’s grid in the metre frame (world ÷ ElementsUnits::units_per_metre): row-major size.x × size.y cells, cell (0, 0) centred at origin + 0.5 · cell_m, the row index running along +Z.
TerrainLook
A game’s colour grade of the owned terrain’s bare ground (rock, soil, grass, sand, scree) and of the scattered rocks lying on it, so a palette can grade the ground the way the game grades its own materials (docs/research/terrain-look.md). The saturation is applied first, around the colour’s own linear Rec. 709 luminance — 0 renders the ground at its luminance, 1 leaves it, above 1 oversaturates (negative is taken as 0) — and then the tint multiplies the result, so a cooling tint survives a desaturation. The grade applies to the textured albedo too, and before the ground cover: snow and standing water keep their own colours, and wet grass keeps behaving as grass. The default renders the ground as without it, within a float’s rounding. A change is a uniform write (no pipeline is specialised or compiled), so a palette blend may write it every frame. TerrainRender::External grounds and a game’s own WeatheredMaterials are the game’s to grade.
TerrainMaterialParams
Uniform of the owned terrain material. Mirrors TerrainMaterialParams of render.wesl.
TerrainPlugin
Heightfield terrain with GPU-generated layers.
TerrainSetup
A Terrain as plain data: what a level file stores and terrain builds.
TerrainSnapshot
The terrain surface heights at the last readback: what Environment::terrain_height and the wiring in other domains sample. Cloning is cheap (the heights are shared).
TerrainState
The terrain’s GPU layers and where they sit. Exists while a Terrain does.
TerrainTextures
The ground textures of a Terrain: for each ground layer (sand, soil, grass) a PBR set — a base colour and, optionally, a normal, roughness, occlusion and height map — which the crate packs into the terrain material’s detail textures (docs/research/terrain-textures.md). Put it on the terrain’s entity; insert, change or remove it at any time. A change is packed off the frame (on Bevy’s AsyncComputeTaskPool) once every map has loaded, and the previous set keeps rendering until the new one is ready.
Thunder
Thunder reaches the followed camera: written distance_m / 343 s of real time after the matching LightningStrike.
TrailGround
A game’s own ground for the trails, when the crate’s Terrain is not the ground (docs/research/trails-game-ground.md).
TrailSettings
Whether trails are pressed and drawn, and how fine. Insert it before the plugin to override the default.
TrailState
The published trail field, for a custom ground shader: an rgba16float texture of (h, occupancy, ∂h/∂x, ∂h/∂z) per texel, h the surface’s offset from the undisturbed ground (m, negative in a trench), occupancy the largest |h| over the texel’s 8 × 8 block and the eight blocks around it (0 where there is nothing to draw), the gradient the field’s Sobel gradient; toroidal by world texel. Sample it at world_xz / (texel_m · texels) with a repeating sampler, within texels · texel_m / 2 of centre (bevy_elements::trails::surface does it). Positions are in the crate’s metre frame (world ÷ ElementsUnits).
TrailsPlugin
Trails pressed into the ground by Imprints, drawn by the terrain and ground materials and by every WeatheredMaterial that opts in.
VoxelGround
Snow, wetness and hydrology for a VoxelVolume: put it on the volume’s entity.
VoxelGroundSystems
The systems that scan, edit and swap the snow of VoxelGround and VoxelSnow volumes. Ordered after ElementsSystems::Readback (they read the snow map’s readback) and before bevy_isomesh’s IsomeshSystems.
VoxelPlugin
Snow on voxel volumes: see VoxelGround and VoxelSnow. Added by ElementsPlugins with the feature isomesh; it does not add bevy_isomesh’s IsomeshPlugin (the consumer does). VoxelGround needs TerrainPlugin, HydrologyPlugin and GroundCoverPlugin to have been added before it, and idles with a warning otherwise; VoxelSnow runs without them.
VoxelSnow
A snow slab on a VoxelVolume that is not the ground: put it on any number of volumes (walls, rocks, ruins over a game’s own ground). It spawns no terrain and runs no hydrology.
WaterContact
A body in the water: an ellipsoid of half_extents (m) along the entity’s local axes, centred on its translation, any rotation.
WaterExtension
The extension that makes a StandardMaterial one pass of the water: the vertex shader displaces the terrain’s CDLOD patches to the water surface and the fragment shader absorbs, reflects and foams. The crate fills it; the two passes are two material assets that differ in the base’s alpha_mode.
WaterParams
Uniform of the water materials. Mirrors WaterParams of water.wesl.
WaterPatch
Marks the entities of the water pool. A patch is drawn twice, by an absorb entity and a surface entity with the same transform and bounds.
WaterPlugin
Water rendering. Needs the TerrainPlugin (it reads its selection and layers) and draws whatever the hydrology simulation puts on the terrain.
WaterSettings
How the water looks. Insert it before the plugin to override the defaults.
WaterSink
Drains water from the terrain: up to rate_m3_s from the cells within radius_m of the entity’s position, never more than is there. See WaterSource.
WaterSource
Pours water into the terrain: rate_m3_s spread evenly over the cells within radius_m of the entity’s position (at least the cell under it). A source off the terrain does nothing. At most crate::MAX_WATER_SOURCES sources and as many WaterSinks are used (lowest Entity first).
WaterState
The water’s GPU assets.
WaveSettings
The wave field’s settings. Insert it before the plugin to override the default.
WaveState
The published wave field, for a custom water shader: a texture array of one rgba16float layer per cascade holding (h, ∂h/∂x, ∂h/∂z, 0) per texel, h the surface’s rise above the undisturbed water (m), toroidal by world texel. Cascade c has texels of texel_m[c]; sample it at world_xz / (texel_m[c] · texels) with a repeating sampler, within texels · texel_m[c] / 2 of the followed camera’s texel. The surface is the sum of the layers.
WavesPlugin
Ripples and wakes on the hydrology’s water from WaterContacts, drawn by WaterPlugin.
Weather
The weather now, blended between presets. Read by every domain.
WeatherChanged
A weather transition started: by the scheduler, by WeatherDirector::force or by WeatherDirector::release.
WeatherDirector
Who decides the weather: the seeded scheduler, or the game through force.
WeatheredExtension
The extension that weathers a StandardMaterial: see WeatheredMaterial.
WeatheredPlugin
Weathered materials: WeatheredMaterial, and the ElementsGlobals they share.
WetnessSettings
How the ground gets wet and dries, and when water becomes a puddle. Insert it before the plugin to override the defaults.
WindFieldParams
The uniform the bevy_elements::wind WGSL import takes. Bind it with #[uniform(N)] wind: WindFieldParams and fill it from WindState::field_params. The field itself is in the metre frame (world ÷ units); elements_wind takes a world position and divides it by units.
WindGust
A gust band started: it travels from origin along direction.
WindPlugin
The GPU wind field.
WindState
The wind, for shaders, sibling crates and gameplay.
WorldClock
The game’s calendar and time of day. Advances in ElementsSystems::Clock by Time<Virtual> delta × time_scale.

Enums§

ElementsFocus
What the camera-relative domains centre on, on the followed ElementsCamera: the rain and snow box, the wind window and its gusts, the ground fog volume, the strike disc and the thunder distance, the cloud weather and shadow maps, the trails and waves windows, and the mean the surface weathering takes around the view. Without it they centre on the camera.
ElementsQuality
Resolution and step counts for every domain. Read once per frame; changing it at runtime re-creates the affected GPU resources.
ElementsSystems
The phases of one environment frame, chained in this order in Update.
HydrologyBoundary
What happens at the edge of the terrain.
PathKind
What a path is surfaced with.
SculptKind
What a stroke does to the ground under it. w is the brush weight at a cell (sculpt_weight).
Season
A meteorological season: whole months, December–February is northern winter.
StoneDetail
Which of a stone shape’s two meshes to build: the scatter draws Near inside 22 · D metres and Far beyond. Both wear the same facet colours.
TerrainRender
Who draws the ground.
TerrainSetupSource
Where a TerrainSetup’s surface comes from, as data.
TerrainSource
How a terrain’s surface is made.
WeatherPreset
A named weather state the scheduler moves between.

Constants§

CLEAR_AIR_EXTINCTION
Extinction of clear air, m⁻¹: KOSCHMIEDER / CLEAR_VISIBILITY_M, the floor of every visibility a weather can carry.
CLEAR_VISIBILITY_M
Visibility of the Clear preset, m: the air this crate calls clear. A weather’s visibility is measured against it, not against a vacuum (see sky_air_extinction).
DEFAULT_SCULPT_HARDNESS
The hardness a stroke made by SculptTerrain::new takes.
ELEMENTS_GLOBALS_BUFFER
The crate’s globals as a GPU storage buffer, for a material or pass of your own: the 128-byte ElementsGlobals (wetness, snow cover and snow depth of exposed ground, the rain intensity, the mean cloud transmittance, the cloud shadow map’s placement, the ripple and streak phases, the wind, the light direction, the world units per metre and the trail window), laid out as the WGSL bevy_elements::surface_cover::ElementsGlobals (eight vec4<f32>; the field comments there give each component).
FLASH_LUMENS
Luminous power of a first return stroke averaged over one 1/60 s frame, lm (docs/research/lightning.md, Deviation 8). Candela is this over 4π.
FLORA_FULL_WIND_MS
Wind speed at 10 m, m/s, that bevy_flora’s FloraWind::strength of 1 (“a strong wind”) stands for. Gust strengths are converted on the same scale.
FREEZING_C
The temperature a frost day’s minimum (ETCCDI FD) and an icing day’s maximum (ETCCDI ID) fall below, °C.
GROUND_FOG_EXTENT
Size of the ground-fog volume, m: the near field, around the camera; distance fog carries the far field. Kept small because Bevy attenuates the light reaching every fog sample by the volume’s bounding radius (see volume_light_compensation).
GROUND_FOG_TEXELS
Texels of the ground-fog density texture.
KOSCHMIEDER
Koschmieder’s constant for a 2 % contrast threshold: extinction = 3.912 / visibility.
LAPSE_RATE_C_PER_M
Standard-atmosphere temperature lapse rate, °C per m (ISO 2533: −6.5 K/km).
MAX_GUSTS
Most gust bands active at once.
MAX_PRECIPITATION_BLOCKERS
Most blockers uploaded to the GPU per frame; the nearest to the camera win.
MAX_WATER_SOURCES
Most WaterSources and most WaterSinks uploaded.
PRECIPITATION_BOX_M
Edge of the camera-centred particle box, m.
SNOW_ALBEDO
Linear albedo of snow, bit-equal to bevy_flora’s SNOW_ALBEDO so trees and buildings match.
SNOW_ROUGHNESS
Perceptual roughness of snow (bevy_flora’s 0.9; the plan’s 0.6 is Deviation 4 of docs/research/snow-cover.md).
SPEED_OF_SOUND_MS
Speed of sound used for the thunder delay, m/s.
STONE_SHAPES
The stone grain’s feature size, m (Parameters). How many stone shapes there are: six angular talus blocks, then six rounded meadow rocks.
STRIKE_RADIUS_M
Radius of the disc strikes fall in, centred on the followed camera, m.
WET_DAY_MM
The least precipitation of a wet day, mm of liquid-water equivalent: the ETCCDI’s wet day, RR ≥ 1 mm.
WIND_CELL_M
Wind cell edge, m (horizontal and vertical).
WIND_ROUGHNESS_M
Roughness length of the forcing profile, m (WMO open terrain).

Functions§

distance_fog_falloff
Distance fog for a visibility: grey extinction σ_V in every channel (fog, haze and dust extinguish independently of wavelength), so every colour reaches 2 % transmittance at exactly visibility_m; in-scattering at the same rate, so scene and fog weights sum to 1 and a fully fogged pixel takes the fog colour.
evaporation_mm_h
Evaporation of an open water surface, mm/h: 0.1 (1 + u/5) (1 + max(T, 0)/20) (1 − RH).
extinction_for_visibility
Extinction coefficient for a visibility, m-¹ (Koschmieder, 2 % contrast).
fog_hue
Linear-RGB fog colour before brightness: the fog hue, tinted toward sunset orange as the sun drops below 10° (celestial::dusk_tint); and toward dust as dust rises.
log_wind_speed
Mean wind speed at height_m above ground for u10 at 10 m, m/s: the neutral log law u10 · ln(max(z, z0)/z0) / ln(10/z0) with z0 = 0.03 m.
orthographic_fog_falloff
Distance fog for an orthographic camera: near_depth_m is the depth, along the view axis, of the nearest ground the view shows (orthographic_near_depth). Bevy measures fog from the camera’s translation, which an isometric camera puts far behind what it shows, so an exponential would fog the whole frame by the empty stand-off. The fog starts at the bottom of the view and rises with the exponential’s initial slope σ_V: Linear { start, end: start + 1/σ_V }, exact while the scene’s depth is short of the visibility and fully fogged at a quarter of it (docs/research/view-anchor.md Deviation 1).
orthographic_near_depth
Depth along the view axis of the nearest ground an orthographic view shows, m: the ground through focus seen at the bottom edge of a view view_height_m high, looking down along the unit forward. A screen offset v lands on the ground v · cot θ nearer than the focus, with θ the look-down angle (at least 10°); a straight-down view sees all its ground at the focus.
sculpt_weight
The brush weight at distance d_m from the centre: 1 inside hardness · radius_m, a smoothstep down to 0 at radius_m, 0 beyond. Mirrors sculpt_weight in sculpt.wesl.
sky_air_extinction
Extinction of the air the sky must carry above clear air, m⁻¹, for a camera whose DistanceFog has extinction fog_extinction_m: fog_extinction − CLEAR_AIR_EXTINCTION, floored at zero. Every mesh is fogged by the camera’s distance fog, but a sky pixel already has Bevy’s atmosphere (which draws the clear air), so the sky only adds the excess the weather’s visibility implies over the Clear preset’s. Taking the camera’s own extinction keeps the sky and the ground on the same fog at all times; 0 without distance fog, and 0 at and above 40 km, so a clear sky is untouched. docs/research/clouds.md Deviation 29.
stone_facet_tones
The palette tone each facet (joint plane) of stone shape shape wears, indexed by facet id, the table the scatter’s near and far meshes both read. shape wraps at STONE_SHAPES. It needs no plugin.
stone_mesh
The mesh of stone shape shape as RocksPlugin draws it, for a host’s own scatter: centred on its bounding box, the long axis along X and one unit long, the short axis up (so scale it by the stone’s length), and vertex colours that carry each joint facet’s palette tone, the mottle and the base’s darkening. Vertex colours multiply a StandardMaterial’s base_color, so a host’s own material shows the colour change at each joint. shape wraps at STONE_SHAPES. It needs no plugin.
stone_palette
The rock palette: basalt, sandstone, limestone and desert varnish, each a linear multiplier on a rock’s albedo with a mean of exactly 1 (docs/research/rock-palette.md). It needs no plugin.
volume_light_compensation
FogVolume::light_intensity that makes the volume’s sunlit in-scattering right at the camera.

Type Aliases§

GroundMaterial
The ground material for a consumer’s mesh: see GroundExtension.
TerrainMaterial
The terrain’s ground material: a StandardMaterial extended with TerrainExtension.
WaterMaterial
One pass of the water: a StandardMaterial extended with WaterExtension.
WeatheredMaterial
A StandardMaterial that is rained and snowed on: wet surfaces darken and gloss, rain runs down vertical faces, up-facing faces whiten under snow with the curve bevy_flora uses, and cloud shadows fall on it. See WeatheredExtension.