Skip to content

generated_world: sea level at 0 m, a Regenerate button, and --set for ari, arigl and arisrv - #1008

Merged
transfix merged 2 commits into
masterfrom
fix/world-regen-ui
Nov 3, 2026
Merged

transfix merged 2 commits into
masterfrom
fix/world-regen-ui

Conversation

@transfix

@transfix transfix commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Three things Joe hit in the deployed terrain lab, and the debugging aid that found the first one.

1. Changing the preset made a flat water world. Switching Standard to Urban regenerated a world of sea, with nothing on it. It was not the LOD. A preset set the relief (urban: 10 m) and left the water level at the document's 34 m, so the whole world was under water. Standard (36 m under 34 m) was nearly as bad.

Sea level is 0 m now, as Joe asked: every generator lays its ground with 0 m as the shoreline.

  • fbm: the land's floor sits world_sea_share (34/90, the old default's share) of the relief below the sea, through a new heightfield_params::base_m.
  • dem: a DEM is anchored the same way, through a new load_dem(..., floor_m).
  • Island: stands its dome in the sea, with its shelf a real depth below it.
  • Water level: water_level_m defaults to 0 and raises or lowers the sea from there. Presets set it to 0, the panel writes it back on a preset change, and its slider runs -100..100.
  • Same terrain at the defaults: at 90 m of relief and the old 34 m water level the geometry is the old one shifted down 34 m. The terrain under water is the same 15% as before.
  • Raster: it classes ground against the terrain's sea level, so it now marks the submerged ground as water (hard where deep) and the 0.6 m above it as sand: a beach along every shore. Before, its sea reference sat at the terrain floor, so lakebeds classed as grass and nav saw lakes as grass.
  • Ground texture: material mode shades underwater ground from a light shore green-blue to deep blue over 8 m. The water volume all but vanishes over the shallows, so the old grass-painted shallows looked like land and the lakes looked smaller than they were.

2. A Regenerate button instead of rebuilding on every edit.

  • Edits to world.* now wait. The panel says "Settings changed: Regenerate to apply them." (world.pending), and Regenerate or Randomize rebuilds once.
  • A "Regenerate on change" checkbox (world.auto, seeded by the node's auto_regenerate) keeps the old live behaviour.
  • Colour by still repaints at once.

3. --set KEY=VALUE on ari, arigl and arisrv, for debugging and scripted runs.

  • ari, arigl: write the value under the document's state root before the document loads, so its nodes seed from it. It's repeatable and in order, and a leading / means from the app's root. Shared parsing lives in host_cli (parse_state_set, apply_state_sets).
  • arisrv: writes from the app's root once the room tree is up, before any client connects.

Checked

  • world_generated_test:
    • EveryPresetHasLandAndWater: every preset leaves land and water at sea level 0.
    • The fbm floor is the same share of every relief.
    • The DEM floor follows the new anchoring.
  • ariadne_host_test: SetWritesStateKeysBeforeTheDocument.
  • cvcgl_ariadne_realize:
    • An edit waits with world.pending set, and Regenerate rebuilds.
    • Urban sets its 10 m relief and the sea back to 0.
    • world.auto rebuilds on an edit.
    • A regenerated world's ground chunks and prop cells are all in the renderer and visible.
  • Native arigl snapshots:
    • terrain_lab after Urban + Regenerate: a city on 10 m of relief with shallow ponds and sand beaches.
    • The default world beside the pre-change render: the same land, now with its shallows visible.
  • arisrv was not built locally (this build has no gRPC); CI's gRPC jobs compile it.

… ari, arigl and arisrv

A preset set the relief and kept the document's water level, so the urban preset's 10 m relief
regenerated under 34 m of water: a flat water world. Sea level is now 0 m for every generator:
the fbm land's floor sits world_sea_share (34/90) of the relief below it (heightfield_params::
base_m), a DEM is anchored there too (load_dem's floor_m), the island stands in the sea, and
water_level_m defaults to 0 and moves the sea from there. The raster now classes the ground under
the sea as water and the shore band as sand, and the ground texture shades the water by depth.

Edits to world.* wait for Regenerate (world.pending says so); world.auto, a checkbox, rebuilds on
every edit as before.

--set KEY=VALUE writes a state key before the document loads (ari, arigl: under its root) or
before clients connect (arisrv), for debugging and scripted runs.
@transfix
transfix merged commit 97018d9 into master Nov 3, 2026
22 of 27 checks passed
@transfix
transfix deleted the fix/world-regen-ui branch November 3, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant