Back to blog

    Rebuilding a Room I Miss: Hosen-in, From Photos to Gaussian Splats

    Gaussian Splatting3DGenerative AIPersonal

    Some places stay with you long after you've left. Hosen-in in Kyoto was one of those for me.

    I visited in 2017. You sit on the tatami, and the open side of the room frames the garden like a painting. I sat on the red runner and looked through the window frame at the 700-year-old pine for a long while.

    I have four photos from that day. For nine years that was all of it: four flat rectangles of a room I could still feel in three dimensions. Over Thanksgiving I decided to see how much of the room I could get back.

    From photos to a scene you can move through

    The technique is called Gaussian splatting. A scene is represented as millions of small, soft, colored blobs in 3D space. Each blob has a position, a size, a color and a transparency. Render them from any viewpoint and they blend into an image. Given enough photos of a place from known positions, you can fit the blobs so that every rendered view matches its photo. What you get is a scene you can walk around in, including from angles nobody photographed.

    "Enough photos" was my problem. Four is nowhere near enough.

    Borrowing other people's memories

    Other visitors had been in that room too, and some had uploaded 360-degree photospheres to Google Maps. A photosphere is a full sphere of view from one spot, so I could cut ordinary-looking views out of it in any direction I chose. Two photospheres gave me 17 more views, and I knew the direction of each one because I had chosen it.

    That made 21 real views: 4 of mine and 17 from two strangers who stood in the same room. I'm grateful to them, and they're credited on the project page.

    I used World Labs' tools to build the scene and Claude Code to drive the workflow: it wrote the scripts that cut views from the photospheres, set up each reconstruction run, and ran the checks between runs.

    The blind spots, and the round windows

    Even with 21 views there were blind spots, corners that no photo covered. So I generated five more views with an image model to fill them in.

    They looked right. That's what makes this part interesting. One of them gave the room round windows. Hosen-in doesn't have round windows. The model had produced a plausible Japanese temple room, and plausible isn't the same as that room.

    Once I'd noticed one invented detail, I couldn't trust my eyes for the rest. I needed a check that didn't depend on me spotting things.

    Asking the views to agree with each other

    A real room has one geometry. If a wall is three meters from one camera, then from any other camera position you can work out exactly where that wall should appear, and how far away.

    So I wrote a depth-consistency check. Take a point that one view sees. Use that view's depth and camera position to place the point in 3D. Then look from another view and ask: do you see a surface at that same spot? Two honest witnesses standing in different places will point to the same wall.

    The real views agreed with each other. The generated views that had invented things disagreed on 48 to 77% of their pixels. Before each reconstruction I dropped any view whose depth disagreed with its neighbors, and kept every remaining view at its exact camera pose; re-estimating poses from pixels had doubled the pine trunk. The final scene came in at 3.3%.

    What came out

    • About 2 million splats, in a 32 MB file
    • A scene you can open in a browser: hosenin-3d.vercel.app
    • A mesh version, 500,000 triangles, which I tried and set aside: it turned the garden's foliage into melted green shapes. Splats keep the softness of leaves, and a mesh wants hard surfaces.

    The flythrough was rendered frame by frame from the same scene.

    What I took from it

    Two things, one technical and one not.

    The technical one: generated images can pass the eye test and fail the physics. If you're going to mix generated data with real data, check it against the real data with something that measures, because looking isn't enough.

    The other one: I can open a browser tab now and be back in that room. It isn't the room. The light doesn't change, and nobody brings tea. But I can turn my head and the garden is where it should be, and for something built from four old photos and the kindness of strangers, that's more than I expected to get back.

    Built with World Labs. Photospheres courtesy of Google Maps contributors.