← All writing

Scan the house in 3D before you touch a wall

An iPhone LiDAR scan, hundreds of reference photos, and a coding agent that checks its own Three.js model against every shot—so you know where every sensor, wire, and wall belongs before opening a box.

Ryan Cwynar5 min read

Planning a smart home or a renovation from an old PDF floor plan almost always ends in the same kind of surprise.

A light switch lands behind the swing of a door. A corner presence sensor gets blocked by a column and misses half the hallway. A motorized shade track doesn't clear the window frame. Or you open a wall box expecting a neutral wire and find conduit running the wrong way.

Most people discover those mistakes after the drywall is open and the gear is already on the table.

Here's how it should be: before you open a single box, pull Ethernet, or mount a sensor, you build a 3D model of the house with real measurements that you can walk through and edit in a browser.

Why standard 3D scans fall short for builders

If you've ever clicked through a standard real estate 3D tour, you've seen the catch. Under the hood, raw LiDAR or photogrammetry spits out one giant, melted mesh. The couch is fused to the floor. The walls are slightly wavy. You can look around from fixed dots on the floor, and that's about it. You can't move a table, hide a wall, or test what a sensor sees from the top corner of a room.

A builder needs the opposite. You want clean walls, real dimensions, and every door, window, outlet, and piece of furniture as its own separate object.

Turns out you can build that with an iPhone Pro, a folder of photos, and an open-source workflow by Wes Bos called 3D Model Anything.

How the capture and modeling loop works

It isn't a magic button that turns a phone scan into a finished house in ten seconds. It's an iterative loop between physical measurements, reference photos, and a coding agent building a Three.js scene piece by piece.

1. Walk the house with iPhone LiDAR. Every Pro iPhone ships with a LiDAR scanner. Walking slowly through each room records the coarse geometry: wall lengths, ceiling heights, door frames, and window openings.

2. Shoot hundreds of reference photos. At the same time, you take hundreds of photos of every room from different angles. LiDAR is great at flat walls and bad at small details. The photos catch what the depth sensor misses: wall switches, outlets, lamps, trim, cabinetry, and furniture edges.

3. Rebuild the scene in Three.js and check it against the cameras. This is the clever part of the 3d-model-anything workflow. Instead of exporting the raw mesh, a coding agent uses the scan measurements and photos to write an editable Three.js scene object by object.

Then it checks its own work. Because the capture records where the phone was in the room for each photo, the software places a virtual camera at that exact spot and angle inside the Three.js model, renders a frame, and compares the render side-by-side against the real photograph.

If a doorframe is two inches too narrow or a sofa sits too far from the window, the overlay doesn't line up. The agent adjusts the geometry, renders again, and repeats until the virtual room matches the photos from every angle. In Wes's office demo, that loop got the model within about an inch (around 2.5 cm) of the tape measure.

What you can do once the house is editable code

Because the output is a clean Three.js scene instead of a frozen video tour, you can look at the house four ways in a browser:

  • Dollhouse view from above to see how rooms connect.
  • First-person walkthrough at eye level.
  • 2D overhead plan with true proportions.
  • Wireframe view to inspect alignment and hidden geometry.

Every object stays separate. If you want to delete a couch, move a dining table, or test a new wall before talking to a contractor, you change that object without rebuilding the room.

Where this pays off in a real house

We started offering 3D house mapping at Domótica Medellín because it solves four problems at once.

1. Planning a house that feels alive before pulling wire. My goal with home automation is a house that runs locally and responds to the people in it without anyone opening a vendor app. That means ESP32 nodes, Shelly relays behind the existing wall switches, mmWave presence sensors in every room, a motorized shutoff valve on the main water line, and a local home server (a NUC or Mac mini) running the brain of the house on the LAN.

When you have the house in 3D first, you place every sensor, relay, and Thread border router on the model before touching a screwdriver. You can check the sightline of an mmWave radar from a ceiling corner so it catches someone reading still on the sofa without being tripped by a ceiling fan. You can see how many concrete walls sit between the server closet and the far bedroom, and plan where wired Ethernet access points need to go.

2. Airbnb and vacation rentals without wide-angle tricks. Real estate listings rely on ultra-wide lenses that make a tiny bedroom look like a gymnasium. Guests show up disappointed, or they message the host five times asking how the layout works. A browser walkthrough lets a guest or buyer walk the space with honest proportions.

Behind the scenes, that same model is how I'd plan a rental setup: keypad locks whose codes turn on at check-in and shut off at checkout, contact sensors that pause the mini-split when the balcony door stays open, and leak sensors under every sink—with zero indoor cameras or microphones so guest privacy stays intact.

3. Renovations where the contractor has real numbers. If you've ever remodeled an older house or apartment, you know the paper blueprint from twenty years ago doesn't match the walls standing today. Giving an architect or contractor a model checked against hundreds of on-site photos means cabinets, curtains, and conduit runs are sized to the real room.

4. A permanent before-and-after record. If you scan before a renovation starts, you keep an exact record of where every outlet, pipe wall, and doorway sat before the drywall went up. When the work finishes, you scan again and compare the two versions side by side.

Starting with my own house

The first full-house demo we're building out is my own place in Borinquen in Medellín. Once the full reconstruction is finished, we'll publish the interactive model on the Domótica Medellín blog so you can walk through it in a browser.

Measure the house once in 3D, check every angle against the photos, and make the mistakes in software before you open the drywall.

  • #home-automation
  • #3d-mapping
  • #lidar
  • #threejs
Ryan CwynarFull-stack developer and AI automation consultant, writing from Medellín. If this was useful, I also build this kind of thing for clients.Work with me →