Fun development fact: The moon in this game is built using real NASA topographical data! 🌕🛰️
To create the lunar surface, I sourced raw Color and DEM (Digital Elevation Model) maps from NASA's public archives(https://svs.gsfc.nasa.gov/4720). I resized and processed them into square textures so they would wrap perfectly around a massive Three.js SphereGeometry.
The coolest part? That DEM map isn't just a visual shader trick. It drives the displacement to create those massive 250-meter jagged craters, and the game's physics engine uses BVH raycasting to calculate collisions against that exact displaced geometry. When your ship clips a crater ridge, you are crashing into a real (albeit highly exaggerated) piece of lunar topography! 💥
Also some peaks do need refining on the clip layer on landing.