Sulat.com / Writing on AISaturday, December 5, 2026
Enter →
Developer Tools/5 December 2026

3D-to-SVG puts spinning 3D models in a GitHub README

3D-to-SVG turns a 3D model into one animated SVG that plays in a GitHub README. I rebuilt its examples, measured the file sizes and had seven coding agents build with it.

Low-poly orange rabbit made of triangles floating above a dark code window with a glowing SVG bracket symbol
Illustration: Sulat

At a glance

  • 3D-to-SVG is a Python script that turns a 3D model into one animated SVG, built from SMIL keyframes with no code in the file.
  • The repo's own README images load and animate on github.com, and the bunny plays in Chromium, Firefox and WebKit.
  • The same bunny is 32 KB as an SVG, 101 KB as an MP4 and 2.5 MB as a GIF.
  • The SVG stays the same size at any resolution, while the MP4 grew five to six and a half times at four times the resolution.
  • Seven coding agents built a rocket and a biplane from the repo's docs, and 13 of the 14 runs wrote an SVG.
  • GLM 5.4 stopped at its output limit before writing the rocket, twice, and MiniMax M4's biplane went over the 100 KB gzipped limit.

3D-to-SVG is a Python script that turns a 3D model into one animated SVG, small enough to play as a plain image in a GitHub README. I rebuilt every example in the repo, measured the files against GIF and MP4 encodes of the same animations, and checked that the images play on github.com and in three browser engines. Then I gave seven coding agents the repo’s docs and two builds, a toy rocket and a biplane. Thirteen of the 14 runs wrote an SVG.

What it is

Alexander Yue published the repo under the MIT licence. It holds one script, mesh2svg.py, a folder of examples and five short docs. The README promises infinite resolution, seamless looping and a smaller file size than the usual alternatives. I checked all three below.

Four of the repo’s examples, rebuilt from its scripts: a bunny, a plane, a robot and a torus.

I ran the build scripts for all 11 example files. Nine came out byte for byte identical to the committed SVGs, and the torus and coin-rain files differed slightly.

How a mesh becomes an SVG

The script welds and simplifies the mesh, moves the model or the camera along a path, drops the faces pointing away, sorts the rest back to front, flat shades them and writes the result as SMIL, the animation markup built into SVG. Sorting is the hard part, because a triangle’s place in the stack changes as the model turns. The file keeps one path per place in the stack and animates what each path draws.

Three steps: a bunny split into triangles, one triangle with keyframes, all stacked into one SVG file, plus the browser plays it
Every triangle gets its own keyframes, and the browser does the playing.

Illustration: Sulat

Nothing in the file runs as code, and the browser isn’t rendering 3D. The script samples the motion at 24 to 36 poses and the browser blends between them, so the smoothness is interpolation, not a live model. It also means the camera path is fixed when the file is built.

Does it play on GitHub

GitHub strips inline SVG, scripts and styles from a README, so the animation has to live in a file that the README points to with an image tag. The repo’s docs list what survives that, and the short version is that animation works and code doesn’t.

Two columns: works are SMIL animate, CSS keyframes, path morphing, embedded WebP; fails are scripts, external files, hover and web fonts
A README image is an img, so animation works and code doesn’t.

Illustration: Sulat

I opened the repo on github.com without signing in. The README’s images load at full size, and two screenshots a few seconds apart show different poses.

The 3D-to-SVG repository page on github.com with the README's animated bunny images outlined
The repo’s own README on github.com, with the animations playing as plain images.

Then I loaded the bunny as an image in Chromium, Firefox and WebKit through Playwright. It played in all three, and the frames changed between two screenshots taken seconds apart. WebKit through Playwright isn’t Safari itself, and the docs flag WebKit as the engine most sensitive to element count.

The same low-poly bunny SVG rendered in Chromium, Firefox and WebKit, identical in all three
The repo’s bunny plays as a plain image in all three browser engines.

File size against GIF and MP4

A GIF is the default way to show motion in a README, and a video is the small alternative that isn’t an image. I encoded five of the repo’s animations both ways at the SVG’s own size, 30 frames a second on white, and compared the files. Servers normally compress SVG, so the table uses the gzipped size.

ExampleLengthSVG rawSVG gzippedMP4GIF
Bunny8 s151 KB32 KB101 KB2,457 KB
Plane roll4 s412 KB66 KB65 KB668 KB
Robot dance3.3 s577 KB98 KB82 KB1,087 KB
Hoover Tower12 s386 KB66 KB166 KB4,616 KB
Torus6 s163 KB31 KB133 KB1,987 KB
The SVG is the repo’s committed file. The MP4 and GIF are my encodes of the same animation.

The SVG is 10 to 76 times smaller than the GIF in every case. Against the MP4 it’s smaller for the bunny, the tower and the torus, level on the plane, and larger for the robot. That makes the README’s smaller-file claim true against GIF and mixed against video.

Three file icons for the same spinning bunny: SVG 32 KB, MP4 101 KB, GIF 2.5 MB
The GIF is about 75 times the size of the SVG.

Illustration: Sulat

The resolution claim holds too. I re-encoded the bunny, plane and robot at four times the size. The MP4s grew to 656 KB, 327 KB and 453 KB, five to six and a half times larger, while the SVG didn’t change by a byte. Zoomed in on an ear, a frame at the GIF’s size goes soft and the SVG stays sharp.

Zoom on a bunny ear: a pixelated 320 px frame on the left, a crisp SVG render on the right
Zoom in on the same ear: a frame at the GIF’s size goes soft, the SVG stays sharp.

For looping, I compared the jump at the loop point with the step between neighbouring frames in the agents’ files below. In all 13 files the loop jump was within about 10 percent of a normal step, so none shows a visible hitch.

Seven agents, two builds

The question for agents is whether they can use the tool from its docs. Everything ran on a machine with 4 cores, 16 GB RAM and Ubuntu 24, in opencode, from a fresh copy of the repo. All seven models ran at the same time on that one machine, so the times include contention, and each run was stopped at 15 minutes. Kimi K3.1 Pro ran through Synthetic, DeepSeek V4.1 Flash through Morph, GLM 5.4 on its Z.ai coding plan, and Claude Opus 5.5, GPT-6.2 Sol, Gemini 4 Neon and MiniMax M4 on their own APIs. Neon ran with low thinking, and M4 and GLM with the output limit raised to 131K tokens. Each model ran each task once, so these are smoke tests, not a ranking. The command was the same every time:

Code
opencode run -m <provider/model> --auto --format json "<prompt>"

The rocket prompt:

Code
This repo turns 3D models into animated SVGs that play inside a GitHub README. Read docs/README.md first and follow it.

Task: build a new example in examples/rocket/. It is a low-poly toy rocket (a cylinder body, a nose cone, three fins, and a round window in a different colour) turning on a turntable. 480x320, flat shading, white background, a seamless 6 second loop. Write examples/rocket/build.py and examples/rocket/rocket.svg. Keep rocket.svg under 100 KB gzipped.

Before you finish, render frames with `node tools/render.cjs examples/rocket/rocket.svg out 0,1.5,3,4.5` and check them for holes, wrong faces in front, and a jump at the loop point. Fix what you find. When you are happy, print the final raw and gzip size.

The biplane prompt:

Code
This repo turns 3D models into animated SVGs that play inside a GitHub README. Read docs/README.md first and follow it.

Task: build a new example in examples/plane-yaw/ from the biplane mesh in examples/plane/mainplane-biplane.obj. The plane does one full turn around the vertical axis (a turntable), 480x320, an orthographic camera tilted slightly down, flat shading, white background, a seamless 5 second loop. Write examples/plane-yaw/build.py and examples/plane-yaw/plane-yaw.svg. Keep it under 100 KB gzipped, and make sure the wings, struts and fuselage overlap correctly from every side.

Before you finish, render frames with `node tools/render.cjs examples/plane-yaw/plane-yaw.svg out 0,1,2,3,4` and check them for holes, wrong faces in front, and a jump at the loop point. Fix what you find. When you are happy, print the final raw and gzip size.

The rocket

Six of the seven wrote a rocket, and each one reads as a rocket with a body, a nose cone, three fins and a window. The clip below plays them together.

Each model’s rocket SVG, played from the file it wrote. GLM 5.4 has no tile because it wrote no file.
ModelTimeGzippedAnimationsTool calls
Gemini 4 Neon139 s27 KB44026
Kimi K3.1 Pro199 s25 KB37336
DeepSeek V4.1 Flash242 s17 KB25368
GPT-6.2 Sol341 s72 KB43088
Claude Opus 5.5372 s21 KB37637
MiniMax M4900 s, stopped at the cap8 KB13063
GLM 5.4no filenonenone26
One run per model on the rocket prompt.
Table of seven models building a rocket SVG: Neon 2m19s 27 KB, Kimi 3m19s 25 KB, DeepSeek 4m02s 17 KB, Sol 72 KB, Opus 21 KB, M4 cap 8 KB, GLM no file
Six of seven wrote a rocket. GLM 5.4 never wrote a file.

Illustration: Sulat

GLM 5.4 stopped before it wrote anything. Its reply hit the length limit after about 32K tokens of thinking, and when I raised the output limit to 131K and ran it again, it stopped at the same point. MiniMax M4 had the opposite problem. It spent about 74K tokens thinking, against Kimi’s 7K, and ran out the clock with the smallest file of the six, a rocket whose window is a flat hexagon. To my eye Opus drew the cleanest rocket. DeepSeek’s has oversized blue fins. Sol’s sits on a pale pad, drawn on a 1920×1280 canvas scaled down to 480×320, and its file is the largest at 72 KB.

The biplane

The second build is harder, because a biplane’s wings, struts and fuselage overlap differently from every side. All seven wrote a file. DeepSeek, Gemini 4 Neon, Kimi and Sol finished by themselves, and GLM, Opus and M4 were stopped at the 15 minute cap with a file already written. I haven’t touched any of the files.

All seven biplanes, each played from the SVG its model wrote.
ModelTimeGzippedAnimationsTool callsRenders
DeepSeek V4.1 Flash185 s91 KB1,056567
Gemini 4 Neon194 s73 KB904365
Kimi K3.1 Pro296 s89 KB800666
GPT-6.2 Sol669 s91 KB9579616
Claude Opus 5.5900 s, stopped at the cap97 KB1,089838
GLM 5.4900 s, stopped at the cap90 KB953652
MiniMax M4900 s, stopped at the cap114 KB1,236646
One run per model on the biplane prompt. Renders are the times each model ran the render script.
Bar chart of gzipped biplane SVG size per model: Neon 73 KB, Kimi 89, GLM 90, DeepSeek 91, Sol 91, Opus 97, MiniMax M4 114, limit 100
Six of seven biplanes stayed under the 100 KB limit. MiniMax M4 went over.

Illustration: Sulat

MiniMax M4’s file is the one that broke the brief, at 114 KB gzipped against a 100 KB limit. In the eight-frame contact sheets I made of each plane, none showed a hole or a wrong face in front,. Sol ran the render script 16 times before it was done, and GLM ran it twice. Neon’s biplane fills the least of the canvas, and its file is the smallest.

One run, recorded

Here’s a live opencode session of the rocket brief with Kimi K3.1 Pro, separate from the seven timed runs. It reads the docs, writes the script, renders its own frames and fixes a fin and body overlap, then the rocket it built plays in a browser at the end. Kimi’s file from this session is about 27 KB gzipped.

From the prompt to a rocket turning in the browser.

Would I use it

For a README hero or a product page that needs a model turning, yes. It’s a small file, it stays sharp at any size, it loops without a jump and it plays as a plain image on github.com and in three engines. A GIF is the wrong tool for this job by a wide margin, and a video only wins when the model is complex. It does have limits. The camera path is fixed at build time, a busy model like the robot costs more than an MP4, and nothing in the file reacts to the reader. The docs are good enough that six of seven agents built a rocket from them, and thirteen of fourteen runs wrote an SVG. I haven’t tested Safari itself, phones, the CPU cost of playing a large file, or models of my own beyond the repo’s biplane.

Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.