r/threejs • • 4d ago

I built a scroll-controlled Three.js flythrough of a real Himalayan valley

I made this for The Guester’s, a homestay near Manali, India. Scrolling takes you from the orchard up to the snow peaks, past paragliders, down into the ravine at Sajla waterfall, and back to the garden under the stars. The journey moves through a day and four seasons, and there’s a free-roam mode if you want to explore on your own.

The terrain uses Mapbox elevation and satellite imagery, with roads and rivers from OpenStreetMap. The tricky part was keeping the ground sharp as the camera went from wide mountain shots to just above the road. I blend several resolutions in the terrain shader and stream a sharper patch of imagery around the camera.

If you try it, I’d love to know how the camera feels when you scroll quickly or change direction. Browser and device would help.

Try the Valley Page · Best on desktop. (Mobile one, particularly iPhones might face issues rendering due to Safari Engine limitations, will be fixed soon)

0 Upvotes

4 comments sorted by

1

u/xzinkx 4d ago

the ground staying sharp from wide shots down to road level is the part that sells it. how do you hide the edge of the sharper patch while it's streaming in, just a blend falloff in the shader?

1

u/impkc 3d ago

I keep the old window visible while the new tiles load, then fade the new window in over about 0.5-0.7 seconds. At the feathered edges and anywhere a tile is missing, the old window shows through where it overlaps, and the coarser imagery fills the rest.

1

u/xzinkx 3d ago

oh nice, so the old window kind of becomes the fallback while the new one fades in. no wonder it never pops, thanks for explaining

1

u/impkc 3d ago

Thanks for appreciating the work that went behind fine tuning the details as well.