DEV Community

Jeremy Xiao
Jeremy Xiao

Posted on

Turning one reference image into a Three.js component: notes on img2threejs

Disclosure: I'm the independent developer behind img2threejs.

Most image-to-3D tools hand you a raw mesh. For a website you also need scale, pivot, LODs and code. img2threejs takes one reference image and produces a textured 3D model packaged for the web.

What the package contains

  • model.glb with Meshopt compression, normalized scale, base pivot and desktop/mobile LODs
  • Model.tsx, a React Three Fiber component
  • ModelVanilla.ts, a vanilla Three.js loader
  • materials.json with camera, lights and materials
  • a README with measured triangles, draw calls and file size

There is also an Editable Procedural Draft route that generates readable TypeScript with named parts you can re-theme and animate.

Free preview; Creator from $9.99/mo. Try it at img2threejs.org.

Top comments (0)