A Hospital 3D Twin Built With Codex: Where AI Fails on 'Does It Look Right'
LLM-assisted 3D work becomes reliable only when tasks with verifiable outputs are handed to the AI and everything requiring a reference photo or design judgment stays with a human. That split is the difference between a twin that feels real and one that is merely pretty from two angles.
The build uses React 19, TypeScript, Vite, and Three.js 0.186, with modeling in Blender via MCP and the heavy lifting delegated to Codex. The work is split into six stages, each with a checkable deliverable, and the scope is deliberately tight: only outpatient and emergency get full business logic; the rest are spatial guides. The result is an 800-line React app with an 180k-triangle, 112-mesh model that rotates, clicks, enters a building, and keeps its numbers adding up.
The traps all sit in the gap between 'looks plausible' and 'actually works': the entrance arc was built backward until the author supplied the exact quadratic curve; picking needs explicit visibility checks because Raycaster ignores `visible`; camera framing uses a bounding-box projection and a 1000×540 logical safe area instead of hand-tuned positions; floor expansion computes the bounding box at the exploded final state; and even the fake dashboard data must reconcile totals with sub-items or viewers sense the screen is fake.
Codex handles batch Blender operations, boilerplate, and validation scripts well, but cannot judge 'does it look like a hospital' or keep three files consistent in one pass. The author also explains why native Three.js beat react-three-fiber: the scene is almost entirely imperative and stateful, so a React wrapper adds a reconciler without removing the `ref` and `useFrame` indirection.
AI's spatial errors are not geometry bugs but missing referents: an LLM has no photo of the real entrance, so it substitutes a visually plausible arc; the fix is a human supplying the exact quadratic and enforcing it in the model.
The claim that credibility is calculated, not modeled, is the sharpest point: viewers trust a dashboard when the numbers add up, even if every number is fabricated, so data integrity becomes a hard requirement for demos.
The project shifts the developer's bottleneck from writing code to specifying acceptance criteria: every successful instruction is a transformation of 'make it good' into a verifiable statement like 'the arc mid-segment retreats 16 meters' or 'hide these five object IDs when mode is floor and zone is set'.