The Project Hail Mary Star Map, Built With 1.8 Billion Real Stars
Project Hail Mary is the kind of book where the author actually does the math. Andy Weir ran the orbital mechanics. He checked the astrophysics. The stellar navigation in the story isn’t decoration - the position of specific stars matters for the plot.
Val watched the movie, wanted to see that neighborhood in three dimensions with real data, and built it. valhovey.github.io/gaia-mary is an interactive 3D stellar navigation chart referencing the star systems from the novel. It hit 736 points on Hacker News by the following afternoon.
The story in one sentence
--> // making it invisible to querySelectorAll. // // `data-cfasync="false"` keeps this rescue script executable even when // Rocket Loader is active. It rescues module scripts via two strategies: // 1. Query the DOM for type$="-module" + src (covers case A) // 2. Regex-parse the raw HTML for commented-out script tags (covers case B) // Dynamically-created scripts bypass Rocket Loader entirely. (function () { if (window.__markdyRescue) return; window.__markdyRescue = true; var rescued = false; function rescueModuleScripts() { if (rescued) return; rescued = true; var srcs = []; // Strategy 1: Rocket Loader kept the tag in DOM but changed the type. // type="module" → type="{uuid}-module" (still has src attribute) document.querySelectorAll('script[type$="-module"][src]').forEach(function (s) { srcs.push(s.src); }); // Strategy 2: Rocket Loader COMMENTED OUT the script tag entirely: // // These are invisible to querySelectorAll, so we parse the raw HTML. // We handle both attribute orderings (type-first or src-first). var html = document.documentElement.innerHTML; var reSrcFirst = //g; var reTypeFirst = //g; var m; while ((m = reSrcFirst.exec(html)) !== null) { srcs.push(m[1]); } while ((m = reTypeFirst.exec(html)) !== null) { srcs.push(m[1]); } // Re-inject each found src as a real module script. // Deduplicate first, then inject. Dynamically-created scripts bypass // Rocket Loader entirely. Modules with the same URL are only executed // once by the browser (cached), so re-injecting already-running scripts // is safe. var seen = {}; srcs.forEach(function (src) { if (seen[src]) return; seen[src] = true; var fix = document.createElement('script'); fix.type = 'module'; fix.src = src; fix.setAttribute('data-cfasync', 'false'); document.head.appendChild(fix); }); } // Rescue when user clicks the placeholder (fallback if autoplay failed). document.addEventListener('click', function (e) { var t = e.target; if (t && typeof t.closest === 'function' && t.closest('.markdy-placeholder')) { rescueModuleScripts(); } }); // Rescue automatically after a short delay for autoplay. // Only fires if initAll() never ran (no data-markdy-init on any root). setTimeout(function () { if (document.querySelector('.markdy-root:not([data-markdy-init])')) { rescueModuleScripts(); } }, 1500); }());The chart is built from ESA’s GAIA DR3 catalog: 1.8 billion stars, with positions and colors measured to extraordinary precision by the Gaia space telescope. Val wrote a Python script to render those stars into custom skybox images, then built the interactive navigation interface in SvelteKit.
What GAIA DR3 actually is
ESA’s Gaia mission launched in 2013. Its job: measure the exact position, distance, and brightness of stars in our galaxy. GAIA DR3 - Data Release 3, published in 2022 - is the third release of that catalog.
1.8 billion stars. Each one with a three-dimensional position, a color, a brightness. Free to download. The dataset is genuinely extraordinary.
When you see a rendered star field in a video game and wonder whether someone made it up - this is the dataset that makes fabrication unnecessary. The actual galaxy is already mapped. Someone just had to build a renderer.
The scale problem
One comment in the thread deserves quoting directly:
Just FYI the sizes of the planets, stars, and their orbits are not to scale at all. To get an idea of how empty space is, there are 63,360 inches in a mile, and 63,239 astronomical units in a light-year. So if you scaled everything down such that Earth was 1 inch from the Sun, Neptune would be 30 inches away and Alpha Centauri would be 4 miles away.
If you were using a 4K display and had the Sun and Alpha Centauri visible at opposite sides of the display, the orbit of Neptune would be in the same pixel as the Sun.
The chart doesn’t pretend to show actual scale - that’s obvious at a glance. But the observation is a useful calibration. The distances between stars are so vast that no interactive visualization can represent them truthfully while remaining navigable. Any map like this is a UX compromise: you show topology, names, relationships - because showing the real distances would produce a blank screen with two pixels visible.
The interesting design choice is that Val didn’t try to compensate with fake distances. The positions are real, the data is real, and the collapsed visual scale is simply the cost of building something you can navigate with a mouse.
What went into it
From Val’s own comment in the thread:
This demo uses the amazing GAIA DR3 dataset from ESA. I have a Python script that renders all 1.8+ billion stars into custom images, which is what I used for the skybox. The star positions and colors all use the GAIA data (save for a few bright stars not in the set).
The skybox approach is the key decision. Rendering 1.8 billion star points live in a browser is not feasible - the data volume alone would be prohibitive. Instead, Val pre-rendered the full catalog into a set of seamlessly tiling images that wrap around the viewer as a background. The interactive elements - labeled star systems, the navigation overlay - float in front of this backdrop.
The result looks like standing inside the actual sky.
What HN is discussing
Three threads ran through the comments:
The open data angle. Several people noted that the project is only possible because ESA makes GAIA DR3 freely available. Val’s “the data is amazing” comment isn’t marketing; ESA publishes it with no usage restrictions. This is what a decade of public science investment actually produces when it gets released into the commons.
The Elite Dangerous comparison. At least three separate comments mentioned Elite Dangerous - the 2014 space game that modeled the entire Milky Way from real stellar data. The Gaia Mary chart triggered immediate nostalgia for navigating 400 billion procedurally-generated star systems. Whether that’s a compliment or a comparison to an unreachable standard is hard to say.
The Voyager pulsar map. One commenter pointed out that the gold record on Voyager 1 carries a pulsar navigation diagram designed by Carl Sagan - positioning the Sun relative to 14 known pulsars so any civilization finding the probe could identify its origin. The Gaia Mary chart has a similar intent at human scale: a map of real stars that places specific systems in three-dimensional relation to each other, useful for following a fictional route that is built on real geometry.
One under-discussed detail
There is a separate, independently-built stellar map at dwheeler.com - viewed from above Polaris rather than from within the star field itself. Two different people, the same source material, two completely different approaches to the same mapping problem.
The fact that GAIA DR3 is open is why both exist. The map is good. But what makes the map possible is a dataset that took ten years and a satellite to assemble, published for anyone to use.
Discussion on Hacker News · Source: valhovey.github.io/gaia-mary · Submitted by speleo
Hoang Yell
A software developer and technical storyteller. I read Hacker News every day and retell the best stories here — in English and Vietnamese — for curious people who don't have time to scroll.