TrailLife

How TrailLife makes a video

A program builds a 3D model of your hike from public data, then films it one frame at a time.

What goes into it

The pace formula

Tobler's function, with the slope as rise over run (a 10% climb is 0.1):

speed = 6 · e−3.5 · |slope + 0.05| km/h

It peaks at 6 km/h on a gentle 5% downhill, gives about 5 km/h on flat ground, and slows on climbs and on steep drops. TrailLife applies it to each stretch of your route's own heights to time the walk. If you enter the hours you took, TrailLife stretches those times to fit them.

The frames

The video is 20 seconds at 30 frames a second: 600 frames. A 3D renderer draws each frame from the terrain, the route and the hiker's place at that moment, and ffmpeg joins them into the file. Making the video takes about 3 minutes, most of it starting a machine, building the terrain and drawing the frames.

Where the picture on the card comes from

While your video is made, the card shows the terrain the renderer is filming, thinned out so it fits on a phone, with your route on it. The dot is where your hiker is in the frame being drawn. It is read from the video's own files, not animated for show.

Where a language model is used

Typing a place into the search box uses a language model to work out which place you mean. Picking a place from the list does not. The video itself is made only by the steps above.

Back to TrailLife