River Delta Tile

showcase/river-delta-tile/

A procedural strategy-game map tile of a river delta — a square 2.40 m on a side, low and flat, where a river comes in through the back edge and forks twice at the angle natural deltas grow toward into four distributaries, each child's width set by hydraulic geometry so the widths squared balance at every fork; its water falling along every channel and level with the sea through the backwater reach to every mouth; natural levees holding each channel over the marsh; a farmed upper plain in a hedged patchwork of staggered fields drilled in rows, a wild lower plain of marsh, salt marsh and mud with an oxbow lake and ponds; a lobed coast with soft tan silt plumes fading into a sea whose colour ramps smoothly with depth out to a slate quay wall, and arrowhead marsh-crowned bars off the mouths; reed beds, weeping willows and poplars, drift logs afloat and stranded up the beaches, and a fisherman's stilt hut with its jetty, boat and a V-shaped wattle fish weir — through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.

Rendered headless by the showcase piece itself. Select it to enlarge.

witnesses Recomputed: 140062 tris, seven materials with 52606 ground, 46595 water, 17414 reed, 998 timber, 646 bark, 5420 foliage and 10752 plinth faces, UVs in 0..1 with zero AABB overlap, outer AABB 2.400×2.400×0.295 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, the water never rising along any of the four courses (largest step 2e-7 m over 2863 samples, max 1e-6), the children's wetted widths squared over the parent's 0.960, 1.008 and 0.991 at the three forks (band 0.88–1.12) and the forks opening 73.3°, 73.6° and 74.0° (band 58–82), every mouth's course wet all the way and ending at the sea's level, every levee crest at least 0.0078 m over its channel and 0.0021 m over the marsh behind at 228 stations, all six islands' cores 0.0040–0.0050 m out of the water round them, the sea at 0.1500 m with a 0.0024 m ripple and the ponds flat, every water rim at least 0.0025 m under the ground, all 4350 reed blades 0.0037–0.0059 m in the ground, the floating logs and the boat 0.33–0.55 of their height under the water and the stranded logs sealed in every sector, all 28 stilts, jetty posts and stakes footed 0.0099–0.0155 m in the bed with their tops over the water, all 35 trunks 0.009–0.011 m in the ground, LOD ratios in band, eight-hull collider 174 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z 16; --uphill-channel 17; --choke-branch 18; --splay-fork 19; --plug-mouth 20; --breach-levee 21; --drown-islet 22; --flat-sea 23; --short-sea 24; --float-reeds 25; --sink-logs 26; --lift-hut 27; --float-trees 28.

category Terrain

tags mesh export showcase

blender --background --python showcase/river-delta-tile/river_delta_tile.py --

A showcase piece, not an example, in the terrain category. It builds a procedural strategy-game map tile at hero-diorama density (about 140k triangles at LOD0; the gated LOD2, about 31k, is the in-game asset): a square 2.40 m on a side, low and flat, where a river comes in through the back edge and splits twice into four distributaries that fan out across a delta plain to the sea at the front. The sea fills the tile out to its rim on the front and both sides.

Every seeded draw comes from random.Random(SEED) in plan_scene(), before anything is built: where each tree, reed clump, log and the hut stand and their size, tone and turn, and the ripple's phases. The ground and the water are closed-form in plan position. No flag draws from the stream, so a falsifier changes only what it names.

All the water — the sea, every channel and each pond — is one slab on the tile's own lattice: a cell holds water when any corner lies under its level, so the sheet's rim runs under the banks, the shore and the rim. Ground never lies within 0.9 mm of the water over it, so the two sheets that share the lattice share no vertex and no plane.

Seven materials: delta ground (marsh, meadow, fields, mud, sand, seabed), water (sea, channels, plumes, ponds), reed (the reeds and the hut's thatch), timber (the hut, jetty, posts, stakes, hurdles, logs and boat), bark, foliage (willows and poplars), tile plinth (the slate rim, its quay wall into the sea, and the skirt's section — a turf line over bedded silts and sands with a scatter of pebbles, as the terrain category's).

It asserts budget conformance of the generated result. It does not witness an API contract. "It rendered without error" is not a check.

Composes skills mesh-editing-and-bmesh, bake-high-to-low, depsgraph-and-evaluated-data, engine-export-presets, and snippets bake_normal_high_to_low.py, setup_bake_target_image.py, lod_chain.py / decimate_to_budget.py, convex_hull_collider.py, export_preset_unity.py (helpers copied inline, not imported).

The collider is eight convex hulls joined in one mesh, built from points only: the plinth up to the water, and the delta's plain in seven fans from the apex, each from where it comes in over the back edge out to the coast or a side. Boats sail the water; units walk the land.

Budgets#

Every budget is declared as a named constant. Every gate recomputes its value from the mesh, materials, UVs, evaluated LOD, collider, or export file.

AxisDeclaredMeasured (5.2.1)
Base triangles138000–142500140062
LOD1 ratio0.32–0.62 of base0.5000
LOD2 ratio0.10–0.35 of base0.2200
Materialsexactly 7 distinct; face floors ground ≥51900, water ≥45300, reed ≥16880, timber ≥955, bark ≥627, foliage ≥5257, plinth ≥95607 slots; 52606 / 46595 / 17414 / 998 / 646 / 5420 / 10752
UVsin 0..1, AABB overlap ≤ 1e-5in range, overlap 0
Outer AABB(2.4000, 2.4000, 0.2948) m ± 0.01(2.4000, 2.4000, 0.2948), zmin 0
Collider tris (eight hulls)≤ 360174
Exportwritten, size > 0, removed after measuring14545956 bytes

DECIMATE COLLAPSE triangle counts are not identical across Blender series, so the LOD gate is a ratio band, not an exact count. Bake pixels are stochastic, so the bake gate is has_data plus operator FINISHED, not byte-identity. The plan is seeded and nothing else is random; two default runs print identical measurements.

The outer AABB's declared height is the tallest poplar's top. Moving the stranded logs off the bars and up the beaches changed how many draws the log loop takes, so the trees and reeds after it were drawn afresh; the declared height follows the new tallest tree (0.2960 to 0.2948 m) at the same ± 0.01 tolerance. No band was widened.

Hygiene#

Recomputed from the generated mesh, not asserted about the script.

AxisDeclaredMeasured
Non-manifold edges00
Loose verts / edges0 / 00 / 0
Doubles merged at 1e-500
Zero-area faces00
N-gons00
Coplanar cross-shell face pairs (KD range 0.05 m, plane ε 1e-4)00
Grounded: zminwithin 1e-4 of 00.0000

The tile's flat base is the only geometry at Z = 0.

Delta invariants#

A delta has no joinery. What makes this read as a delta is that its water runs downhill down every channel to the sea, that its forks split the way real ones do, that its levees hold the channels above the marsh, that its islands stand out of the water, and that the reeds, trees, posts and logs are rooted in it or float on it. Each face carries Part, Ident and Cap tags so a shell's role and its foot can be named; every measurement is then made on the shipped mesh by rays straight down onto the water's top and onto the ground, along and across the channels' courses.

AxisDeclaredMeasured
Water falls: along every mouth's course from the back edge through its forks, the water's surface every 4 mm, the largest rise from one sample to the next≤ 1e-6 m2e-7 m over 2863 samples
Width rule: at each fork, the wetted width across the parent 100 mm upstream and across each child 150 mm downstream, (sum of the children's widths squared) / the parent's squared0.88–1.120.960, 1.008, 0.991
Fork angle: the angle between the two children's courses, each found from the wetted span's middle at 70 and 190 mm58–82°73.3°, 73.6°, 74.0°
Mouths reach the sea: along every course, water over the ground at every sample; the water at its end against the sea's levelno gap, ≥ 0.001 m deep; ≤ 0.002 mno gap, 0.0034 m shallowest; 0.00000 m at all four
Levees: every 25 mm along every channel, each bank's crest (the highest ground out to three crest-distances) over the water at the channel's middle, and over the marsh behind it≥ 0.004 m; ≥ 0.0018 m0.0078; 0.0021 (228 stations)
Islands: the lowest ground over each island's core against the water round it — the sea for the three bars, the higher of the two channels either side for the three islands between forks≥ 0.0025 m0.0040–0.0050
Water level: the open sea's top, median and largest excursion; each pond's toplevel 0.150 ± 0.0015 m; ripple 0.001–0.006 m; ponds flat within 0.0004 m0.15000; 0.00240; 0.0000
Water contained: the ground over every rim vertex and rim-edge midpoint of every water sheet (save the river's cut in the back edge)≥ 0.0015 m0.0025 over 2719 points; 19 at the cut
Reeds rooted: every blade's foot (its bottom cap) under the ground0.002–0.030 m, 4350 blades0.0037–0.0059
Afloat: every floating log and the boat, the share of its height under the water; every stranded log sealed in the ground in each sector0.25–0.75; ≥ 0.0025 m0.33–0.55 (4); 0.0070–0.0124 (4)
Posts: every stilt, jetty post and weir stake, its foot under the bed and its top over the waterfoot 0.004–0.050 m, top ≥ 0.003 m over0.0099–0.0155 (28); 0.0082
Trees rooted: every trunk's foot under the ground0.004–0.050 m, 35 trunks0.0094–0.0113

Falsifiers#

Each falsifier violates one named budget. Every one was run on 5.2.1 and exited its declared code.

FlagBudget violatedExit
--skip-decimateLOD1 ratio band (measured 1.0000)9
--stray-vertloose vertex count is 0 (measured 1)15
--lift-zbounding box zmin is 0 (measured 0.05000)16
--uphill-channelwater falls (a 12 mm swell raised mid-course on one channel: rises 0.00046 m between samples)17
--choke-branchwidth rule (one channel narrowed to 0.62 of its width: 0.767 at its fork)18
--splay-forkfork angle (one channel swung out 30° about its fork: 104.3°)19
--plug-mouthmouths reach the sea (a mouth dammed 6 mm over its water: 5 dry samples along its course)20
--breach-leveelevees (a crevasse cut in one bank: a crest 0.0015 m under the water)21
--drown-isletislands (one bar's crest lowered 10 mm: 0.0055 m under the sea)22
--flat-seawater level (the sheet laid flat: ripple 0.00000 m)23
--short-seawater contained (the sheet's shoreward rim drawn 50 mm out to sea: −0.0020 m)24
--float-reedsreeds rooted (every reed raised 30 mm: feet −0.0263 m)25
--sink-logsafloat (the floating logs and the boat sunk 30 mm: 2.7–3.2 of their height under)26
--lift-hutposts (the hut, the jetty and the weir raised 30 mm: feet −0.0201 m)27
--float-treestrees rooted (the willows raised 40 mm: feet −0.0306 m)28

--uphill-channel raises the water alone, after the sheet's cells are chosen, so the triangle count holds. --choke-branch, --splay-fork, --plug-mouth, --breach-levee and --drown-islet reshape the ground, so the water covers a few more or fewer cells; the triangle band is wide enough that each reaches its own check. --float-trees lifts the willows only: the poplars stand tallest and would carry the envelope with them.

Run#

blender --background --python river_delta_tile.py --
blender --background --python river_delta_tile.py -- --skip-decimate
blender --background --python river_delta_tile.py -- --stray-vert
blender --background --python river_delta_tile.py -- --lift-z
blender --background --python river_delta_tile.py -- --uphill-channel
blender --background --python river_delta_tile.py -- --choke-branch
blender --background --python river_delta_tile.py -- --splay-fork
blender --background --python river_delta_tile.py -- --plug-mouth
blender --background --python river_delta_tile.py -- --breach-levee
blender --background --python river_delta_tile.py -- --drown-islet
blender --background --python river_delta_tile.py -- --flat-sea
blender --background --python river_delta_tile.py -- --short-sea
blender --background --python river_delta_tile.py -- --float-reeds
blender --background --python river_delta_tile.py -- --sink-logs
blender --background --python river_delta_tile.py -- --lift-hut
blender --background --python river_delta_tile.py -- --float-trees
blender --background --python river_delta_tile.py -- --output delta.png

Smoke passes no flags.

The hero does not turn the piece (HERO_YAW_DEG 0) and looks down on the tile from the front, 12° to the left and about 40° over it, the way a map tile is seen on a game board: the river comes in at the back, the forks fan out toward the camera, and the sea, the plumes and the bars lie in front. Seen from this high, the floor behind the tile is the backdrop, so the warm wedge drops its pool on the floor off to the left, where it reaches no water to glare off, rather than on the back wall. Framing measures fill x 0.700, y 0.872, margins left 0.181, right 0.119, bottom 0.061, top 0.067; the asset-quality floors pass.

Exit codes#

File-local. 9 is a valid check code. 10 is reserved for gallery_framing.check_framing and 11 for gallery_asset_quality.check_asset_quality, both on the --output path. 15–16 are the hygiene and grounded family; 17–29 are file-local.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Mesh did not build, no UV layer, or not one tile and its water
4Base triangle count outside range
5Material count ≠ 7 distinct slots, or a face-count floor missed
6UVs outside 0..1
7UV AABB overlap above tolerance
8World AABB off declared outer size
9LOD ratio band (--skip-decimate lands here)
10Framing gate (render path only)
11Asset-quality floor (render path only)
12Bake did not finish or image has no data
13Export file missing or empty
14--output produced no file
15Mesh hygiene: loose, non-manifold, zero-area, doubles, n-gons, coplanar cross-shell pairs
16Not grounded: bounding box zmin off 0
17Water rising somewhere along a channel's course (--uphill-channel)
18Width rule: a fork's children's widths squared off their parent's (--choke-branch)
19Fork angle: two children's courses outside the band (--splay-fork)
20Mouths: a course dry somewhere, or its end off the sea's level (--plug-mouth)
21Levees: a crest not over the water, or not over the marsh behind it (--breach-levee)
22Islands: an island's core not standing out of the water round it (--drown-islet)
23Water: the sea off its level or its ripple outside the band, or a pond not flat (--flat-sea)
24Water contained: a sheet's rim not under the ground (--short-sea)
25Reeds: a blade's foot out of its band under the ground (--float-reeds)
26Afloat: a floating log or the boat out of its draft band, or a stranded log not sealed (--sink-logs)
27Posts: a stilt, jetty post or stake's foot out of its band, or its top not over the water (--lift-hut)
28Trees: a trunk's foot out of its band under the ground (--float-trees)
29Collider triangle count above ceiling

Source

showcase/river-delta-tile/river_delta_tile.py View the script on GitHub →
A square delta map tile: a river splitting into four channels across hedged fields and marsh, tan plumes in a turquoise sea, sandy islets off the mouths, and a stilt hut by a jetty.