Ridge mockups A+D: D's sweep as the bake for A's painter, cone sampling, 360 ring, relit

Vienna ridge from Copernicus GLO-30. Mockup only: nothing here is game code, nothing renders live in the game and no bake is wired in; the Aetheria repo is untouched. Previous page: pipelines A-D. The view is the original 1280x600 window (az 178-250, rows 40-440 shown, so 1280x400 images) cut from a full 360 deg ring baked at the same angular resolution (6400 columns). Vertical exaggeration is AUTHORED: 100 px/deg vertically against 17.8 px/deg horizontally, about 5.6x. The real angular range of this view is about 2 deg.

Recommendation and confidence

Take A's painter baked from D's sweep, 6-7 layers on the authored ramp, bake the full ring offline, relight at runtime from the sun (shading pass only). Do not pay for cone sampling as specified (footprint = distance x column width): at this angular resolution it changed almost nothing (34 of 34 ridges matched, skyline p95 difference 0.0035 deg = 0.35 px) and costs 2.3x the sweep samples plus a pyramid. Cone sampling starts to matter only when the footprint is a multiple of the column width (x4 below moves the skyline by up to 0.40 deg and adds one ridge), which is the case if the game renders coarser than the bake. Confidence about 0.65 that ray sampling with D's 40-250 m step is enough for the bake; about 0.5 that cone x4 is better than x1 for the roofs-and-trees problem (the 25 m prominence filter already removes them, see stability); about 0.7 that the per-peak slope as painter input is worth keeping (it drives five visible things, below) but its values are small and my normals from it are weak (see flags).

1. What was built

  1. Stage 0 (offline, cached): GLO-30 mosaic (3 tile rows, N47-N49, E015-E017) -> mip pyramid by 2x box downsampling (levels 0-7, 30 m to 3.9 km texels) -> march of every one of 6400 azimuth columns, 500 m to 95 km, with Earth curvature and refraction (section 6). Ray: bilinear sample of level 0, step min(250, max(40, 0.004 d)) m (D as it was). Cone: level = log2(d x 0.000982 rad / 25 m), clamped to 0-7, sampled trilinear (two levels, bilinear in each); step = max(40 m, footprint), i.e. one texel of the sampled level, which also makes the march about 2.3x denser than the ray's (1870 vs 828 samples per column). Footprint reaches the 25 m cell size at 25 km and level 1.9 at 95 km.
  2. Sweep (D): per column peak/valley scan (prominence 25 m, near-cap 4 km), now recording for each span the peak height, valley height and the run between them: that is the per-peak slope (rise in angle, rise in metres, front slope = atan(rise/run)). Chains link adjacent columns with a 4-column look-back, modulo 6400, so a ridge can cross north.
  3. Layer cap: each chain's median distance snaps to the nearest of 7 authored knots (80, 48, 28, 16, 9, 5, 2.5 km, in log distance) on the authored 7-step colour ramp; a slot is the per-column top envelope of its chains. 6 of the 7 slots are occupied in this ring (cap 6-8 respected).
  4. Painter (A's cut-paper layer, adapted): the slope data drive the following, all read from the chain arrays (no raster buffer):
    • foot / valley mist: foot length = 85% of the span's own rise in image pixels (valley angle to crest), clamped 28-210 px, per column;
    • body tone: richer and darker where the front slope is steep, paler where gentle (factor 1.07 - 0.22 s, s = slope/8 deg);
    • ink edge weight: 0.7 + 1.8 s px at the crest line;
    • Tanaka contours on each ridge face: iso-height lines every 30 m of height on the ramp valley height -> peak height (heights from the span, positions from the valley/crest angles), thicker on the side facing away from the light, fading with distance and into the mist foot;
    • hachure (pen strokes down the fall line from the crest): length and density by slope, alternating long/short, leaning away from the high side of the crest;
    • normals (section 5): from the same front slope plus the lateral gradient of the crest height.
  5. Relight (section 5): sun azimuth/elevation in, shading and atmosphere out; the bake does not depend on the sun.

2. Ray vs cone, same everything else, same 1280x600 view

ray over cone
topray sampling, bottomcone sampling x1 (footprint = distance x angular column width, trilinear mip). Same noon sun (12:46 CEST, az 180, el 42), same painter, same prominence 25 m. They are visually the same picture. The flat wall at the bottom is the nearest layer (2.5 km slot): near ground has no relief at this vertical scale and it reads as a slab. That is the weakest part of the image; the pass already flagged it (crop or replace band 0).
ray over cone x4
topray, bottomcone x4 (cone width = 4 columns, footprint 4x, mip up to 3.9). Extra, not asked for: it shows what a footprint that matters does. The skyline moves by at most 0.40 deg (40 px) and one ridge (35.5 km, az 55.8) appears.

Debug spans (raw per-column spans before chaining, coloured by distance, red near to violet far)

spans ray / cone
topray spans, bottomcone x1 spans. Indistinguishable by eye.
spans ray / cone4
topray spans, bottomcone x4 spans.

Measured bake times (warm, one core pinned with taskset, time.time(), median of 5 repetitions; PNG writing excluded)

stage (one core, time.time())raycone (x1)note
cold stage 0: mosaic from 9 GeoTIFFs (3 rows N47-N49), once, shared10.6 ssharedtifffile decode + concat + np.save (466 MB)
cold stage 0: mip pyramid (8 levels, 2x box)-1.4 sone time, 1/3 extra memory
cold stage 0: march, 6400 columns0.52 s (828 samples/col)1.42 s (1870 samples/col)ray: step 40-250 m; cone: step = max(40 m, footprint). Cached to rays-*.npz
warm: load cached stage 00.05 s0.06 snpz
warm sweep: extract (peak/valley scan, pure Python)0.81 s (min 0.76)1.93 s (min 1.89)6400 columns; cone scans 2.3x the samples
warm sweep: chains + slots0.12 s (min 0.11)0.11 s (min 0.11)wrapped linking, 7-knot quantiser
warm bake: normals, face, contours, hachure, rim band (sun-independent)2.85 s (min 2.57)2.47 s (min 2.43)6 layers
warm total sweep+bake3.79 s4.52 sring = 360 deg = 6400 columns (5x the 1280-column view)
relight (shading + atmosphere + sky + composite), per sun1.93 s (min 1.88)2.02 s (min 1.87)mean over the 5 suns, median of 5 repetitions

The machine is shared with other Minds; repetition spread is visible as min vs median. Relight cost is linear in columns: a 1280-column window would be about a fifth of the ring figure (derived, not separately measured). Cold stage 0 numbers are from the first run of each (cold.json). Two other stage-0 builds, both cold (from the log of their first run): cone x4 pyramid+march 2.9 s (813 samples/col); ray with the cone's step schedule (control) 1.26 s.

Ridge / chain / layer counts, prominence 25 m

samplingraw spans / columnof which <5 kmchainskept chains (>= 10 columns... 0.56 deg)layers (slots)
ray2.841.0382346
cone2.881.0382346
cone42.711.0379356

What differs, honestly

Stability across prominence settings (3 / 10 / 25 / 60 m)

prominenceray: chains / kept / layers / layer-agreement vs 25 mcone x1ray with cone step (control)cone x1, curvature OFF
3 m92 / 51 / 7 / 48%92 / 51 / 7 / 48%92 / 51 / 7 / 48%115 / 51 / 7 / 35%
10 m148 / 57 / 7 / 62%151 / 57 / 7 / 62%151 / 56 / 7 / 62%172 / 62 / 7 / 36%
25 m82 / 34 / 6 / (ref)82 / 34 / 6 / (ref)81 / 34 / 6 / (ref)103 / 41 / 6 / (ref)
60 m73 / 32 / 6 / 73%71 / 32 / 6 / 73%72 / 32 / 6 / 73%78 / 38 / 6 / 72%
stability ray
rayprominence 3, 10 (top row), 25, 60 m (bottom row), window shown at half size.
stability cone
cone x1same four settings.

Reading it: chain count is not monotonic in prominence (82 at 25 m, 148 at 10 m, 92 at 3 m, 73 at 60 m for the ray), kept chains 51/57/34/32. The layer-agreement column is the share of ridge pixels (everywhere something behind the foreground layer is painted in either setting) that are assigned to the same colour slot as at 25 m: 48% at 3 m, 62% at 10 m, 73% at 60 m. Prominence is still the unstable knob; the cone does not change that (ray and cone agree to within 0.1 percentage points). The slot quantiser hides chain splits as long as the pieces fall in the same knot interval, which is why the image looks steadier than the chain counts.

3. 360 degree seam

The ring is periodic everywhere: columns march over 0-360; chain linking and look-back index columns modulo 6400 (a chain is unrolled at its largest circular gap, 1 kept chain crosses north); blurs pad by wrapping; the edge-wobble, mottle, grain and paper noises are value noise on an integer number of cells per ring; misregistration is a roll; the wrapped gradient, contour and hachure derivation use wrapped gradients; normals and sun geometry use the absolute azimuth. The image below is the ring rotated by 180 deg so the seam (north, columns 6399 | 0) is in the middle, marked by the dashed line.

seam in the middle
seamcentre line = the wrap, 1280 columns around north. The picture is the noon relight of the cone bake.

Verification (numbers, not a glance):

4. Sun: real angles for the Vienna observer

Formula: NOAA general solar position equations (fractional-year Fourier series for the equation of time and declination, true solar time, hour angle, zenith and azimuth), gml.noaa.gov/grad/solcalc/solareqns.PDF, plus Saemundsson refraction for the apparent elevation (Meeus). Implemented in src/sun.py, accuracy about 0.1 deg. Observer: 48.1929826N, 16.3534237E (the mockup's existing viewpoint, 30 m above ground). Date: 2026-09-23 (the autumn equinox), chosen because the day is 12 h long, the sun rises due east and sets due west, and it is season-neutral (the actual build date, mid-November, has a noon elevation of about 24 deg and would bias the set toward low sun). Sunrise 06:40 CEST and sunset 18:52 CEST (geometric elevation -0.833 deg); solar declination 0.3 deg. The view window faces SW (az 178-250), so only the noon sun is at its edge; the sun shows up mostly through scatter (see the ring strips).

relight setlocal time (CEST, UTC+2)UTC hourazimuth (deg, from N)apparent elevation (deg)
dawn06:55 CEST4.9291.32.0
morning09:30 CEST7.50122.526.1
noon12:46 CEST10.78179.942.1
golden18:11 CEST16.19263.56.1
dusk19:02 CEST17.04273.1-1.8

dawn = sunrise + 15 min; mid-morning = 09:30 CEST; noon = maximum elevation; golden hour = apparent elevation 6 deg in the afternoon; dusk = geometric elevation -2.5 deg (about 12 min after sunset).

dawn
dawn06:55 CEST, sun az 91.3, el 2.0. The 72 deg window of the ring (az 178-250). Relight 2.08 s for the whole 360 ring.
morning
morning09:30 CEST, sun az 122.5, el 26.1. The 72 deg window of the ring (az 178-250). Relight 1.95 s for the whole 360 ring.
noon
noon12:46 CEST, sun az 179.9, el 42.1. The 72 deg window of the ring (az 178-250). Relight 2.00 s for the whole 360 ring.
golden
golden18:11 CEST, sun az 263.5, el 6.1. The 72 deg window of the ring (az 178-250). Relight 1.96 s for the whole 360 ring.
dusk
dusk19:02 CEST, sun az 273.1, el -1.8. The 72 deg window of the ring (az 178-250). Relight 1.98 s for the whole 360 ring.

Ring strips, the same bake relit (sun position readable as a glow)

ring dawn
dawnthe full 360 deg ring at half size (3200x400 stored; 0 deg = north at the left edge, east 90, south 180, west 270). Look for the glow toward az 91.
ring morning
morningthe full 360 deg ring at half size (3200x400 stored; 0 deg = north at the left edge, east 90, south 180, west 270). Look for the glow toward az 123.
ring noon
noonthe full 360 deg ring at half size (3200x400 stored; 0 deg = north at the left edge, east 90, south 180, west 270). Look for the glow toward az 180.
ring golden
goldenthe full 360 deg ring at half size (3200x400 stored; 0 deg = north at the left edge, east 90, south 180, west 270). Look for the glow toward az 264.
ring dusk
duskthe full 360 deg ring at half size (3200x400 stored; 0 deg = north at the left edge, east 90, south 180, west 270). Look for the glow toward az 273.

Relight cost

The bake (sweep + chains + normals + albedo + contour field + hachure + rim band) does not depend on the sun. Changing the sun re-runs only the shading pass: wrap-Lambert, rim, spec, atmosphere, sky and the composite over 6 layers. Measured relight of the whole 360 ring (6 layers, 6400x400), median of 5, one core: 2.02 s (min 1.87); per sun (median s): dawn 2.08 / morning 1.95 / noon 2.00 / golden 1.96 / dusk 1.98. Against the bake of 4.5 s. About 0.40 s for a 1280-column window (derived). This is numpy on full (400x6400x3) float32 arrays; it is a mockup cost, not a runtime budget (a runtime would apply the per-column gain vectors in a shader: the shading is per column, see below).

5. Shading model (stylised PBR) and atmosphere

Normals from the per-peak slope data

For each column of a slot: the visible face rises away from the eye along the view ray r (azimuth of the column) with the span's front slope θ = atan((peak_h - valley_h)/run); the lateral tilt is the column-to-column gradient of the crest height over the ground width of a column at the ridge's distance. n = normalize(-tanθ r - s_lat t, 1), with s_lat = d(peak_h)/dx / (distance x 0.000982), clipped to ±0.8, both smoothed over 8 columns. This is one normal per column per layer: it comes from the chain arrays only, no raster buffer and no per-pixel normal.

Light

Atmospheric rays (cheap analytic)

One view ray per column and layer: azimuth from the column, distance = the layer's slot knot. Extinction (Beer-Lambert): T_rgb = exp(-(beta_R,rgb + beta_M) d ATM), beta_R = (0.0058, 0.0135, 0.0331)/km (Rayleigh at sea level), beta_M = 0.023/km, ATM = 0.15 (authored scale, because the authored ramp already carries aerial perspective). In-scatter replaces what extinction removed: face′ = face T + haze (1 - T), haze colour per column = authored pale blue x (P(cosθ)/P(90°))^0.35 x sun/ambient hue, with cosθ = cos(el_sun) cos(az - az_sun) for a horizontal ray and P = 0.9 Rayleigh 3/(16π)(1+cos²θ) + 0.1 Henyey-Greenstein (g = 0.7): forward-scatter brightening toward the sun's azimuth, warm near the sun at low elevation (the sun colour is reddened by the airmass). The sky uses the same hue and gain plus a Mie-like glow (two Gaussians, 4.5 and 22 deg, around the sun direction). No multiple scattering, no altitude-dependent density.

6. Earth curvature and refraction

Applied in the bake, in the march, for every sample: angle = atan2(h - eye - d²/(2R) (1 - k), d) with R = 6371 km and refraction coefficient k = 0.13 (effective radius R/(1-k) = 7322 km). Eye = ground 183.3 + 30 m.

distancedrop d²/2R, no refractionwith refraction (1-k)in the image (authored 100 px/deg)
20 km31 m27.3 m0.078 deg = 8 px
50 km196 m170.7 m0.196 deg = 20 px
95 km708 m616.2 m0.372 deg = 37 px

Effect on the ridge stack: a ridge at 80 km sits about 0.3 deg (30 px at the authored scale) lower than the flat-earth calculation, which is more than most of the relief between ridges in this view, so curvature decides which far ridges peek over the near ones. Measured by re-running the sweep with the curvature term removed (same cone heights): 41 kept chains at 25 m against 34 with curvature, i.e. curvature hides 7 ridges that a flat earth would show; at 3 m prominence the raw spans per column go 9.3 -> 11.3 without it. The stack is built on it: dropping it would be a visible error, not a tuning knob. Refraction at k = 0.13 recovers 13% of the drop (a constant, not a function of weather).

7. DEM used, licences (verified from the sources, retrieved 2026-11-13)

The DEM in this mockup

Licence: Copernicus GLO-30

Source: the licence document itself, License-COPDEM-30.pdf ("Licence for the use of the Copernicus WorldDEM-30"), text extracted with pdftotext. Also the collection page dataspace.copernicus.eu ... COP-DEM: The GLO-30 and GLO-90 datasets are available worldwide with a free license.

Art. 4: The Licensor grants to the User the following non-exclusive rights of use regarding the Copernicus WorldDEM-30: (a) reproduction; (b) distribution; (c) communication to the General Public; (d) adaptation, modification and combination with other data and information.
Art. 5: The use rights granted under this licence are free of charge to the User. Art. 3: The rights granted under this Licence are worldwide and without limitation in time. Art. 1: The user must accept the terms and conditions of this licence to benefit from the rights of use granted in this licence.
Art. 6(a), distributing or communicating the DEM: © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.
Art. 6(b), adapted or modified data: produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.
Art. 6(c), on distribution or communication to the public, modified or not, add: The organisations in charge of the Copernicus programme by law or by delegation do not incur any liability for any use of the Copernicus WorldDEM-30. Art. 6(d): do not convey the impression ... that the user's activities are officially endorsed. Art. 6(e): subsequent users granted distribution rights are bound by the above obligations.

Redistribution of derived baked data: the licence grants adaptation, modification and distribution (Art. 4), so a baked ridge profile derived from GLO-30 may ship, with the Art. 6(b) notice and the Art. 6(c) disclaimer sentence in the game's credits/legal notice, and a non-endorsement posture (6(d)). That is my reading of the text for derived data, not legal advice; the licence has no sentence that mentions game bakes specifically.

Licence: SRTM (USGS EROS) and NASADEM (NASA LP DAAC)

GLO-30SRTM 1" (USGS)NASADEM
resolution30 m / 1" (verified)1" (~30 m) (verified)30 m / 1" (verified)
vertical datumEGM2008 (verified)EGM96 (verified)"geoid reference", not named (page)
DSM / DTMDSM (verified, two sources)not stated (unverified)not stated (unverified)
licenceCopernicus WorldDEM-30 licence: free, worldwide, perpetual, accept termsPublic Domain (USGS page); no use restrictions (EROS policy)openly shared without restriction; named licence not on page; CC0 for NASA-led missions per NASA policy
attributionrequired: 6(a) / 6(b) notice + 6(c) disclaimer + 6(d) no endorsementcredit wording suggested; mandatory-ness not statedNASA acknowledgement and citation requested/urged; DOI given
derived data may be redistributedyes under Art. 4(d) with the notices (my reading of the text)not addressed explicitly; no restriction stated (inference)not addressed explicitly; "without restriction" (inference)

8. Tile data for a 50-100 km ring, and what the game would ship

Observer 48.1929826N, 16.3534237E; 1 deg of latitude is 111.32 km, 1 deg of longitude is 74.2 km at this latitude. GLO-30 tiles needed (1x1 deg COG GeoTIFF; tile counted if its rectangle intersects the circle):

radiusbounding boxtiles by circletiles by bounding boxsize on disk (measured: the files in scratch/cop30)
50 kmlat 47.744-48.642, lon 15.680-17.0275 (N47E015, N47E016, N48E015, N48E016, N48E017)6215.3 MB (circle) / 259.0 MB (box)
100 kmlat 47.295-49.091, lon 15.006-17.7018 (all nine except N49E017, 101.8 km away)9344.2 MB (circle) / 387.2 MB (box, all nine)

Per-tile sizes on disk: 41.96-43.85 MB, 42.9 MB average, float32 deflate COG. The mockup's 95 km ring reads all nine as a rectangular mosaic (466 MB as float32 in memory). The N49 row is needed because 95 km due north of the observer reaches lat 49.05; I added it to the mosaic so the whole ring is real data (the first mockup mosaic stopped at lat 49 and would have clamped).

What a game ships instead: the baked per-azimuth ridge arrays, not the DEM. For 6 layers and 6 fields (top angle int16 in millidegrees, valley angle int16, crest height int16 m, valley height int16 m, front slope uint8 in 0.1 deg, taper weight uint8): at the full 6400 columns (0.056 deg) 384 kB raw, 44.4 kB zlib; at 1600 columns (0.225 deg) 96 kB raw, 14.9 kB zlib (sizes measured by quantising and compressing the actual arrays). Against 215-344 MB of DEM that is a factor of about 4852 to 23118. The normals, contours and hachure are recomputed from these at load time. Palette, ramp and the slot knots are authored constants. The Art. 6(b) notice and 6(c) disclaimer ship with it.

9. Flags, deviations, where it looks bad

Method README and PNGs: /opt/commons/handoff/nibu-ridge-mockups-ad-20261113/. Code: /var/lib/mind-nibu-self/ridge-mockups-ad/src/ (ad.py core, run.py full run, timing.py, sun.py).