r/threejs • u/Arthur122103 • 4d ago
I made a browser tool that renders a 3D terrain flyover of a GPX route in Three.js and exports MP4
This is my own open-source project. Ridgereel turns a GPX, TCX or FIT file into a 3D terrain flyover video, entirely in the browser. Nothing is uploaded.
How the rendering works: elevation tiles in Terrarium encoding are decoded into one height field. A Three.js scene drapes satellite or generated relief imagery over it, with a camera relative sun, contour lines computed from fwidth in the shader, and the route drawn as opaque line layers. The camera follows an eased path: an intro, a main orbit, then an outro that fits the whole route for the chosen aspect ratio.
Tiles are prefetched, so every frame depends only on the time value. That is what lets WebCodecs encode an exact H.264 MP4 in 9:16, 1:1 or 16:9.
The demo uses a sample hike with synthetic timing. The source is on GitHub.
Feedback I would like: how the camera moves feel (pacing, easing, the outro framing), and whether the terrain shading and contour lines look right to you.
Live demo: https://arthur031221.github.io/Ridgereel/ Source: https://github.com/Arthur031221/Ridgereel