# Sculpting superheroes in code with Blender

> Eight 3D pieces for our Then & now remakes, every one built by a Python script rather than by hand. What worked, what didn't, and how we keep them fast in the browser.

- Published: 2026-09-29
- By: Vuild
- Tags: 3D, Blender, three.js, Labs

Every 3D piece in our [Then & now](/remakes) remakes started life as a Python file. Superman, Batman, Wolverine, Spider-Man, Iron Man, Hulk, R2-D2 and the Game & Watch are each built by a script that drives Blender, exports a model, and hands it to a page that lights it live with three.js. Nothing was sculpted with a mouse.

That sounds like a party trick. It turned out to be the most practical decision of the project.

## Why build 3D with code

A model made by hand is a finished object. A model made by a script is a recipe, and recipes can be changed. When the feedback on Hulk was "his fists look like gloves", we didn't reopen a file and push vertices around; we changed how the fist was built and ran it again. When the forearms were too short, or a cape needed to fall over the shoulders instead of behind them, the fix was a few lines, and the whole model rebuilt in minutes.

It also means every piece is reproducible. The scripts live in the repository next to the site, and a shared toolkit handles the parts every bust needs: the torso, the plinth, the colour painting and the export.

## Faces are hard, so we didn't start from nothing

Our first heads were built from primitives and deformed by maths. They read as heads, but not as people. Faces are where the eye is least forgiving, and no amount of clever noise fixes a nose that's slightly too long.

So we changed approach. Blender Studio publishes a set of human base meshes under CC0, free for anyone to use. We now start each face from that realistic head and reshape it by script: a heavier brow and wider jaw for Hulk, a square jaw and cleft chin for Superman, a snarl for Wolverine. Hands come from the same set, posed by script into a grip, an open palm or a fist.

::: note What CC0 means here
The base meshes are public domain. We credit Blender Studio on the pages that use them anyway, because it's the right thing to do.
:::

## Small details that took the longest

A few lessons we'd pass on to anyone doing the same:

1. **Watertight or nothing.** Remeshing parts together and then shrinking the result to save file size can fold the surface over itself, and folds render as dark holes. Our build now refuses to finish if a model isn't a closed, valid surface.
2. **One material per mesh.** Blender's glTF exporter keeps vertex colours on only the first material of a mesh, so every painted part is its own mesh.
3. **Mouths shut until needed.** Hulk and Wolverine keep their lips closed at rest; the roar and the snarl are shape changes that only play while you hold down, with the teeth hidden until the mouth opens.
4. **Version every model.** Browsers cache models hard, so each file is loaded with a version tag that changes when the model does.

## Light is half the model

On the page, each piece is lit in real time with three.js. Iron Man and Superman add bloom, a glow effect for the eyes, the arc reactor, the repulsor and the heat vision. It took some tuning. Our first Iron Man glowed so brightly the helmet disappeared, so the bloom now starts small and only opens up as you charge a blast.

Each piece gets its own scene too: a rainy Gotham rooftop, dusk over New York, the twin suns of Tatooine, a walnut desk for the handhelds.

## Keeping it fast

3D is easy to make slow. A few rules keep ours usable on a phone:

- Models load after the page is idle, never before the text.
- Scenes are built one at a time, in small chunks, so the page never freezes while it prepares the graphics.
- Graphics setup runs in the background before the first frame is drawn.
- Machines without a usable graphics chip get a still image instead of a stalled page.

The museum shelf at the top of [Then & now](/remakes) shows all eight pieces at once, so it uses lightweight versions of each model: decimated, compressed and loaded only when needed.

## Where it goes next

The techniques behind these busts carry straight into client work: product configurators, interactive explainers, hero moments that load fast and respond to touch. Building them in code means they can change as quickly as the product they sit beside.

In the meantime, go and [make Hulk angry](/hulk-3d).

HTML version: https://vuild.com/blog/coded-heroes

---
Vuild is an independent design, product, engineering and Super Intelligence studio, independent since 2012. It has shipped 100+ products with 1M+ installs and 1B+ views, for clients from Y Combinator startups to the United Nations. Contact: hello@vuild.com · https://vuild.com/contact
