Commit Graph
127 Commits
Author SHA1 Message Date
Richard Zink 98e69da3b2 atmosphere: cap haze alpha to avoid hard horizon cut 2026-10-12 16:35:57 +02:00
Richard Zink 69a00b479b atmosphere: add altitude-thinning distance haze 2026-10-12 16:24:11 +02:00
Richard Zink 7d75707e74 atmosphere: broaden bright sky band above horizon 2026-10-12 15:20:23 +02:00
Richard Zink e9b47c5857 atmosphere: raise sky horizon color band 2026-10-12 15:18:11 +02:00
Richard Zink a06f7038d8 atmosphere: make Rayleigh sky follow spherical Earth radius 2026-10-12 15:13:26 +02:00
Richard Zink 7329957658 atmosphere: add physical Rayleigh sky scattering 2026-10-12 15:08:59 +02:00
Richard Zink 629b1b6ab2 atmosphere: simulate Earth-Sun distance for solar irradiance 2026-10-12 15:06:13 +02:00
Richard Zink 06fb2f8d8f clouds: remove old cloud raymarch shader pass 2026-10-12 15:00:08 +02:00
Richard Zink 20b47f5460 clouds: clip only against curved horizon, not detailed terrain 2026-10-12 14:57:32 +02:00
Richard Zink cb847df3f5 clouds: intensify coverage, scale and detail 2026-10-12 14:55:32 +02:00
Richard Zink 8000c7be0e clouds: reduce raymarch jitter and high-frequency boiling 2026-10-12 14:53:57 +02:00
Richard Zink f25c7369cd clouds: remove terrain-height march breaks causing holes 2026-10-12 14:51:49 +02:00
Richard Zink 624c2c6311 clouds: repair curved deck entry and terrain occlusion 2026-10-12 14:45:31 +02:00
Richard Zink c546879b98 clouds: fix terrain clipping with curved occlusion 2026-10-12 14:36:29 +02:00
Richard Zink d59df7f4d1 clouds: follow spherical Earth curvature 2026-10-12 14:30:26 +02:00
Richard Zink c8fa1b3260 terrain: extend map with reduced-resolution outer height skirt 2026-10-12 14:16:06 +02:00
Richard Zink d173f926e4 atmosphere: remove volumetric fog pass 2026-10-12 14:06:38 +02:00
Richard Zink e78c6e86b6 curvature: bend terrain vertices to a spherical Earth 2026-10-12 14:04:29 +02:00
Richard Zink f2a3a2172d atmosphere: define EARTH_RADIUS_UNITS constant 2026-10-12 14:02:23 +02:00
Richard Zink 9a1efd5a59 atmosphere: define model uniform locations in init 2026-10-12 14:01:35 +02:00
Richard Zink e47a39fa46 atmosphere: declare uEarthRadius in sky shader 2026-10-12 14:00:50 +02:00
Richard Zink b9094ebd8b atmosphere: add initial volumetric atmosphere shell 2026-10-12 13:59:59 +02:00
Richard Zink ee56f2a1c8 moon: real lunar map (CC BY 4.0) with correct near-side geometry - the old normal sign lit the far side, so the disc came out black; stars are now occluded by the disc, sun and moon discs drawn at 12x physical without changing surface brightness; build.py inlines the map as a data URI 2026-10-11 22:46:35 +02:00
Richard Zink efd4db47cb geo: cell manifest geo/cells_v1 - cached road/place fast paths check one small record instead of reading every multi-megabyte raw cell 2026-10-11 21:34:52 +02:00
Richard Zink 6d21b37e8f progress logs behind CONFIG.debug, CONFIG.antialias + high-performance context, cheaper cloud sampling (skip far detail octave and redundant self-shading probe), brighter night contrails via CONFIG.flights.contrailNight, window.__flightDbg counters, real sun/moon by default 2026-10-11 18:42:48 +02:00
Richard Zink 113e4c522d airliner mesh is generated in-repo: tools/plane_gen.py writes vendor/plane3d.js (480 tris, CC0, same unit extent as the old Grab3D derivative); attribution updated 2026-10-11 18:42:48 +02:00
Richard Zink 499c00d8b1 standalone without our server: basemap and DEM load from the CORS-enabled upstreams, same-origin proxy only when a probe proves it exists; drop dead kumi.systems mirror 2026-10-11 16:02:10 +02:00
Richard Zink 4369afd3ef lighting: remove the palette terrain model - physics is the only lighting, themes tint it through THEMES[theme].lighting; debug panel shows the active palette and its tint/gain; credits no longer claim VIIRS 2026-10-11 15:39:42 +02:00
Richard Zink 6eb25bdd03 physical lighting, volumetric clouds, terrain shadows, pixel-art render scale
- atmosphere: physical terrain lighting (air mass, Rayleigh beam colour,
  skylight, moon, starlight floor), aerial perspective for terrain and
  cloud deck, configurable haze/albedo/ambient gains
- clouds: march the deck in height instead of ray distance, IGN dither
  (no per-frame flicker), per-step height jitter, 4-octave fbm renormalised,
  softer density threshold, distance softening as a procedural mip,
  grazing path clamp, cloud shadows on the ground (cloudShadowDensity/
  Floor/Ambient) and cloud haze factor
- terrain: self-shadows from the elevation field (penumbra + shadow floor),
  soft mosaic rim (edgeFadeTiles), east/west axis corrected (+X = west)
- lights: per-object twilight switching for cars, city dots and ground blocks
- flights: contrail width 620 m, fade to zero by contrailFadeKm, aircraft
  size decoupled from trail width, count halved
- render: CONFIG.renderScale with integer upscale + image-rendering: pixelated
- data: nginx overpass proxy + cache, per-mirror cooldown ladder, ring-based
  cell ordering (disc fills evenly), settlements fetched before roads,
  interim chain persistence, two worker lanes (car/city) with progress logs
- removed: NASA VIIRS night-lights layer (fetch, canvas, texture, uniforms)
2026-10-11 15:04:21 +02:00
Richard Zink cd460ec100 city lights: report buildMs in __cityDbg (measured: 17.5k places -> 46.7k points in 1.5ms) 2026-10-10 14:30:32 +02:00
Richard Zink 75dc5ed5b9 overpass: drop dead kumi.systems mirror (500 + no CORS) from endpoint ladder 2026-10-10 13:46:49 +02:00
Richard Zink 73d5c3f6a7 settlements: drop costly relation tier from place query (timed whole cells out), 3 mirror rounds with jitter, per-cell progress log; verified live: 1747 places -> 3855 lights 2026-10-10 13:37:35 +02:00
Richard Zink aebe311e32 cache derived geometry: merged road chains + settlement list persisted with cell fingerprints; two-tier best-first road stitching (raw-node headings, permissive interchange pass); fast path skips all raw parsing on unchanged data 2026-10-10 13:15:03 +02:00
Richard Zink 26bd5bbc59 contrails: keep visible at night as dimmed moonlit streaks (42% of night ramp); city debug counter + pending-terrain log 2026-10-10 11:50:07 +02:00
Richard Zink 1879a6912a contrails: distance-scaled ribbon width (sub-pixel fix), brighter head, far longer visible range 2026-10-10 11:12:38 +02:00
Richard Zink d0aa86ce9b flights: full CONFIG.flights parameterization (altitude, count, speed, holds, destination weights, contrail chance/alt/life/width) + curved random-destination routing 2026-10-10 11:02:58 +02:00
Richard Zink fbac24773a clouds3d-only cleanup: drop Vanta/three.js/clouds2d, real-sky fixes, settlement lights, dynamic location anchor 2026-10-09 14:13:03 +02:00
Richard Zink e4170bee62 X-swap via arrangement, no image X-flip
User clarified: the X-swap should be in the ARRANGEMENT (east
tiles on screen right), NOT in the image (so map content is
readable). Previous attempts had it the other way around.

Combined state:
- canvasX = -perp + ... (X-swap): east (1102) on screen right,
  west (1098) on screen left. x increases left to right.
- drawImage with positive width: no image X-flip. Map content
  reads normally, place names not mirrored.
- Labels in normal orientation.

So the X mirror is in the corridor arrangement, not in the
satellite image content. The user can read the map normally.
2026-10-08 10:29:08 +02:00
Richard Zink f0641bd4bd Activate X-flip on image: negative width in drawImage 2026-10-08 10:26:09 +02:00
Richard Zink 0a770ba1be Remove all X mirrors: natural order, no flip
Final state per user request (KEIN X-Swap, KEIN X-Flip):
- canvasX = (perp + halfPerp + 0.5) * TILE_SIZE: east (1102)
  at canvasX 128 (left), west (1098) at canvasX 1152 (right).
  Natural order with no swap.
- drawImage with positive width and height: map content reads
  normally, no X-flip on the image.
- Labels in normal orientation (no mirrorLabel).

Map is now fully natural: no X swap, no X flip, no mirror label.
Both the arrangement and image content are in standard orientation.
2026-10-08 09:58:54 +02:00
Richard Zink f79e27665c Re-add X-flip on image (NS-mirror) with natural order arrangement
The user wants:
- Natural order arrangement (canvasX = perp + ...): east (1102)
  on left, west (1098) on right
- X-mirrored image (NS-mirror): within each tile, the image east
  appears on the left of the tile (natural map orientation)

Combined state:
- canvasX = (perp + halfPerp + 0.5) * 256: natural order
- drawImage with negative width: X-flip (NS-mirror)
- All labels in normal orientation (no mirrorLabel)

This matches the user's description: 'die anordnung passt' (arrangement
correct) and 'der x-flip ist immer noch falsch' (image was still
mirrored, now correctly mirrored).
2026-10-08 09:53:56 +02:00
Richard Zink 20ac76e0b1 Revert X-swap: natural order (no image X-flip)
User wanted NO X-swap and NO image X-flip:
- canvasX = (perp + 2.5) * 256 (no negation): east (perp=-2)
  at canvasX 128 (left), west (perp=+2) at canvasX 1152 (right)
- Image drawn with positive width (no X-flip): map content
  reads normally (place names, street names not mirrored)

The X coordinates read in their natural geographic order:
- left = high x (east), right = low x (west)

If the user is observing from a south-facing view (cockpit facing
back), their right is the world's left (east), so they see
high x on their right (world's left). x still reads correctly
when facing the same direction as the flight.

The arrangement is now back to the natural order with no
swapping in either direction.
2026-10-08 09:51:32 +02:00
Richard Zink b5b169ae80 Add version marker + wider canvas for X-swap labels
Add explicit X-swap marker comment so the user can verify they're
seeing the new build. Bump canvas width by 2*256 padding so the
X labels (drawn at canvasX + 244) are within the canvas even for
the rightmost drawn tile (east, perp=-2 -> canvasX 1152, label
at 1396). With wider canvas (1792 vs 1280), labels are visible
and the corridor is centred.
2026-10-08 09:47:04 +02:00
Richard Zink bac0397140 Remove X-flip from image: map content reads normally
The user wants the original tile content (map) to be readable
normally, not X-mirrored. The X-swap arrangement (canvasX = -perp
+ ...) places east tiles on the right of the screen, so X coordinates
read naturally left to right when scanning the corridor.

Combined state:
- Map content (image): drawn with normal orientation (no X-flip)
- Arrangement: east on right, west on left (X-swap)
- Labels: drawn in normal orientation in the corners
- Y-swap: north tiles (lng=+12) at canvas top -> screen top
2026-10-08 09:35:02 +02:00
Richard Zink 00e59983bf Re-add X-flip on image: NS-mirror tile content
The user wanted the tile content to be NS-mirrored (X-flip
on the image) so the corridor orientation matches. The labels
are drawn separately in normal orientation, so they read
normally. Now the arrangement has:
- canvasX = -perp + ... (X-swap): east tiles on screen right
- Image X-flipped (NS-mirror): image east at left of tile
- Labels in corners drawn normally: x=1102, y=707 readable

Combining these, the user looking at the screen sees:
- screen left: west tiles (low x), with image west on the right
- screen right: east tiles (high x), with image east on the left
- All labels readable

So the X coordinates read correctly when the eye scans left
to right across the corridor, and the image content is
NS-mirrored to match the corridor's direction of travel.
2026-10-08 09:32:33 +02:00
Richard Zink 97e37e065a Remove X-flip on image: tiles now read normally
The user wanted the image content to be readable (not X-flipped).
The X-swap arrangement (canvasX = -perp + ...) already places east
tiles on the right side of the screen, so the X arrangement
reads naturally left to right without needing the image to be
flipped.

The image is now drawn with positive width and height, so
place names, street names, and the coordinates labels (x=NNN,
y=NNN) are all readable. The X-swap arrangement positions the
tiles so that:
- west tiles (low x) drawn at canvas left
- east tiles (high x) drawn at canvas right

So the X coordinates increase left to right when reading the
corridor from screen left to screen right.
2026-10-08 09:30:36 +02:00
Richard Zink e33598476a Labels in normal orientation (not X-mirrored)
User wanted the image to be X-mirrored (NS-mirror, so place
names on a map are correctly mirrored for the corridor
orientation), but the text labels to be readable normally.

Now labels are drawn in normal orientation:
- N at top-left
- S at bottom-left
- y at top-right
- x at bottom-right

The text is no longer reversed. With the corridor's X-swap
arrangement, this means:
- screen left = west tiles (low x)
- screen right = east tiles (high x)
- within each tile, the image is X-mirrored, but the text
  inside is readable
2026-10-08 09:28:28 +02:00
Richard Zink 2128220b39 Fix misleading comment: image is X-flipped (NS-mirror), not 180°
The drawImage call uses width=-TILE, height=+TILE, which is an
X-only horizontal mirror. The old comment said '180 degrees'
which implied both axes flipped; the code is only horizontal.
NS axis = vertical axis, mirror across it = horizontal mirror.
Current state matches the user's observation: tile content
is NS-mirrored, X arrangement goes low->high left to right.
2026-10-08 09:18:58 +02:00
Richard Zink 4500fe3214 Switch to ESRI World_Street_Map via local CORS proxy
Carto Voyager was returning 'API Key required' content for the
user (likely rate-limited or IP-blocked by Carto). Switched to
ESRI World_Street_Map which has CORS-friendly tiles with plenty
of place names and street labels.

URL format is different from Carto: {z}/{y}/{x}.jpg (y before x,
jpg not png). Updated the build to match. The local /esri/
proxy in default.conf handles the upstream CORS-incompatibility
by adding permissive CORS headers and a proper User-Agent.
2026-10-08 09:17:15 +02:00
Richard Zink e0c6b685ad Fix missing .png extension in tile URL 2026-10-08 09:11:29 +02:00