Earth from ISS in VR

A WebXR experience simulating the view of Earth from the International Space Station.

Enter VR

Description

This application places you aboard the International Space Station, looking at Earth as it passes below. The ISS position is tracked in real-time using TLE (Two-Line Element) data and the SGP4 orbital propagation algorithm, providing smooth and physically accurate orbital movement at 90fps.

Earth is rendered with high-resolution tiled NASA Blue Marble (day) and Black Marble (night) textures, dynamically loaded based on the ISS position. Day/night blending at the terminator reveals city lights on the dark side. A realistic atmospheric glow with exponential density falloff and orange terminator coloring is visible at Earth's limb. A starfield (from the HYG star catalog) and sun provide the backdrop.

Two camera views are available (press V to cycle, or A button on Quest controller): forward (HDEV-style pitched view) and nadir (straight down). A heads-up display shows current latitude, longitude, altitude, and orbital speed.

Sources

Technical Information

ISS orbital position is computed using the SGP4 algorithm from TLE data fetched from CelesTrak. The TLE is fetched once on page load and refreshed when the page becomes visible again (e.g. when removing and re-wearing the VR headset). SGP4 propagation runs every frame, producing smooth orbital movement without polling any position API.

Earth textures are split into a 16x16 tile grid (256 tiles of 5400x2700 each, from 86400x43200 sources at 500m resolution). Tiles are loaded on demand based on the ISS position and camera view direction, with an LRU cache and boundary preloading for seamless transitions. Day tiles use the month-appropriate Blue Marble Topography and Bathymetry imagery. Custom GLSL shaders handle day/night blending at the terminator and additive city light rendering on the dark side.

The atmosphere uses a ray-sphere intersection test to distinguish the limb band (over space) from the overlay (over Earth surface). An exponential density falloff provides realistic thinning with altitude, and a Gaussian terminator function adds warm orange coloring at sunrise/sunset.

The coordinate system uses ECI (Earth-Centered Inertial) for ISS positioning. Earth textures are rotated by GMST (Greenwich Mean Sidereal Time) each frame to correctly align surface features. The sun direction is computed from the current date using astronomical formulas for solar declination and hour angle. The starfield contains 5,070 stars from the HYG catalog with accurate positions and magnitude-based brightness.

Scale: 1 Three.js unit = 1 km. Earth radius = 6,371 units. ISS orbital altitude ~408 km.

Contact

Please send an email to: info at metebalci.com

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.