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.

Four frames of the exploded view: the concrete mixer assembled at frame 1, parts moving out at frame 80, one plate exploded with bearing and screws at frame 200, the plate in front view at frame 318.
Four of the 318 frames. Scrolling down plays them in order; scrolling up plays them back.

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.

Four-step pipeline from Inventor COM export (339 bodies, 3.5 MB GLB) to Blender Cycles (318 PNG frames at 1920x1080), WebP resize (6.9 MB desktop, 3.6 MB mobile), and HTML canvas playback at 30 fps.
The four-step pipeline measured on our 339-body concrete mixer assembly.

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:

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:

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:

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.

Side-by-side comparison of frame 80 on a 390x844 vertical phone screen: naive CSS cover cuts off both sides of the concrete mixer, while the StepToCut mobile fit shows the entire exploded assembly with soft edge-color blending top and bottom.
Naive cover fit vs. width-scaled mobile framing with sampled edge-color blending (frame 80 of 318).

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.