3D and visuals with code: Blender scripts, scans and WebGL
How the brain on my home page and the light-painted portrait on my CV were made, by describing them to Claude and having it drive Blender and the browser. The workflow, and where it breaks.
- Claude Code
- Blender (Python)
- three.js
- Apple Object Capture
I've spent a career in Flame and Nuke. It turns out the fastest way for me to make 3D now is to describe it, and let Claude write the Blender scripts that build it. There are thirteen of them behind this site.
- Script BlenderPython, headless, repeatable
- Watch it buildThe Blender window open, like a shot review
- Scan real thingsOne selfie video becomes a mesh
- Bring it to the browserthree.js on the page
- TasteThe part only you can do
Script Blender instead of clicking
Everything in Blender can be driven by Python, and Claude writes that Python well. Ask for a script, not a scene:
Write a Blender Python script that builds a procedural brain: two hemispheres, a central fissure, non-mirrored folds, a striated cerebellum. Export it as a .glb. Make it runnable headless.
Run it without opening Blender at all:
/Applications/Blender.app/Contents/MacOS/Blender -b --factory-startup -P make_brain.py
Because it's a script, every change is repeatable. "Deeper folds" is a one-line edit and a re-run, not an afternoon.
Watch it build, live
For look development, have Claude run the script with the Blender window open, so you watch the scene assemble and can scrub the timeline like a shot review. Iterate on what you see.
Scan real things with your phone
My portrait started as a scan of my own head from one selfie video:
- Frames: extract about 10 per second from the video (ffmpeg)
- Masks: cut out the head in every frame. This was the step that made it work: shoulders move differently from the head, and including them wrecked the solve.
- Photogrammetry: Apple's built-in Object Capture turns the masked frames into a textured mesh
- Fuse: a Blender script aligns the partial scan to a full head and blends the seam
All of it was driven from Claude Code, on a Mac, with free tools.
Bring it to the browser
The site shows the models live with three.js (WebGL). Two things matter:
- Performance: pause rendering when it's off screen, cap the pixel ratio on phones, keep the geometry lean.
- Fallbacks: a still image is always behind the 3D, so nothing is ever blank.
Load brain.glb with three.js, render it as particles on the left half and a pixel grid on the right, split by a draggable seam. Pause when off screen. Show the still image until it's ready.
Where it breaks: taste
Claude is a great operator and a mediocre inventor of a look. My portrait took about forty rounds:
- Glowing surfaces read as chrome.
- Traced lines read as a colouring book.
- Offline renders were schematic.
What finally worked:
- Measuring the reference image and scoring each render against it
- Anatomy notes, like an artist would get: the jawline, the collarbone V, the ear's inner ridge
- Building debug tools: switches to hide one layer of strands at a time, to find which one drew an unwanted line
The tools write themselves. The eye doesn't.
3D checklist
- Scripts, not scenes, so everything is repeatable
- A preview render on every run
- Scans masked to the rigid part only
- three.js with pausing, a pixel-ratio cap and a still fallback
- References measured, notes specific, debug switches built
Bren Builds
What I built with AI this week, what broke, and what I learned. One email, weekly.