Skip to content

high-res Tier-2 surface patches (HiRISE/LROC at ~2 m/px, matches NASA reference imagery) #291

@chipi

Description

@chipi

Problem

Tier-2 surface patches on /mars and /moon are visibly low-detail compared to the public NASA reference imagery (HiRISE / LROC NAC sample-site maps, JPL traverse animations). User-reported on 2026-06-01 while comparing Orrery's Perseverance Tier-2 view against the JPL Perseverance Mars Rover Drive Path Animation and Mars Rock Samples: The Stories They Could Tell videos — our surface texture is grainy, NASA's is crisp at the same field of view.

The cause is mechanical, not artistic: we serve 2048² JPEG crops of the source HiRISE / LROC NAC products, regardless of how big the bounding box on the body actually is. At Perseverance's region (~14.79 × 17.74 km) that works out to ~7 m/px effective. HiRISE native is ~0.25 m/px, so we are throwing away about a 28× detail multiplier on the ground.

Current state

Planet Source Native res Served crop Served res on typical region
Mars MRO HiRISE ~0.25 m/px 2048² JPEG ~7 m/px
Mars (regional) MRO CTX ~5 m/px 2048² JPEG ~10 m/px
Moon LROC NAC ~0.5 m/px 2048² JPEG ~5 m/px

Examples on disk:

  • static/images/hotspots/mars/perseverance/tier2-hirise.jpg — 2048×2048, 1.3 MB
  • static/images/hotspots/mars/perseverance/tier2-ctx.jpg — 2048×2048, 959 KB
  • static/images/hotspots/moon/apollo11/tier2-lroc.jpg — 2048×2048

Until 2026-06-01 the TierContext attribution card mislabeled all planets as "LROC NAC ROI mosaic" — that's been fixed in the same change as this issue (Mars now reads "HiRISE detail patch · ~7 m/px (from HiRISE 0.25 m/px native)"), so the labeling is honest, but the texture is still 28× under-resolved versus source.

Target state

Match the apparent fidelity of NASA's reference imagery when zoomed all the way in (Tier-2 patch fully visible at camR ≈ 30.32, plus the flat-patch overlay at kmPerPx < ~0.01).

Suggested resolution targets:

  • Detail tier (HiRISE / LROC NAC): ~1–2 m/px on the served patch (≈ 4× current). That's a 4K–8K crop per site.
  • Regional tier (CTX / LROC WAC): ~5 m/px at the served crop (matches CTX native, ≈ 2× current). 4K crop.

That gets us within visual parity of the NASA videos at the user's current max-zoom — not full 0.25 m/px native, but the missing factor goes from 28× → 4×, which is no longer a fidelity tell.

Proposed approach

Multi-slice, modelled after the ADR-073 Layer A / Layer B pattern that we already use on the orbital body textures (2K → 4K LOD swap on /explore + /earth + /moon orbital). The Tier-2 patch is the surface-tier equivalent.

Slice 1 — fetch-pipeline upgrade

  • Extend the existing HiRISE / LROC fetch scripts (scripts/fetch-assets/) to emit a higher-resolution variant per site (4K or 8K) into a parallel directory: tier2-hirise.4k.jpg, tier2-hirise.8k.jpg.
  • Source product IDs stay the same — we're just changing the crop dimensions + JPEG quality.
  • Per-site optimal pixel size depends on bbox: a small landing ellipse (Beagle 2, ~0.1 km²) wants different treatment from a traverse bbox (Curiosity, ~15 × 5 km).

Slice 2 — runtime LOD swap (surface Layer C)

  • In SurfaceScene.svelte's Tier-2 patch material, mirror ADR-073 Layer B's camR-gated texture swap: start with the 2K patch, swap to 4K/8K when the user is committed to the patch (camR < SPHERE_TO_FLAT_CAM_R + ε).
  • Hysteresis prevents thrashing on the boundary.
  • Skip the swap on slow connections / prefers-reduced-data (existing infrastructure on /explore).

Slice 3 — flat-patch view consumes the same high-res asset

  • SurfaceFlatPatch.svelte currently draws from the same tier2-hirise.jpg. When the high-res variant exists, flat-patch picks it up — this is where the biggest perceptual win lands (flat-patch is where the user "stands" in the patch and wants to see craters / rover tracks / drill marks).

Slice 4 — file size + bandwidth audit

  • 12 Mars sites × 8K patches at ~5 MB each = ~60 MB of new static assets. Compared to current ~3 MB across the same sites, that's a 20× growth. Whether we ship it as part of the static bundle or behind a fetch-on-demand layer is the decision point.
  • Decision input: current SW precache budget (see W6: responsive image variants + mobile-tier SW precache #276), Cloudflare static cache strategy, mobile-tier behavior.

Out of scope

  • New sites (this is per existing site only).
  • True progressive tiling (Web Mercator pyramid). Possible follow-up if 8K is still not enough, but 8K per Tier-2 patch is probably the simplest sufficient solution and matches what /explore does for orbital body textures.
  • 2D fallback view textures (those are different assets at lower res by design).

Acceptance criteria

  • At camR < 30.5 on /mars or /moon with a region-bounds site selected and high-res variant loaded, the served pixel density should be ≤ ~2 m/px on a typical landing region.
  • TierContext card resolutionText updates to match the actual served res ("~2 m/px" instead of "~7 m/px").
  • No regression on cold-cache load time at low zoom (the 2K patch must still load first, with the 4K/8K swap happening only when committed to the close-zoom path).
  • No regression on existing e2e snapshots — high-res variant must be additive, never replace the 2K base.

Related

Signals

Reported 2026-06-01 via direct user comparison with two JPL reference assets:

  • Perseverance Mars Rover Drive Path Animation (JPLraw on YouTube)
  • Mars Rock Samples: The Stories They Could Tell (NASA JPL on YouTube)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions