From a single drawing to a 3D math fighter
Instead of shipping 75 MB textured .glb downloads for every boss, we pair ComfyUI (for true 3D volume) with exploded turnaround schematics (for articulated joints) and compress every boss into a 924 B – 3.9 KB pure-math .ic / .ic.md file compiled on the fly by our 54 KB WebGL2 engine.
csg_dct (82.9–91.2% 3D IoU)
2.6–3.9 KB dct2 compressed (80–88% cut)
58.0 / 100 Ortho 3-view check (flags pose/back drift)
13–19 auto-rigged ASCII + CSG parts
Reference + Mask
Take the trailer frame (435×576) and cut the character out cleanly with BiRefNet (L1=0.0211).
ComfyUI → 3D-DCT
TRELLIS.2 builds 3D silhouette proportions, compressed into 2.6–3.9 KB dct2 or < 1 KB csg_dct.
Prompts A–E Kits
AI turnaround & exploded component sheets carve isolated limbs + bone pivots automatically.
Hybrid .ic + Rig
Fuse the smooth R16F torso with crisp CSG plinths/decals (eˣ) & Voronoi lava shaders.
Does a < 1–3 KB math file actually match concept art?
Judge it side-by-side — cards 3, 4, and Hero #2 below are compiled and rendered live right on your GPU from our actual .ic files (no pre-baked PNGs). Heavy organic curves come from a quantized R16F 3D-DCT table; razor-sharp pieces (the numbered plinth, shoulder pipes, hollow collar, and eˣ plate) stay pure CSG geometry.
435×576 target frame with numbered plinth.
L1=0.0211); strips floor text.
.ic (950 B!)
Decoded live from euler-titan-1kb.ic (csg_dct) — zero PNG.
CONCEPTLIVE .IC
.ic
Drag anywhere on image to scrub concept vs live WebGL2 shader.
C4=100%, D4=99%, D5=94%, B2=94%, D3=93%.
S5 .ic (94.4%).
CONCEPTLIVE S5
2×2 rocket pods (924 B csg_dct · drag to scrub).
Measured Signal (tools/wipe_score.py) | Before Shader Tuning | After Closed-Loop Tuning | Concept Target (00_ref_euler.jpg) |
|---|---|---|---|
| Texture & Lighting Parity | 42.5 / 100 |
71.8 / 100 (+29.3 pts) | Wrap studio key + sky fill + palm radial halo |
| Basalt Rock Albedo & Texture Std | lum=0.126 (too dark/cold) |
lum=0.212 (std=0.077) |
lum=0.206 (std=0.072, charcoal slate) |
| Magma Seam & Volumetric Palm Halo | 16.2% thin flat stripes |
40.5% warm bevel + view halo | 33.6% glowing fissures + soft palm plasma |
| Foreground Pixel L1 Error | 0.1663 |
0.1320 (-20.6% error) | Lower is closer inside Titan silhouette |
| Plinth Stone L1 & Brightness | L1=0.0821 (speckled bevel) |
L1=0.0594 (lum=0.355) |
lum=0.340 smooth warm clay drum |
dct2 Spectral Codec · 80–88% Size Cut
Boss Compression: 25.7 KB → 3.2 KB (90.0% IoU Held)
Keeping low frequencies exact in int16 (lo=5–6) while pruning 70–80% of high-frequency 3D-DCT modes and sqrt-companding into int8 shrinks every boss by 80–88% and speeds up JS IDCT decode by ~4.6×. Pairing CSG base primitives with sparse residuals cuts further toward < 1.5 KB (~94%).
| Hero Asset | Dense dct1 | dct2 (3 KB) | csg_dct (<1 KB) |
|---|---|---|---|
euler-titan | 25,713 B | 3,229 B (90.0%) | 950 B (-96.3% · 83.3%) |
brass-inf-mech | 23,697 B | 3,102 B | 924 B (-96.1% · 82.9%) |
calcy-hero | 15,530 B | 2,663 B | 1,014 B (-93.5% · 91.2%) |
mandelbrot-lord | 19,368 B | 3,949 B | -79.6% dct2 |
tools/ortho_score.py
Ortho 3-View Lock Catches Hidden 3D Bugs
A single 3/4 wipe can hit 90.6% while hiding back-side hallucinations. Scoring Front | Side | Back orthos (ortho=1) caught mirrored back-decal projection (fixed in GLSL via world n.z) and proved single-view extraction scores only 58.0 / 100 against a canonical A-pose ortho sheet (Front 53.5% · Side 57.8% · Back 54.4%). True AAA needs Ortho First → Rigged Pose → PBR Gate → < 4 KB Budget.
58.0 / 100)Exposes pose & pipe drift across viewsTry the interactive wipes yourself: drag the live split slider between concept art and real-time WebGL2 shaders, or inspect every rigged strategy side by side.
# 1. Any video (.mp4/.mov) or image -> rigged <4 KB dct2 + <1 KB csg_dct + ASCII .ic.md python3 tools/video2ic.py input.mp4 --name boss-slug --comfy --sub1kb # 2. Quantized Oriented-CSG + Residual <1 KB Compressor + 7-bit ASCII rig python3 tools/assets/dsl_invert.py arcade/public/game/assets/ic/brass-inf-mech.ic arcade/public/game/assets/ic/brass-inf-mech-1kb.ic # 3. Objective Wipe Parity + 3-View Ortho Gate + Full Tool Suite Smoke Audit python3 tools/wipe_score.py ref.png live_clean.png live_mask.png ref_mask.png --json python3 tools/ortho_score.py tools/ortho_3view_suite.json python3 tools/suite_audit.py --live http://127.0.0.1:8199
Exploded Schematics (Prompts A–E) build bendable skeletons automatically
A single beauty shot hides the back, inner armpits, and joint pivots. Instead of asking an artist to model from scratch, we generate an equal-height turnaround + separated exploded component kit. Python extracts each island, computes bone anchors, and compiles a bendable .ic rig in under a second.
titan-exploded-kit.ic with live explode & bend sliders.
titan-parametric.ic compiled cleanly by schematic_to_ic.py.
titan-partid.ic).
0.28s (2,505 verts, 5,032 tris).
19,182-voxel visual hull.
Can we hit 100/100 fidelity — and get great natural rigging & motion?
Short answer: on static silhouette and staging we already hit 90–95% parity (88–92/100 independent critic release score). For animation and boss motion, separating clean parts (Prompt D) + bone anchors (Prompt E / rules/rigs.ic) + video keypoint retargeting gives natural motion without hand-keyframing every boss from zero.
| Capability | Where We Are Now | What Gives Us Natural, 100/100 Motion & Look |
|---|---|---|
Exact Silhouette & Shader Paritysdf-studio.html?wipe=1 |
90.3% IoU Live ( 94.4% MPS, 89–91/100 Critic) |
Already meets studio release bar. Last ~8% is collar furnace HDR bloom (#ffb31a) and soft Voronoi lava groove falloff. |
Joint Discovery & Boss Partsrules/rigs.ic + Prompt D/E |
13–18 auto-carved parts 9 characters rigged via rig_pivots_tbl |
Prompt D isolates every boss part on flat gray; Prompt E + rig_pivots_tbl bind shoulder/elbow/hip/knee pivots automatically without floating limbs. |
Natural Combat Motion Sourcestools/assets/motion.py + calcy_anim_dsl.py |
Procedural + Video Extractor Optical pose tracking + Guitar-Tab @TIMELINE |
Retarget AI video / Mixamo humanoid BVH cycles onto our shared humanoid pivot hierarchy (pelvis → chest → shoulder → elbow → fist), plus spring follow-through on pods & cables. |
Compounding Roster Scalingflywheel_priors.json |
5.7× Speedup Verified ( 302 → 53 camera evals in 0.9s) |
Every solved hero teaches camera pitch & proportion priors to the next boss; ComfyUI multi-view + baked palette generalizes across the whole roster. |
Live .ic.md & .ic Compiler Workbench
Default loads the V10 Strategy 5 Euler Titan (90.3% IoU) from its readable .ic.md ASCII blueprint + .ic parts & 3D-DCT spectral field. Edit any CSG part, color, or timeline below and click Compile & Rebuild.
From raw trailer frame to fitted math geometry
We never ship raw ComfyUI meshes (a single TRELLIS.2 export is 31–365 MB with faint voxel stair-stepping). Instead, ComfyUI acts as our 3D geometric oracle: BiRefNet cuts the subject out cleanly, TRELLIS.2 recovers 360° volume, Blender inspects the clay pass, and our backsolver fits crisp 1.5 KB .ic primitives to it.
1024×1024 clean silhouette mask.





| Artifact | Disk Size | Role in Pipeline |
|---|---|---|
golem_trellis2.glb | 365 MB | Raw O-Voxel reference mesh (6.35M verts) |
golem_trellis2.sdf.json | 2.0 MB | Normalized 80³ signed-distance training grid |
assets/golem.ic | 1.5 KB | Shipped math recipe compiled in RAM |
assets/calcy.ic | 2.9 KB | Hero parametric SDF + materials |
assets/arrow-mech.ic | 526 B | Ultra-compact mech recipe |
.ic)
Crisp analytic bevels and procedural emissive veins — 240,000× smaller than the raw GLB.
4-Boss Audit Sheet & Exact M5 Max Commands
| Subject | GLB → SDF | Silhouette / 360° / Surface | Recommended .ic Strategy |
|---|---|---|---|
| Infinity Golem | 365 MB → 2.0 MB | 8.5 / 7.5 / 5.0 | Voxel/chiseled CSG + crisp procedural magma & math plaque. |
| Unit Circle Mech | 31.1 MB → 2.36 MB | 7.0 / 7.0 / 4.5 | Smooth parametric CSG arcs, protractor ticks & lens glow. |
| Polynomial Hydra | 68.1 MB → 2.47 MB | 6.0 / 6.0 / 4.0 | Mask plinth pre-3D; rebuild multi-heads with axis-aligned cubes. |
| Trailer Calcy | 47.9 MB → 1.99 MB | 8.0 / 6.5 / 4.0 | Smooth beveled box + procedural LCD face & keypad array. |
# 1. Launch ComfyUI on Apple Silicon (MPS diffusion + --cpu-vae to avoid Conv3D hang) /Users/kazad/ComfyUI-Installs/ComfyUI/ComfyUI/.venv/bin/python3 \ /Users/kazad/ComfyUI-Installs/ComfyUI/ComfyUI/main.py \ --listen 127.0.0.1 --port 8188 --cpu-vae --disable-auto-launch # 2. Run 2D -> 3D directly on cropped hero image python3 scratch/comfy_img2ic.py hero_crop.png --prefix asset_name --upsample none --sdf-res 80 # 3. Render multi-angle lit + clay check in Blender 5.2.2 LTS blender --background --python scratch/blender_turntable.py -- ./out/asset.glb ./out asset_name # 4. Fit tiny procedural .ic asset against normalized SDF node tools/assets/mesh2ic.mjs program.ic ./out/asset.sdf.json views.json view_id out.ic --evals 1500
Compact equations beat triangle soup every time
Every silhouette on the graph paper reduces to four clean mathematical building blocks—revolutions, swept Bézier curves, Fourier ridges, and damped envelopes—keeping the entire hero lineup tiny, razor-sharp, and warm.
Lathe Profile r(y)
Swept Bézier C(t)
Fourier Ridge Folds
Laplace Envelope
dsl_invert.py + our 7-DOF Flywheel invert that oracle into the smallest expressive proc-gen program (549 B – 1,014 B csg_dct). Every card below is rendered live on your GPU directly from those compact math files — zero PNGs.
509 B calcy-real.ic live950 B csg_dct + CSG plinth3.6 KB .ic.md)3.5 KB dct2)3.5 KB dct2)100 Procedural Geometry, Shader & Look-Dev Checklist (42 Shipped / 19 Partial / 34 Queued)
Compression Funnel (Euler & Brass Mech)
- PNG 374 KB static 2D concept still
- GLB 1.7 MB raw unrigged TRELLIS.2 triangle soup
- .ic (dct2) 3.1–3.2 KB (-87.4%) two-band spectral SDF
- csg_dct 924–1,014 B (-96.3%) 19 oriented primitives + int8 residual
Compact DSL Words (351–918 B Bosses)
radial(n, r, tilt, part)— rings, spines & halos in 1 linetube(pts, r1, r2)— swept flexible limbs, tails & coilsgear,rev,stack— clockwork, bells & golems
Spectral, SDF & Node Tricks (1–40)
- YES 1D Fourier lathe profiles for boots & pedestals
- YES Band-limited Worley lava fissures & cracks
- YES
LimbChain,MirrorX,SocketSnap,RivetArray - YES Tapered trapezoidal plates & recessed panel seams
- PART Superquadric gloves, radial Fourier shields & tread splines
- QUEUE 3D spherical harmonics & silhouette IoU optimizer
4-Map PBR, Lighting, Rigging & Compiler (41–100)
- YES Triplanar 3D Voronoi + curvature edge wear + crevice AO
- YES Strict
8:1:3warm key / cool sky fill / rim + contact shadow - YES Asymmetric hero stance + instanced sub-assemblies
- PART 2-bone IK limbs, GLSL math symbol SDFs, joint validators
- QUEUE Secondary spring bounce, GTAO pass & auto-IK retargeting
Every model is a readable Markdown file (*.ic.md)
Splitting topology (@SKELETON in 7-bit ASCII), profile curves (<svg>), PBR surface bands (@MATERIAL_TAB), and keyframe timing (@TIMELINE) lets humans and AI inspect or edit a 3D boss directly in Git diffs or any browser.
@TIMELINE Animation
Smooth cubic bone interpolation compiled from 04_euler_titan.ic.md (4,416 B) — replaces choppy GIF.
/windup → *SLAM* + *FLARE* → \recoil across 60 fps bones.
Inspect Full Literate 04_euler_titan.ic.md Source
# 04. Euler Exp Titan (`04_euler_titan.ic.md`)
```ic-skeleton
@SKELETON euler_exp_titan (unit: 0.1m)
[HEAD] -> lathe(#helmet_crest) + extrude(#t_visor)
|
(o)---[TORSO]---(o) -> lathe(#chest_plate) + decal(#ex_badge)
/ | \
[PAUL] (o) [PAUL] -> lathe(#pauldron)
| / \ |
[ARM] [THIGH][THIGH][ARM] -> lathe(#bicep_armor)
| | | |
[FIST] [GREAV][GREAV][FIST] -> extrude(#molten_fist)
| |
[PEDESTAL] -> lathe(#stepped_pedestal) + decal(#plaque_2)
```
```ic-shader
obsidian_lava : objectSpaceVoronoi(warp=7.5, core=#ff5c08, crust=#252221)
pedestal_stone: cozyClay(base=#6c6862, seams=true)
```