Engineering Notes · Inventor · 1 Dec 2026 · 5 min read · By Stefano
Inventor to Blender: an exploded view on your website that moves as you scroll
The exploded view on our home page is not a live 3D model. It is 318 frames rendered in Blender from an Inventor assembly, played on a canvas when you scroll. The four steps, the file sizes, the mistakes we paid for, and the page code you can copy.
Short answer: export every body of the Inventor assembly to a .glb with its part name, build the exploded view in Blender from a Python script, render it to still frames, convert them to WebP and draw them on a <canvas>. On the steptocut.com home page one scroll gesture plays the 318 frames at 30 fps, 10.6 s. The code in this article is simpler: each frame follows the scroll position.

The machine is a concrete mixer taken from a public CAD library, not a customer part. The plate that comes out of it is ours: modelled parametric in Inventor, with its own drawing.
Why frames and not a live 3D model
An earlier version of our home page loaded an assembly as a live 3D model (three.js, about 200 bodies with edges and shadows). On an older Android phone the scroll was slow. With a frame sequence the phone only draws one picture per frame. Blender also gives the frames smoothed edges, real materials and soft light.
The price: the visitor cannot rotate the model. For a page that tells a story in a fixed order, that is fine.

1. Inventor: one mesh per body, names kept
A Python script opens the assembly in its own Inventor instance (through the COM API, not the user's open session), reads every body of every occurrence with its position, and writes a .glb: one node per body, named after the part file. Our file had 339 bodies and weighed 3.5 MB.
Keep the names. Blender uses them later to pick the material (paint, zinc-plated screws, rubber) and to decide which parts move together.
To split a multi-body part into part files first, see Inventor multi body part to assembly with iLogic.
2. Blender: the exploded view as a script
Blender runs in the background (blender -b --factory-startup -P script.py), with no window. The script imports the .glb, assigns materials by part name, moves the parts and renders with Cycles on the GPU at 1920 x 1080, denoising on.
What we learned on this assembly:
- Parts must not pass through each other. A random outward explosion looks fine in one frame and wrong in motion: a screw crosses a cover, a shaft goes through a plate. A script checks the animation for collisions between parts, and we fix the paths of the ones that touch. Contacts the camera cannot see, we leave.
- Group what is welded or bolted together. A frame of posts, angles and tubes that flies apart piece by piece reads as an explosion, not as an exploded view. It moves as one block.
- Clean the front. Small parts flying towards the camera cover the machine. We hide them in the first frames: from the front nobody misses them.
- Covers leave first. A cover that opens after the parts it hides makes those parts go through it.
- Fix the motion on previews. We judged every version of the motion on fast previews (960 x 540, 16 samples) and rendered the full frames (1920 x 1080) only at the end.
- Mind big screens. Our frames are 1920 x 1080, served at 1600 x 900. On a 4K monitor they look soft. A render at 2560 x 1440 or more is on our list.
3. Frames to WebP: two sizes
from pathlib import Path
from PIL import Image
SRC = Path(r"C:\render\exploded") # Blender output: f_0001.png, f_0002.png ...
OUT = Path(r"C:\site\assets\seq")
SIZES = {"d": (1600, 900), "m": (960, 540)} # desktop, phone
QUALITY = 80
for name, size in SIZES.items():
out = OUT / name
out.mkdir(parents=True, exist_ok=True)
for i, png in enumerate(sorted(SRC.glob("f_*.png")), start=1):
im = Image.open(png).convert("RGB").resize(size, Image.LANCZOS)
im.save(out / f"f_{i:03d}.webp", "WEBP", quality=QUALITY, method=6)
What to change:
SRC= the folder where Blender writes the frames.SIZES= the two frame sizes. The phone gets the smaller set.QUALITY= WebP quality. Lower is lighter.
On our 318 frames this gave 8.6 MB for the desktop set and 4.6 MB for the phone set, in about 2 minutes. The sets online today weigh 6.9 MB and 3.6 MB.
| Stage | Format | Resolution | Count / Size |
|---|---|---|---|
| Inventor export | .glb |
339 named bodies | 1 file · 3.5 MB |
| Blender render | PNG (Cycles GPU) | 1920 × 1080 | 318 frames |
| WebP desktop set | WebP (quality=80) |
1600 × 900 | 318 frames · 6.9 MB |
| WebP mobile set | WebP (quality=80) |
960 × 540 | 318 frames · 3.6 MB |
4. The page: a canvas that follows the scroll
This is the shortest version that works. Save it as index.html next to a frames folder with f_001.webp to f_318.webp:
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body{margin:0;background:#000}
#model{height:400vh} /* scroll length: 4 screens */
#seq{position:sticky;top:0;width:100%;height:100vh;display:block}
</style></head>
<body>
<section id="model"><canvas id="seq"></canvas></section>
<script>
const N = 318; // number of frames
const PATH = i => "frames/f_" + String(i + 1).padStart(3, "0") + ".webp";
const canvas = document.getElementById("seq"), ctx = canvas.getContext("2d");
const frames = [];
let cur = 0;
for (let i = 0; i < N; i++) { // load every frame once
const im = new Image();
im.onload = () => { if (i === cur) draw(); };
im.src = PATH(i);
frames[i] = im;
}
function draw() {
const im = frames[cur];
if (!im.complete || !im.naturalWidth) return;
const s = Math.max(canvas.width / im.naturalWidth, canvas.height / im.naturalHeight); // cover
const w = im.naturalWidth * s, h = im.naturalHeight * s;
ctx.drawImage(im, (canvas.width - w) / 2, (canvas.height - h) / 2, w, h);
}
function size() {
const dpr = Math.min(devicePixelRatio || 1, 2);
canvas.width = canvas.clientWidth * dpr;
canvas.height = canvas.clientHeight * dpr;
draw();
}
function onScroll() {
const sec = document.getElementById("model");
const p = Math.min(1, Math.max(0, -sec.getBoundingClientRect().top / (sec.offsetHeight - innerHeight)));
const i = Math.round(p * (N - 1));
if (i !== cur) { cur = i; draw(); }
}
addEventListener("scroll", onScroll, { passive: true });
addEventListener("resize", size);
size();
</script>
</body></html>
What to change:
N= how many frames you rendered.PATH= where the frames are and how they are named.height:400vh= how long the scroll lasts. More screens, slower animation.
We tested it in Edge at 1440 x 900 and 390 x 844: at 0%, 25%, 50% and 100% of the scroll it shows frames 1, 80, 160 and 318, with no script errors.
On a phone held upright the "cover" fit keeps only about a quarter of the width of a 16:9 frame. Our home page handles this by loading the phone set, enlarging the frame and filling the space above and below with the colour of the frame's edges. On the home page one gesture moves one scene, at a speed we set (Lenis and GSAP ScrollTrigger); scrolling back plays the frames at double speed.

What it is for
A machine builder can use the same steps for a product page: the assembly opens up as the customer scrolls, then stops on the part that matters. The 3D model already exists in Inventor; Blender only turns it into pictures.
On our home page the animation ends on the plate in front view, and the next section shows Inventor building that plate and its drawing.