The new render re-drew the whole map scaled 0.992 and shifted (26, 54) px,
which would move every placement. align_square.py fits that transform by
phase correlation, warps the render back, re-pastes the rotated source over
all real pixels so only the corner triangles are generated, and tone-matches
the corners to the seam. sea_corner.py then keeps the bottom-left corner as
flat sea. world.json carries the retiled versions.
Co-Authored-By: Claude Fable 5 <[email protected]>
Maps with an "aligned" skirt paste their surroundings from
build/world/unified-z6.png (z5/composite fallbacks), so Lighthouse's trimmed
tiles still showed the AI-invented peninsula and the diamond seam west of the
lighthouse island after overall-square.png was fixed. tools/sea_corner.py now
accepts --image for a composite at another scale (masks scaled from the
rotated source, feather from the image's own pixels, no full-size mgrid
planes, no PNG optimize pass on 217 Mpx) and was applied to all four
composites with a sampled sea colour. Lighthouse trimmed tiles rebuilt.
Co-Authored-By: Claude Fable 5 <[email protected]>
The outpainted top-left, top-right and bottom-right corners of
overall-square.png are back to the 72fa9f5 version; only the bottom-left
corner is flat sea (#121818, with the 96 px flat-margin feather along its
edge). tools/sea_corner.py defaults to bottom_left again. Overall tiles rebuilt.
Co-Authored-By: Claude Fable 5 <[email protected]>
The overall source is a feathered "cropped map" sitting on a uniform dark
background: its whole left, bottom and right margins and most of its top edge
are flat (#121818). Everything outside it is sea, so the AI-outpainted land in
all four corners of overall-square.png was wrong, not just bottom-left.
tools/sea_corner.py now fills all four corner triangles by default with that
background colour (--color sample restores per-corner sampling) and feathers
flat-background pixels within 96 px inside the diamond toward the fill, so the
diamond outline no longer shows where the source margin was a little brighter;
textured content is untouched and the result is idempotent (real pixels are
re-read from the rotated source). Overall tiles rebuilt.
Co-Authored-By: Claude Fable 5 <[email protected]>
The AI-outpainted bottom-left corner of sources/overall/overall-square.png
invented a coastline and harbour where there is only open sea. tools/sea_corner.py
replaces a corner triangle (exactly the rotated source's alpha == 0 quadrant, so
no real satellite pixel changes) with one flat colour sampled as the median of
the real sea within 20 px of that edge (#111819 here). Applied to bottom_left
and the overall tiles rebuilt (world.json version bump).
Co-Authored-By: Claude Fable 5 <[email protected]>
The tiles were 10.7k LFS objects for 82 MB: almost all of the per-object
transfer cost of a push/pull for 1% of the bytes. build.py regenerates them
from the committed build/<id>/base.png in a couple of minutes (and skips the
PSD render via base.stamp.json), so web/tiles* go back to .gitignore.
tools/release.py makes a stable static-site release: the read-only export ZIP
(server/serve.py export_static_site), an annotated git tag, and a Gitea
release for that tag with the ZIP attached through the REST API
(GITEA_TOKEN from env or .env). README documents the flow and deployment.
Co-Authored-By: Claude Fable 5 <[email protected]>
Make a fresh clone servable after `git lfs pull` alone, and rebuildable with
`tools/build.py` without re-rendering unchanged PSDs:
- Track build/ (rendered base PNGs, previews, world composites), web/tiles/,
web/tiles-trimmed/, web/data/world.json and web/data/markers/. Large PNGs
and the tile pyramids go through Git LFS (.gitattributes); JSON stays plain.
- build.py: decide PSD re-export from build/<id>/base.stamp.json (PSD size,
mtime, SHA-256 recorded at export time) instead of file mtimes, which are
meaningless after an LFS checkout. Same size + new mtime hashes once and
refreshes the stamp; --stamp-only writes stamps for existing base.pngs.
- Ignore .DS_Store and .env files; track sources/**/*.jpg through LFS.
Viewer:
- Right-click (long-press) the map for a category menu that drops a draft
marker under the pointer and enters marker edit mode for that map.
- Marker editing moves out of the side panel into a box anchored next to the
marker: Enter or a left click anywhere else saves, Esc cancels, Delete
inside the box; drags save position plus the box contents.
- Maps panel expands on hover, header click pins/unpins (status shown in the
header), unpinned collapses 2 s after the pointer leaves; Overview is the
first list entry instead of a separate button. Only the panel scrolls; the
page never grows past the viewport. Hover tooltips render above markers.
Also includes the pending source additions (overall square base, skirt
textures, AI regeneration tooling and notes), service worker, Caddyfile and
map config updates.
Co-Authored-By: Claude Fable 5 <[email protected]>
Tile paths are stable across rebuilds but their contents are not: moving a
map's `place` makes tiles/<id>/6/17/33.webp different imagery at the same
URL. Combined with the immutable week-long cache added earlier, a browser
that had seen an older build blended the two and drew duplicated, offset
terrain -- visible as a second copy of Lighthouse.
Each map now carries a `version` in world.json, hashed from its geometry,
zoom range and source file stamp, and appended to every tile URL as ?v=.
Re-tiled maps get fresh URLs; identical rebuilds keep the same version so
nothing is re-fetched needlessly.
Also corrects the runbook's base-layer table, which still listed the
pre-correction layers for Woods, Reserve, Interchange and Streets.
Verified: 733 tiles across seven map views, all carrying ?v=, zero broken,
and the focused map topmost in every case.
Co-Authored-By: Claude Opus 5 <[email protected]>
Placements are approximate, so map rectangles overlap where the real
locations do not -- Reserve clips Customs, Lighthouse clipped Shoreline.
Sampling the rendered tiles showed the stacking was technically fine
(finer map always on top) but that did not help: an overlapping neighbour
still covered the map you had navigated to.
Stacking is now explicit. Baseline order is by maxNativeZoom then footprint
so the finer map wins, and whichever map the view is centred on is lifted
above everything else. Verified for Shoreline, Lighthouse, Customs, Reserve
and Woods: each becomes topmost when centred.
Tilt raised 31 -> 35 degrees. The original 31 came from fitting the Customs
zone outline's aspect ratio, but that polygon encloses more than the
playable strip so the estimate ran low; attempts to register the two
polygons directly failed because the dashed outline will not flood-fill.
35 aligns better by eye.
`place` lives in the rotated frame, so retilt.py converts every placement
through the old and new angles -- changing the tilt no longer scatters the
maps. Lighthouse's box also tightened; its PSD is nearly square while the
zone is a coastal strip, so it overhung into the sea.
Verified zoom 0-9: 620 tiles, zero broken.
Co-Authored-By: Claude Opus 5 <[email protected]>
The canvas is no longer an abstract grid of unrelated cells. overall.jpeg is
now the base, rotated 31 degrees so north is up, and every detail map is
scaled and positioned onto its real location. Zoom out for all of Tarkov;
zoom in and the full-resolution re3mr map takes over.
The 31 degrees was measured, not guessed: Customs' detail map is north-up
(its PSD compass confirms it) and runs 2.6:1 east-west, so solving its
259x207 zone outline for the band angle gives 31. rotate_point is verified
sub-pixel against PIL.
Adds Woods, Interchange, Reserve, Shoreline, Shoreline Resort, Lighthouse
and Streets, and moves every source under sources/<id>/.
baseGroup becomes baseLayers, a list of slash-paths. These PSDs share no
naming convention at all -- the base is variously LOCATION, Baselayer, Day,
3DRENDER, BASEMAP+2DLAYERS or Map&Art; several need more than one top-level
layer, and Woods buries its terrain three groups deep. Exports also keep
alpha now, so maps composite onto the terrain instead of sitting in opaque
rectangles.
Placement needs sub-cell precision, but tile grids stay integral only when
a map's origin is a multiple of tileSize * 2^maxZoom (131072 px). So rather
than snapping a map to the grid, the tiler pads it up-and-left to the
nearest cell boundary and visits only tiles holding content: exact
placement, integral grid, no cost. Each map is tiled to its native level
and carries a minZoom, so the overview stays cheap.
Two psd-tools failures worked around: stroke effects on empty-bbox layers
crash scikit-image (patched to skip), and psd_tools.composite exports a
function that shadows its own submodule.
Verified zoom 0-9: 10 layers, zero broken tiles.
Co-Authored-By: Claude Opus 5 <[email protected]>
Each map now renders twice. The lower layer pins minNativeZoom and
maxNativeZoom to underlayZoom (2), so Leaflet serves that single level at
every view zoom, scaled to fit. The entire world at z2 is 17 tiles /
134 KB, so it paints in ~120ms and stays resident behind a generous
keepBuffer.
Detail tiles draw over it at zIndex 2, so any gap while they load shows
blurry map instead of the page background.
Verified zoom 0-7: zero broken tiles, no console errors.
Co-Authored-By: Claude Opus 5 <[email protected]>
Extracts only the base map art from re3mr PSDs (the top-level LOCATION
group), tiles it to WebP, and renders every map on one shared world canvas.
Pipeline: psd_tree -> export_base -> tile -> build -> preview, driven
entirely by maps.json. Adding a map is a config change.
Maps are placed on an 8192px grid (tileSize * 2^maxZoom) so a cell's tile
index shift is exactly cell * 2^z at every zoom. Each map keeps its own
locally numbered pyramid and the browser translates on the fly, so adding
a map never re-tiles the others.
excludeLayers works around psd-tools rendering stroke-only vector shapes
as solid fills, which otherwise buries Customs under a white fill.
Co-Authored-By: Claude Opus 5 <[email protected]>