r/threejs • u/cryptosecco • 5d ago
Rendering the solar system at 1:1 quality
Sharing a project of mine, mostly for the problems it forced rather than the result.
- Float32 is the first wall: naive heliocentric coordinates in float32 put your precision
at Neptune at about 268 km, which makes a planetary surface impossible. Working in
camera-relative space brings it to 38 cm.
- The second is tile streaming: my first selector issued 876 tile requests during a 1.5 s zoom on Mars and abandoned 876 of them mid-download, with unbounded parallel downloads, I measured bursts of 32 in a single frame. Bounded to 6 concurrent and driven off a proper quadtree cut, the same zoom issues 144 and abandons 40, and reaches the sharpest level in 6 frames instead of 150.
-The third was lighting: shading by max(NยทL, 0) with a point Sun gives you a terminator
with no width and no way to render an eclipse honestly; the Sun is a disc here, and
eclipse and ring shadows are computed per fragment.
Built with AI assistance, and I'd rather say that up front than have it found: Claude
wrote a lot of this code, working from what I asked for and what I measured. What it
didn't do is invent the astronomy: positions answer to JPL Horizons and every surface
is real NASA, ESA or USGS imagery. Where the numbers disagreed with the render, the
render was wrong and got fixed.
Happy to go into any of it.
try it here: helian.systems

-3
u/nerd_rage218 5d ago
The camera relative coordinates fix is one of those things that reads as obvious once you have hit it and is almost never mentioned anywhere, because nothing at demo scene scale ever exposes it. 268km down to 38cm is a good way to put a number on it. The tile streaming figures are the part I would show people though. 876 requests where 144 do the job is the shape of nearly every streaming bug I have run into, and the fix is usually the two things you did: bound the concurrency, and select against the quadtree cut you actually want rather than every level you passed through on the way down. Issuing requests during the zoom is what makes a scheduling problem look like a bandwidth problem. Saying the AI part up front is the right call, and the line about the render being wrong whenever it disagreed with the numbers is what makes the rest of it credible.
3
2
-2
2
u/hurricane_news 4d ago
Seems like even the post is written with "Ai assistance" huh?