Render Approach (3D Earth in the Browser)

This document captures how model-render-web turns the GDEM data on the shared /datasets volume into a 3D view of the Earth in a web browser. It is a decision log; mark each option decided with a date and reason.

Goal

A self-contained web page that renders a 3D globe from real elevation and bathymetry, driven by the ETOPO 2022 dataset (/datasets/dataset-etopo-2022/, 15-arcsecond GeoTIFF tiles, ~6 GB). The page must run in a stock browser (WebGL), and the tiles are far too large to ship raw — the project must convert them into a browser-friendly form.

Source data

Candidate approaches

  1. Static textures + three.js globe — CHOSEN (decided 2026-08-26)
    • Downsample the 350 tiles to a small global grid (e.g. 1-degree / 0.5-degree), render it to an elevation/color texture, and map it onto a three.js sphere. Simple, deterministic, works offline; low fidelity (~100–400 km cells).
  2. Tiled WebGL globe (quadtree LOD) — deferred (decided 2026-08-26)
    • Convert tiles to a tiled pyramid (e.g. raster or quantized-mesh style), fetch only visible tiles at the right zoom. Browser-scale fidelity, much more plumbing. This is the documented upgrade path if regional zoom becomes a requirement.
  3. Offline preprocessing pipeline + static assets — settled (decided 2026-08-26)
    • The build step is GeoTIFF → grid/texture via GDAL on the build host; see the decision log.

Open questions

Decision log