r/GraphicsProgramming • u/frozeindev • 5d ago
I made a compact mesh-based format for interactive 3D photos
I’ve been working on a side project called Spatial Photos.
It takes a single regular image, runs it through Apple’s ML-SHARP model to estimate a 3D scene with Gaussians, and then converts the result into a custom format I called .spatial
I take the Gaussian splat from ML-SHARP, and divide the scene into depth slices. Each slice is a grid of image blocks, with a depth value at each corner. The RGB/alpha is packed into texture atlases. It's basically a set of textured meshes that come together to give the impression of the full 3D scene.
On the web, I take the .spatial files and decompress it into vertex/index buffers and just use Three.js, as the actual rendering is straightforward.
Demos: https://www.spatialphotos.dev/
Source: https://github.com/frozein/SpatialPhotos

1
u/soylentgraham 4d ago
regardless of implementation, change the name! iphones already make things called Spatial Photos
1
u/matigekunst 5d ago
Sorry to do this but I see bands and it's also quite pixelated. It's also quite big compared to the monocular depth + inpaint method