Procedural 3D models with Blender Python for the web
Ten 3D shapes on delta240mvt.com are built from code, not with a mouse. What that gives me, what a shape weighs in a browser and why an image loads first.

This week the workshop shop on delta240mvt.com has faceted 3D shapes where product photos would be. A rocket on a launch pad, a robot at a control desk, a stage with spotlights. You can turn them with a finger, zoom in, click, and the rocket takes off. I didn’t click a single one of them together in Blender. All of them are built from code.
Sounds like overkill? I thought so too at first. Then I changed the brand color in one place and ten shapes rebuilt themselves in forty seconds. I haven’t gone back since.
Why 3D at all instead of a photo
I’ll start here, because it wasn’t obvious. The products in my shop are 1:1 workshops. I have nothing to photograph. I could have put up a photo of me at a laptop, but there are a million of those on the internet and they all look the same.
I wanted every product to have its own small world. AI Builder is a rocket, because you’re building something that is meant to take off. Social Media Masterclass is a stage with a microphone, because that’s where you perform. Marketing Agent is a robot that works while you sleep. One look and you know what it’s about.
The style wasn’t an accident either. Faceted, triangular shapes are a language I already had: that’s how the world of Few Summers looks, and the monk from Focus Equals Freedom. The delta in the delta240mvt logo is a triangle too. I didn’t have to invent a new look for the shop. I took the one people already know from my reels and moved it onto the site. How I set up the hook, the cover and the end card in those reels, I described separately. Same colors as the brand: turquoise, yellow and purple on an almost black background.
And there’s one more thing. A shape you can turn holds people longer than a photo. People click. They play. That’s the moment the site stops being a leaflet.
Why 3D models from code, not clicked together in Blender?
Because I make a change in one place and all the shapes rebuild themselves. A new brand color is one line and about forty seconds to rebuild ten shapes.
The classic route goes like this: you open Blender, model, set up materials, export. It works. The trouble starts with the first change. Want a different shade of turquoise? You open ten files and click ten times. Want to add a detail to all the islands under the shapes? Good luck.
For me every shape is a function in Python. The rocket is a cylinder, a cone, four fins and a little window, worked out from a few numbers. The island under it is a faceted rock with grass, crystals and little mushrooms, scattered at random but with a fixed seed, so it comes out the same every time. One command builds the whole world, renders the posters and exports the files for the browser.
How much does that give me? Most of all when things change. A new brand color is one line. A new detail on all the islands is one function. And the shape doesn’t rot in some .blend file nobody knows how to open anymore. It sits in the repo, with history, like any other code.
The second thing, one I didn’t expect: reuse. The dad character from my Few Summers films, which I render in Blender after checking control frames, is code too. The same character, with my yellow glasses and short beard, now stands on the stage in the shop and sits at the table in the workshop shape. I wrote him once. He plays in three places.
A shape built from code is a file you can rebuild without fear. A shape clicked together by hand is a file you’re afraid to touch.
What one shape looks like from the inside
To make this less abstract: take the rocket from AI Builder.
The shape has a few named parts. The body, which stays put. Moving parts, for example the rocket itself and the flame under it. Effects that show up only on the action, meaning sparks and a wave of light. Each part has its own pivot point, set in code, not by eye. The rocket spins around its own axis, not around the center of the scene.
On top of that, two animation clips. The first is a calm four-second loop: the island floats a little, the crystals pulse, the shards circle. The second is a two-and-a-half-second action: flame, launch, sparks, back to rest. It ends exactly where it started, so the loop can carry on without a jerk.
It sounds complicated, but in code it’s a dozen or so lines of keyframes: in this frame the rocket is here, in that frame it’s there. Blender works out the rest and saves it to a file the browser understands. The browser knows nothing about Blender. It gets a finished file and two named clips.
The nicest part is that the same template works for every shape. The robot has different parts and different keyframes, but the same rules. A new shape is a new function and one entry with a label, a description and a lead color. The rest happens by itself.
What does a 3D model on a website weigh, and why does the image load first?
The budget I stick to: a model file of at most about 140 KB after compression, and a startup script of at most 3 KB before any interaction. The poster loads first, because an image shows up right away, while the heavy 3D module only loads once someone scrolls close to it.
This is the part most flashy 3D sites skip. A shape in a browser isn’t just a model. It’s a 3D library, a model file, textures, animations and a phone’s graphics card that has to carry all of it.
Before I made the first shape, I wrote down a budget:
- the model file after compression: about 140 KB at most,
- the startup script before any interaction: 3 KB at most,
- no more than two live 3D scenes on a page at once,
- the poster in two sizes, so a phone doesn’t pull the big one.
How do you get there? First, flat shading. The faceted style isn’t only about looks. I don’t need smooth normals or textures, the brightness of each face sits in the vertex color. That makes the file several times smaller.
Second, the poster. Every shape has a rendered image that looks exactly like the shape in the browser: same light, same angle. The page loads that image first. The 3D library and the model get pulled in only when you scroll near the shape and the browser has a free moment. If someone never makes it down to the shop, they never download a single byte of 3D.
Third, weaker hardware. Data saver mode, little memory, two cores or no WebGL? The poster stays. Nobody sees an error, nobody waits for a stuttering animation. They see a nice image and move on.
The details that do the work
Modeling isn’t what ate the most time. Polishing how the shape behaves did.
On a computer you drag with the mouse and the shape turns, with a bit of inertia, like a real object. Let go too hard and it keeps spinning for a moment. On a phone it was harder. A finger moving sideways turns the shape, but a finger moving up or down still has to scroll the page, otherwise someone gets stuck on the shape and gets annoyed. The fix: vertically the shape tilts a little, and past the tilt limit the page scrolls on as usual. Two fingers zoom.
The monk from Focus Equals Freedom has one more trick. His head follows the cursor. On the philosophy page he tracks you across the whole screen. It’s a five-minute detail in code, and people write to me about it more often than about everything else.
Reduced motion has its own version too. If you have reduced motion switched on in your system, the shape doesn’t spin round and round, and the action is a short in-between state instead of the full animation. The site is meant to delight, not to make you dizzy.
What I’d do differently
I added detail too fast. In the second pass I put a lot of grass, pebbles and crystals on the islands. It looked like a fairy tale, but the files grew and I had to go back to decimation, meaning simplifying the mesh where the eye wouldn’t notice the difference anyway. Now I do the opposite: budget and measurement first, then detail, up to the limit.
I made the posters match the browser too late. The first renders from Blender were brighter and had more contrast than the live shape. The result? The page loaded a beautiful image and a second later swapped it for a slightly different shape. It looked like a bug. I had to match the light and exposure of the posters to what the browser draws.
And one thing I’d do the same: the limit of two live scenes. It was tempting to put five shapes on the home page. A phone wouldn’t survive that. The third shape in view sends the oldest one back to a poster, and nobody notices.
What I take from this
If you want 3D on your site, don’t start with the model. Start with two decisions. What is the weight budget, and what does someone see who never loads the 3D. Once you have an answer to that, the rest is the fun part.
And if you’re making more than one shape, think about code instead of a mouse. It doesn’t have to be a whole world straight away. One function that builds your most common shape from a few numbers is enough. The first time it takes longer than clicking it together. The third time you’ll laugh about it.
One more thing: measure on a real phone, not only on a computer. My Mac turns these shapes without effort, so for the first few days I was sure everything was light. Only an older phone showed me where the animation drops frames and where the poster swaps too late. Ten minutes with a phone in my hand gave me more than an hour of staring at developer tools. Since then every new shape goes through that test before it lands on the site.
My next step is a character on this site: me, faceted, in yellow glasses, on an island with a small rocket. From code too. Scroll down the home page, move the cursor and click. I’ll wave.
I work with people 1:1 under the delta240mvt brand. On your project, from the first step.
See the offer ↗

