I Turned My Office into an Interactive 3D Model with AI

I Turned My Office into an Interactive 3D Model with AI

I scanned my office with my iPhone, then used Codex to rebuild it in Three.js. My desk, the shelves, the 3D printers, the wall of filament rolls. All editable geometry, running in a browser.

Then, naturally, I added physics so I could throw everything around. And a Nintendo Zapper.

Explore my office ยท Get the code on GitHub

My office rebuilt as an editable Three.js scene

The scan is the starting point

The iPhone doesn't spit out this finished model. It gives us a few different kinds of evidence:

The important bit: the photos aren't just a folder of unrelated images. Each one has a recorded camera position, orientation and camera calibration. We can use that to render the 3D scene from the same viewpoint and compare the two side by side.

Build, screenshot, compare, repeat

The agent uses the measurements to build the room, then works through the furniture and smaller objects. It opens the viewer, takes screenshots, compares them with the reference photos, and changes the code.

Is the desk too wide? Is that shelf in the wrong place? Does the chair actually look like my chair? Those comparisons give it something concrete to work on.

This took a lot of iteration. Getting the layout right is one pass. Getting the materials, lighting, shadows and tiny details right is a whole other job. It's not a one-click conversion, and the measurements are still worth checking against the real thing.

Because the result is Three.js code, we can do more than look at it. Switch to wireframe, walk around, lay the objects out in a knolling view, or turn the room into a ridiculous physics playground.

Try it with your own room

I've published the project as 3D Model Anything. It includes:

Scanning requires a LiDAR-equipped iPhone or iPad. The app source is available to build with Xcode; an App Store release is a separate step.

Export a room from the app, open the repo in your coding agent, and ask it to use the scan-to-threejs skill with that capture. The README covers setup and the helper dependencies.

Grab 3D Model Anything on GitHub โ†’

Find an issue with this post? Think you could clarify, update or add something?

All my posts are available to edit on Github. Any fix, little or small, is appreciated!

Edit on Github