← All articles
Aug 13, 2026

How to Turn a Product Photo Into a 3D Model With AI (No 3D Software)

img2threejs is an open-source Claude Code and Codex skill that rebuilds a single product photo as procedural Three.js code instead of a traditional 3D file, with a vision-gated review step at every build stage.

Commissioning a 3D asset for an ad render usually means briefing a modeler, waiting days, and paying for revisions. img2threejs is a free, open-source tool built to turn a product photo into a 3D model using AI, and it does it inside a coding agent rather than a traditional 3D app. It is a skill for Claude Code and Codex that looks at one reference image and rebuilds the object as working Three.js code, ready to animate.

As of today the repo has crossed 11,300 GitHub stars and 860+ forks in under a month since it went public, currently the largest single-day gainer on the AI Stack board this week. That kind of traction is worth a closer look at what the tool actually does and does not do.

What "code-only, procedural" actually means

Most image-to-3D tools output a mesh file, a .glb or .fbx, that you import into a 3D engine. img2threejs does something different. It generates a TypeScript function, something like createLampModel(), that returns a THREE.Group built from primitives, procedural shaders, and generated geometry. There is no binary mesh file anywhere in the output. The result is described in the project's own docs as "diffable TypeScript plus a JSON spec."

That distinction matters in practice. A generated mesh is a static shape you can view or drop into a scene. A generated function is code you can read, edit, and hand parameters to, which is what makes it usable for motion work: change the rotation, feed it a scale curve, swap a material, all without regenerating geometry. For teams building ad renders in a Three.js or WebGL pipeline already, this fits directly into the codebase rather than sitting as an external asset to import and re-texture.

What the quality gate is checking

The pipeline builds the object in stages: blockout, structural, form, material, surface, lighting, interaction, optimization. At each stage, it renders what it has built so far and puts that render side by side with the original reference photo on a single comparison sheet. An AI vision model then judges that sheet against the photo before the pipeline is allowed to advance.

This is described as "fail-closed": a shallow or inaccurate pass gets blocked before the system spends further effort building on top of it. The practical effect is that the tool is not just generating a shape and hoping it resembles the source, it is checking its own work against the photo repeatedly through the build, and self-correcting when a pass does not clear the threshold. The mechanical parts of that checking, scoring, and spec writing run in deterministic Python scripts rather than burning model tokens, which the project frames as the reason it can run this many review passes without becoming expensive to operate.

Where it's strong, and where it isn't

The docs are direct about this rather than overselling it. Hard-surface objects, tools, electronics, vehicles, dioramas, are the strong case, and product photography for ads sits squarely in that category. Humanoid characters are supported through a separate anatomy-aware track with proportion-lock passes, though the project flags this as newer and less mature than the object pipeline. Quadrupeds and other creatures are listed as planned, not yet supported.

The clearest limitation is one that applies to any single-image reconstruction: a photo only shows what the camera saw. img2threejs does not invent geometry for the hidden side of an object, it mirrors the visible side and reports a confidence gap for regions it could not observe. If the back of a product matters for your render, either supply a second reference image (the tool supports multi-view input for silhouette carving) or expect the back to be a mirrored guess.

What it takes to actually use it

This is not a drag-and-drop app. It installs by cloning into a Claude Code or Codex skills directory:

git clone https://github.com/img2threejs/img2threejs.git ~/.claude/skills/img2threejs

From there, it runs as a slash command inside the coding agent, something like /img2threejs rebuild this object as a Three.js model, keep the proportions, angles, and colours, with the reference image attached. Running it assumes comfort with Claude Code or Codex as a working environment, plus enough familiarity with Three.js to make use of the generated code afterward. The tool itself needs nothing beyond Python 3.10's standard library on the scripting side, no pip installs, no numpy, no image libraries, which keeps the setup friction low once you're already working in one of these agents.

Why this is worth watching

The category this fits into, code-only asset generation reviewed against a visual target, is a genuinely different approach from photogrammetry or mesh-diffusion tools, and the star trajectory suggests it struck a nerve with people who need 3D assets but do not have a pipeline to make them. For a solo operator or small team producing ad creative, the pitch is straightforward: instead of budgeting for a bespoke 3D asset, point this at a product photo, review the output against the source, and get an animatable model back in code you can already work with.

It is Apache 2.0 licensed and under active development toward a roadmap that goes from single assets now to full scenes and eventually a broader asset platform later. For now, treat it as a strong option for hard-surface product shots specifically, and verify anything with hidden geometry before shipping it in a render.

Join the newsletter

AI workflows and systems, straight to your inbox.

No spam. Unsubscribe anytime.