Skip to content
The Garage

2 min read

A workshop built by script

The room behind the Garage is a 3D scene that a script builds in Blender, then a browser draws live. How it is put together.

The room behind every page of the Garage is not a photograph. A Python script builds it in Blender from scanned models that are free to use: the desk, the shelves, the tools, the old TV. Nothing is placed by hand, so moving the desk is a change to a number and another render.

Pictures first

Each place in the room is a camera: the door, the desk, the TV, the phone, the board, the shelves. The script renders every one with the lights on and off, and those pictures are what the site shows first. They work on any device.

Then the live room

Where the browser can manage it, the same scene is drawn live with three.js over the pictures. The light is not worked out in the browser. It is baked into the surfaces in Blender, once for each setting of the switch, and the browser blends between them. That is why the room can look rendered and still turn its lights off in an instant.

What is on the computer and the TV is laid on by the site, so a new project or a new game needs no new picture of the room.