Sheet index — the whole set

  1. 00Home首页
  2. 01About关于
    1. 01 About me
    2. 01.1 Hobbies
  3. 02Projects项目
    1. 02 All projects
    2. 02.1 The 3D studio
    3. 02.2 ZERO CORE
    4. 02.3 i-Share
    5. 02.4 MV pipeline
    6. 02.5 Cleaning System
  4. 03MV worksMV 作品
    1. 03 Music videos
    2. 03.1 Arcade
  5. 04Workshop工坊
    1. 04.1 Studio
    2. 04.2 Tools
  6. 05Resume简历
  7. 06Contact联系
EN 中
Enter the room

02.1 — projects — studio

02.1Case file/projects/studio/

rev.
976ae73
date
2026-11-21

sheet 02 of 06

The 3D studio

A room you can walk into, scripted in Blender and rendered live

role
Solo
context
My own project, since Jul 2026
scope
The room at /room/, built by Blender Python scripts
result
First entry 28.7 → 14 MB · 10 checks before every merge

Dependencies

  • Blender (Python)
  • Cycles bake
  • three.js
  • KTX2
  • Vite + TypeScript
  • Playwright checks

Changelog

  • every wall, lamp and book is placed by a Python build script, then baked in Cycles
  • the room opens on about 14 MB and streams the rest in while you look around
  • ten automated checks, pixel screenshots included, run before a change merges
01

What it is

A closed room, 12 × 16 × 5.2 units (about 6.6 × 8.8 m), that you look around and walk through in the browser. It is my studio: the desk, the rack, a window onto a line-drawn city. Each object with a blue number on it opens one part of this site. Day is the default; "after hours" is a switch. Open the room

The studio in real time, by day: a white desk with two monitors and a lamp, the builder in the chair, a line-drawn city in the window.
FIG 01 The room by day, its default.
The same room switched to after hours: the lamp on, the city outside at night.
FIG 02 The same room, after hours.
02

The pipeline

Geometry. Nothing in the room is modelled by hand: every wall, light and book is placed by a Python build script run in Blender. The scripts are the source of truth. The room is exported as a GLB with named nodes, and behaviour stays in code, bound to those names.

Light. Light is baked in Cycles into lightmap atlases, one per group of objects and light layer. There are seven layers: base, lamp, pendant, down, sky, sun and night. The page turns them up and down, which is how day, after hours and the lamp work. Every atlas carries a fingerprint of the UV layout it was baked for. The atlases are compressed to KTX2 and streamed into three.js; the outlines are drawn live, at about 2 ms a frame.

Loading. The room opens on about 14 MB, down from 28.7 MB: quarter-size lightmaps first (7.9 MB), half-size textures, the character and the day's city. Then one image is swapped in per frame until everything is full size: the lightmaps before the door opens, the rest after. The night's layer waits until someone asks for after hours. Shaders are compiled before the door opens: 147 programs, 2.6 s measured.

The desk close up: the monitors show this site's own pages, and every object with a blue number opens a piece of content.
FIG 03 The desk close up: the monitors show this site's own pages.
A line drawing of the room seen from above and to one side: desk, bookshelf, sofa and floor lamp.
FIG 04 A line drawing of the room, made by a script from the loaded room. It is also the cover the room opens on.
03

How I test it

A room is hard to test by looking, so ten scripted checks run against the built site before a change merges. They drive Chrome on a real GPU.

  • capture_views — screenshots from the same camera poses, with the random numbers and the clock fixed. Two runs of one build match to the pixel, so any difference is a real change.
  • functional_check — clicks, hovers, keys, Back four ways and deep links; it fails on any WebGL error.
  • content_snapshot — the HTML of all 10 paths: every object says the same words.
  • style_snapshot — every element's computed style in 8 states (splash, room, card and reader, each on desktop and phone). It once caught the CSS minifier dropping a rule.
  • entry_check — the ?enter teleport: a veil while loading, enters by itself, sound waits for the first press.
  • stream_check — streamed, the room ends exactly where ?eager starts: every texture and atlas at full size.
  • load_phases — the bytes fetched when "Setting up the room" begins, the shader compile time and the programs compiled; a fresh profile each run, so no shader cache.
  • mixer_check — the sound panel: opens and closes, music, rain sound and rainfall reach their outputs, and the levels survive a reload.
  • day_check — day and after hours, clear and rain: the night's layer is not loaded at the start and loads on the first press; the light levels in each state.
  • measure_frame — the cost of a frame through the full post chain, draw calls and triangles. I run it in alternating pairs because this machine's clock wanders: the same old build measured 19 ms in one run and 34 ms in another.

→ The report of the latest run

04

Numbers

  • ~14 MB to first entry (was 28.7 MB), of which 7.9 MB is the quarter-size lightmaps
  • 2.6 s to compile 147 shader programs, before the door opens
  • ~2 ms a frame for the live ink outlines
  • 7 light layers, 10 automated checks before a change merges
  • 12 × 16 × 5.2 units, about 6.6 × 8.8 m
05

What's next

  • The sky through the window reads pale: only its horizon band shows. Its levels are set by eye, and I want it bluer.
  • The outlines cost about 2 ms a frame, and an object lying flat (a sheet on a desk) gets no border where depth and normals agree. The fix is an object-ID channel, which I have not built.