Craftmatic turns real places and real LEGO sets into voxels — and it grades its own homework.
Type an address and Craftmatic fans out to ten APIs — OSM Overpass footprints, county assessor records via Smarty, Parcl property data, Google Solar roof geometry, AWS Terrarium elevation, Street View, Mapillary — then either infers a building from that record or pulls the actual Google Photorealistic 3D Tiles mesh and voxelizes it. The tiles path is the hard one. Google picks tile detail by camera distance, so the capture orbits a camera through five positions to force high-LOD facades, then runs the result through 71 morphological grid operators: facade-aligned closing, setback-aware flattening, cornice detection, scanline interior fill, palette clustering, and window recovery that reads baked photogrammetry shadows in CIE-Lab and re-glazes them as glass. Every voxel carries a semantic class and a write priority, so tree canopy can never overwrite a wall.
None of that was tuned by eye. A grading harness renders each building as a satellite/isometric/footprint triptych, sends it to Gemini against a calibrated 10-point rubric, and takes a 20% trimmed mean over three runs to beat grader variance — driven by a Claude Code Stop hook that respawns itself until the scores stop moving. The published record starts at 1.4/10 average, with the grader's own complaint ("every render looks like a noisy cylindrical chunk") turned into the backlog. It now clears 9–10 on Transamerica, Citigroup, Pennzoil Place and LA City Hall.
The other half of Craftmatic is a LEGO CAD stack that shares the same voxel core. It parses .ldr, .mpd, BrickLink Studio .io, LDD .lxf and BrickLink inventories, decrypts early-access .io archives with a from-scratch AES-256 block cipher (Web Crypto's big-endian CTR is incompatible with WinZip's little-endian counter), synthesizes missing flexible hoses as tubes swept along Catmull-Rom splines, and renders 7,552-brick UCS sets at 97 fps by collapsing the whole model into one InstancedMesh per part-and-color. It will tell you whether your build actually holds together — voxelizing each part's triangle surface at 0.2 stud and unioning genuine contact — and it's candid in the code about the clip-and-pin joints that test is blind to. Then it exports the whole thing to Minecraft at proportion-exact resolution.
// Technical highlights
- Ten geospatial APIs fused per address — OSM footprints, county assessor records, Google Solar roof pitch, DEM elevation, Street View, Mapillary — into one inference pipeline (
src/gen/address-pipeline.ts, 81 KB). - 71 morphological repair operators turn Google 3D Tiles photogrammetry into clean buildings; every voxel gets a semantic class and a write priority so canopy can't overwrite walls.
- VLM grading loop with a calibrated rubric and 20% trimmed mean over 3 runs: published progression from 1.4/10 to 9–10 on hard high-rises, driven by a self-respawning Stop hook.
- 12,169 LDraw part dimensions auto-extracted from a 1.8 GB library; LEGO → Minecraft export picks a uniform 4-LDU cell that divides both stud pitch and plate height, so nothing stretches.
- From-scratch AES-256 (PBKDF2-HMAC-SHA1, little-endian CTR) to open WinZip-encrypted BrickLink Studio files — validated in tests against Node crypto as an oracle.
- UCS Millennium Falcon: 7,552 bricks, ~6.9M triangles, 97 fps, ~950 draw calls, zero missing parts — one InstancedMesh per (part, color), step slider as a binary-search prefix.
- 1,022 offline deterministic tests across 61 files; CI gates two typecheck trees plus a daily post-deploy prod smoke test.