Repository navigation
weather: storm cells, storm decks and dark bases; live cloud base/top and darkness (O18) - #1312
Merged
Merged
Conversation
…ts (O18) cvc::world::weather is a pure function of its parameters, the world time and authored events (storm, steer, rate, calm): storms on hashed slots run clear, building, storm, clearing and clear, born upwind and timed to cross the area in their prime, riding the steering wind. It publishes the cells, the storm field and a rain rate for O19 and O20. A weather stream is appended to lsys::stream.
…aps built off the frame set_storms gives each cell a storm share that feeds it, holds it besides the fair-weather coverage and deepens its shade and far opacity. set_deck makes the maps again for new heights; a deck deeper than its cumulus grows cumulonimbus (ABYSSAL's height profile) whose self-shade marches the sun through the tower. prepare_deck / run / adopt_deck build it on another thread, and the cumulus the maps grow from is kept, so a storm deck comes in in about 150 ms. cell_up_tau is the optical depth straight up, for dark bases.
…rrain_lab cloud_sky reads sky.base, sky.top, sky.darkness and sky.storms live: a storm deck is built off the frame and swapped into the same near volumes and far shells, the ramp darkens toward a storm's, a darkened cloud's light dims as the cloud above hides the sky, and the storms reach the far shells and the receivers as uniforms (no new sampler). The weather node owns the model over its ground, drives the sky and publishes weather.*; its steering wind is the sky's until O14's scene wind. weather_controls.ari, terrain_lab's weather node, docs and the roadmap's as built.
# Conflicts: # docs/ARIADNE.md
… there are no threads std::async cannot start a thread in single-threaded wasm (the Pages gallery, arigl-web), so a storm coming into reach would have aborted the page. The deck's build is now a cvc::sliced_job on the app's scheduler, as generated_world's rebuilds are (#984): on the background pool natively, a few milliseconds a frame on the scheduler thread where there are no threads. cloud_layer::step builds a deck a unit at a time (a variant's map, one layer of its self-shade, one row of its shade), bit-identical to building it at once. deck_threading: cooperative forces the sliced path natively; cvcgl_ariadne_realize runs the storm both ways.
transfix
enabled auto-merge (squash)
November 16, 2026 09:11
…e-1312 # Conflicts: # docs/ARIADNE.md
Conflicts: - THIRD_PARTY_NOTICES.md: both sides extended the ABYSSAL paragraph after OceanFFT.js. Kept master's gusts and currents sentence, then the storm deck's and the weather model's. The summary line now names the wind's gusts and currents (wind_field.h, current.h) beside the storm maps. - src/cvc/tests/CMakeLists.txt: both test loops list world_weather_test (this branch) and ocean_wind_test (master).
master fails to build arisrvx's python_engine.cpp: #1302 (bridged users) added room(), bridge_presence(), bridge_absent(), bridge_post() and listen_chat() calling server_link() with no argument, written against the process-wide server link that the P0a cleanup replaced with the module's own state, server_link(PyObject *self). Each of the five now names its module argument self and passes it, as the other server ops (lent(), publish(), ...) already do. Found in #1324's pycvc-linux / cp312 job (run 43956686020), which builds the PR merged with master.
…ther-storms # Conflicts: # src/cvcGL/test/cvcgl_ariadne_realize.cpp
The realize suite runs every node type's checks in one process. In a Linux Debug job (Xvfb, llvmpipe) it took 250.6 s, 50 s under the 300 s a test without a TIMEOUT gets; on a slower runner (#1309's Debug job, where PhConvoy and Ewave also ran about 1.3x longer) it timed out on all three attempts. As cvcgl_ewave, cvcgl_wake and cvcgl_volren_node have, it gets a budget of its own with headroom, so only a real hang fails it.
… master's arisrvx build
…realize's Debug timeout
transfix
added a commit
that referenced
this pull request
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O18 of docs/roadmap/OCEAN-AND-WEATHER-ROADMAP.md: the weather model, storm cells and dark bases (F2, §10.7), plus O17's leftovers (live cloud
base/top, anddarkness). A storm builds upwind, darkens the sky and the ground under it, and clears.What changed
The weather model:
cvc::world::weather(inc/cvc/world/weather.h,src/cvc/world/weather.cpp)cloud_layer, so a headless scene, pycvc or arisrv can run it (roadmap §11.1, item 4).at(t)computes the live cells from scratch; nothing is stepped or remembered. A frame's call is about 2.4 µs with 32 events (O(cells + events), nothing per texel).weather.events, text that reads back exactly):storm,steer,rate(a time-lapse of the storms alone) andcalm.compact(t)keeps the list short without changing the weather from t on.intensity(x, y)andrain_rate(x, y)in mm/h.weatherstream is appended tolsys::stream, so existing salts do not move.The steering wind is the scene's one wind. The weather node's single accessor,
steeringWind(), reads cloud_sky's wind (sky.wind_azat the deck's drift speed). O14 repoints it atwind.speed/wind.dir. A settled change is logged as asteerevent.cloud_layer(inc/cvc/world/cloud_layer.h,src/cvc/world/cloud_layer.cpp)set_storms(discs): each cell takes the storms' field over it. A stormy cell is fed like a windward flank, held besides the fair-weathercoverage(the footprint closes up), and its shade and far opacity deepen.set_deck(base, top, nz, far_layers): live heights, rebuilt asset_sundoes. It equals a deck built that way, both ways.cumulusgrows cumulonimbus maps: the cumulus at the bottom, a tower from its core, an anvil under the top (ABYSSAL's height profile, MIT notice kept). Its self-shade marches the sun through the tower.prepare_deck, thenrun(any thread) orstep(job, budget)(a few units at a time), thenadopt_deck. A stale job is refused. A deck built in steps is bit-identical to one built at once. The cumulus source fields are kept, so terrain_lab's 3 km deck builds in about 150 ms and goes back in about 30 ms, instead of re-growing the grammar (seconds).cell_up_tau: the optical depth straight up, for dark bases.cloud_sky (
src/cvcGL/ariadne/lsystem_nodes.cpp)sky.base,sky.top,sky.darknessandsky.storms.cvc/core/sliced_task.h, the mechanism generated_world: rebuild and repaint as sliced tasks, not in the frame #984 gavegenerated_world's rebuilds) and swapped in when done. Natively it runs on the background pool. In single-threaded wasm (the Pages gallery, arigl-web), wherestd::asynccannot start a thread, it runs a few milliseconds a frame on the scheduler thread viacloud_layer::step.deck_threading: cooperativeforces the sliced path natively (threadedandautomaticare the others;CVC_SLICED_THREADING=cooperativealso applies). There is nostd::asyncleft.darknessmoves the colour ramp toward a storm ramp. Where a cloud is darkened, its light dims as the cloud above hides the sky (ABYSSAL'sskyVis:cell_up_tauin the near volumes, two taps up in the far shells). Tower bases go dark and cumulus bases stay light. At darkness 0 nothing changes.cloudStorm0..3,cloudDark,cloudMarchN,cloudLightReach). A receiver's ambient drops by up to 0.55 under a storm (cloudAmbient).The
weathernode (src/cvcGL/ariadne/weather_node.cpp, registered in the cvcGL extension bundle)ground:node's extent.cloud_skynamed bysky::sky.storms;sky.toptowardstorm_topin four steps while a storm is withinreachof the ground (so the tall maps exist only while a storm is about);sky.darkness.weather.state/.storminess/.cells/.storms/.rain/.deck.weather.requesttakesupwind,overheadorcalm;weather.time_scalesets the time-lapse.Documents
weather_controls.ari: the weather now, Storm upwind, Storm overhead, Clear sky, Time scale. INDEX entry.sky_controls.ari: a Darkness slider.weathernode, its window and its menu item.How it was checked (Windows 11, MSVC Release)
WorldWeather.*(9):19e696666ebdfd0d);compact(28 events to 7, the weather from then on unchanged);WorldCloudLayer.*(22):cvcgl_ariadne_realize, all checks, including a new weather section, run twice: once with the deck builtautomatic(the pool) and oncecooperative(a share a frame, as single-threaded wasm builds it; the build takes several frames):steerevent;ariadne_loader_test(weather_controlstakes its node as an arg; INDEX lists it).World*test (116),Lsys*(26, the appended stream moves no salt),AriadneLoader*(38),AriadneComponents*(10),cvcgl_tree_version, andarigl check terrain_lab.ari.CVC_SLICED_THREADING=cooperativeand a storm overhead. The storm deck came in (frame looked at), placed with--set viewers.main.camera.orbit.*now that arigl: --set's camera keys hold over the scene's first framing #1307 holds them.Frame cost (arigl snapshots of terrain_lab at 1280×720, RTX 4070 Laptop, the per-frame time being (the 720-frame run − the 120-frame run) / 600, three runs of each, interleaved, medians; the machine was running three other agents' builds, so absolute numbers are inflated and noisy):
--set weather.request=overhead)The spread swamps any difference (the frames ran about twice O15's 55 ms), so read this as: within the noise, neither the clear sky nor the storm costs more than master. By construction:
CLOUD_SAMPLESper slab, as before, and their two upward taps run only where a cloud is darkened.A quiet-machine run and GPU timer queries would firm this up.
Merge with master
origin/master(with #1304, #1307 and the others) was merged in, not rebased. The one conflict was the custom node list in docs/ARIADNE.md; both sides were kept. The delta over master is still only this PR's 23 files.Not checked / not done
deck_threading: cooperative), not yet in the wasm gallery.cloudShade()only, andwater_node.cppbelongs to the foam/shading PR in flight.