Skip to content

World edge: terrain_lab's sea by default, swash all round the shore edge, a rock under a floating world - #1482

Merged
transfix merged 1 commit into
masterfrom
world/shore-default-rock-underside
Nov 23, 2026
Merged

transfix merged 1 commit into
masterfrom
world/shore-default-rock-underside

Conversation

@transfix

Copy link
Copy Markdown
Owner

Three things about a generated world's edge, all seen in terrain_lab:

  • edge: shore (the island in the sea) becomes terrain_lab's default.
  • Its rim beaches showed no swash, while inland coasts did.
  • A world with walls (or no edge) was a thin sheet when seen from below.

Why the rim had no swash

I measured it with the coast terrain_lab's water builds (scene_water_shore): seed 5's world, and a swell of 0.8 m, 9 s, travelling toward 200°.

  • Sea floor: the rim's sea floor rose from 27 m deep to the waterline in 30 m, a slope of 0.9, and then a 1 in 50 beach began. The swell never shoaled, so it broke only in the last 5 m cell.
  • Runup: the runup carried up the beach is the waterline cell's. That cell's slope was its depth over the grid's shore distance, which is half a cell (2.5 m) however close to the waterline the cell lies. That gave 0.05 / 2.5 = 0.02, so Hunt's runup came out at 0.18 m on the windward side, against 1.85 m one cell further out.
  • Lee: the lee shores had an exposure of 0, so their runup was 0.01-0.02 m.
  • Inland: inland coasts are the relief's own steeper shores, so they reached 1-2 m.

Change

  • The shore band is a beach's profile (shore_terrain::coast). Measured from the edge:

    • the sea floor shelves up over the first 15 % of the band;
    • a 1 in 12 surf zone rises to the waterline at 45 %;
    • a 1 in 10 beach face climbs to a 1.5 m berm;
    • a 1 in 50 backshore runs on to 70 %;
    • the relief takes over by the band's end.

    New constants: world_surf_slope, world_beach_face_slope and world_berm_m.

  • terrain_mask::beach:

    • The shore band marks its beach with it.
    • The raster classes dry ground under the mask as sand. The berm stands above derived_class's 0.6 m sand band, so without the mask it would be grass.
    • The streets keep behind the beach.
  • shore_layer:

    • Waterline slope. Beside a dry cell, the slope across the waterline, (d − its depth) / cell, is used where it is steeper than d over the shore distance.
    • lee_exposure. A new parameter, the least exposure a shore gets. It defaults to 0, so the layer's own behaviour and its lee test are unchanged.
    • Smoothing. Two 3 × 3 passes even out the phase and runup carried up the dry beach, among the carried cells only. Without them the swash front stepped with the grid where the coast runs across it.
  • The water node's coast (scene_water, drawn and physics) passes lee_exposure 0.25. Diffraction carries some swell round an island, so its far side gets small breakers and a gentle swash, not a dead calm.

  • world::world_underside and cvcGL's world_nodes: the rock under a world with walls or no edge.

    • Its top ring is the terrain mesh's rim samples, so the two meet with no gap.
    • Below the rim it falls as a cliff 2.5-6.5 % of half tall.
    • Then 9 rings taper from the square to a rounded, ragged cone, ending in an apex about 0.55 half (plus half the relief) further down.
    • It is coloured soil at the cut edge and banded rock below.
    • It is drawn only: no collision, and it casts no shadow.
    • It sits under <id>_underside, which follows the world's visibility. A shore edge empties it.
  • terrain_lab.ari: edge: shore.

  • docs/ARIADNE.md: the beach profile, the lee swell and the rock.

Results

terrain_lab's world. "Runup" is the runup over the first dry ground walking in from the middle of each side.

Rim Runup before Runup after Surf zone waves after
East (windward) 0.18 m 1.24 m 0.36 m
North 0.07 m 0.50 m 0.21 m
West (lee) 0.02 m 0.31 m 0.15 m
South 0.01 m 0.58 m 0.16 m

I rendered it natively offscreen with a scratch harness, not committed:

  • The island: a sand beach and a surf band all round.
  • The windward beach: breakers across the surf zone and a wet swash film on the beach face, its front smooth after the evening-out passes.
  • The road: the street that ran along the waterline now runs behind the beach.
  • The rock: under the wall-edged world, a cliff below the rim and a tapering cone.

Tests

  • New AriadneSceneWorld.AShoreEdgedWorldsBeachTakesTheSwashAllRound: on every side of terrain_lab's shore edge, the swell reaches the surf zone and the runup tops the first dry ground by at least 0.15 m. Windward it is over 0.8 m.
  • New WorldGenerated.AFloatingWorldHangsOverARock checks that:
    • the top ring is the rim's own samples, and the rock hangs well below the ground with its apex near the middle;
    • every face looks outward or down, and the normals are unit length;
    • a shore edge has no rock.
  • WorldGenerated.AShoreEdgeLinesTheWorldWithABeachAndTheSea: the window that looks for sand moved to the berm (60-70 % of the band, which is the surf zone's place now). It also checks that the berm is sand above 0.6 m.
  • OceanShore.IsTheSameOnEveryPlatform, re-baselined: 0x0d101cbd6365b13f → 0x7524b796ce361d62, measured on MSVC x86_64. The runup and the carried fields changed by design. The new arithmetic is subtraction, division, max and means of floats in a fixed order, so the other platforms should agree. A lane that disagrees has found a determinism leak.
  • Passing locally on Windows (MSVC Release): every test in world_terrain_test (6), world_water_bodies_test (23), world_bundle_test (5), world_bundle_v2_test (6), world_raster_test (5), world_generated_test (36), ocean_shore_test (16), ocean_sea_test (23), ocean_ewave_test (18) and ariadne_scene_world_test (114); and cvcgl_ariadne_realize, cvcgl_ariadne_physics, cvcgl_world_geometry_nodes, cvcgl_wake, cvcgl_ocean_band and cvcgl_world_units.

Not checked yet:

  • WebGL: the change needs a merge and a deploy before it shows in the gallery.
  • Motion: I looked at the swash in still frames, not in motion.

…dge, a rock under a floating world

The shore edge's beaches showed no swash while inland coasts did. Its sea
floor rose almost sheer (27 m in 30 m) to a 1 in 50 beach, so the swell
never shoaled and broke only in the last cell, and the runup carried up the
beach came from the waterline cell's slope, its depth over half a cell
whatever its true distance: 0.18 m to windward, 0.02 m in the lee.

- shore_terrain: the band is a beach's profile: a shelf, a 1 in 12 surf
  zone to the waterline at 45 %, a 1 in 10 face to a 1.5 m berm, a 1 in 50
  backshore to 70 %. terrain_mask::beach marks it: the raster classes dry
  ground there as sand, and the streets keep behind it.
- shore_layer: beside a dry cell the waterline's slope is the slope across
  it where that is steeper; lee_exposure (default 0) sets the least
  exposure; two 3 x 3 passes even out the carried phase and runup so the
  swash front does not step with the grid. The water node's coast passes
  lee_exposure 0.25. The platform digest is measured again.
- world_underside: a world with walls or none hangs over a rock (its top
  ring the terrain's rim, a cliff, then a tapering ragged cone), drawn by
  cvcGL's generated_world node under <id>_underside.
- terrain_lab.ari: edge: shore.

Runup over the first dry ground on terrain_lab's rim: east 0.18 -> 1.24 m,
north 0.07 -> 0.50, west (lee) 0.02 -> 0.31, south 0.01 -> 0.58.
@transfix
transfix enabled auto-merge (squash) November 23, 2026 03:57
@transfix
transfix merged commit e1bbef7 into master Nov 23, 2026
31 checks passed
@transfix
transfix deleted the world/shore-default-rock-underside branch November 23, 2026 18:00
transfix added a commit that referenced this pull request Nov 23, 2026
… into p9/volume-grid-segment

INDEX.ari keeps both new entries (volume_grid_segmentation, http_cache).
volume_grid_contours.png conflicted (#1450 re-rendered it for rows that
flow); kept ours until CI renders the merged panel.
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