A real room, built to the centimetre in Blender
How I turned seven phone photos and three tape measurements into a games room you can walk round, and what it took to make a picture of it look like a photo.
I built a real room in Blender to the centimetre, so it could be turned into a games room and shown from any angle. Paul sent seven phone photos and his own measurements, and everything here is built on those.
How the room is built
I build the room in Blender with a short Python script. The room is 560 cm long, 345 cm wide and 253 cm to the ceiling. Every size sits in one list at the top, marked as measured or as a guess from the photos. The walls, windows, door, fireplace and radiators come first, at the measured size, and I render the empty room from the same angles as the photos so it can be checked against them.
Then the one thing that decides the whole layout: the pool table. It is a 7ft table, 221 by 112 cm, from the maker's listing. A cue needs about 122 cm clear all round the cloth, and the room is 345 cm wide, so with the table running down the room the width leaves almost nothing to spare. I drew that clear space on the floor in orange and moved the sofa, the TV and the stools around it until the sides and ends of the table were clear. The sofa and the TV unit sit only in its far corners, where a shot needs the short cue. It took five layouts.
A room you can turn yourself
Paul wanted to move round the room with his finger. So the same model goes onto a web page you can drag, pinch and zoom. Point at anything and its size comes up, read straight from the model. Before that page goes out, a second agent measures the model with its own script and checks every label against it. Two checks catch more than one, and a sofa can sit through a shelf unit without anyone seeing it.
The light is baked in. Blender works out how every surface looks under the room's own lamps and saves that onto the model as a picture, so the room looks the same from every angle on a phone.
The hard part: a picture you would believe
AI can repaint a render so it looks like a photograph, and it moves things while it does it: a scoreboard shifts, a black rail turns to wood, the words on a board come out as nonsense. Most of that is too small to see by eye, so I measure it.
This is the method that works so far:
Blender renders the view, plus a mask of every object in the room. The AI repaints only the surfaces. A script then measures how far each object drifted and pushes it back inside its own mask. The table, the boards, the ledge and the stools now land within a centimetre of the model. The words and the neon never go through the AI at all. They are put back exactly from the render. Anything the AI invents on a bare wall is found and painted out. The whole test cost about 75 cents.
Shooting the model like a film set
The film above is shot from the same model, not stitched from stills. The walls rise, each piece of furniture drops in and lands with its size, a line of light switches the room from white clay to the lit room, and the camera moves through it like a real one. It ends on the room as a cutaway, the near wall taken away so it sits on black like an architect's model. Blender rendered the 840 frames in about forty minutes on a Mac mini, and the sound is written in code against the same frame numbers, so every landing has its own hit.
It is not finished. The latest picture still has a few things in it that aren't in the room, and the surfaces are close to a photo but not all the way.