Field SOP
Field SOP

Image-to-3D Workflow SOP: img2threejs and Meshy Dual-Route Pipeline

An AI image-to-3D workflow SOP with a two-route decision: img2threejs code-based (open-source free, rule-based objects) vs Meshy/Tripo mesh (SaaS, complex organic shapes). Five steps: prepare assets, choose route, generate, QA and fix, export and integrate. Includes runnable commands, 5 pitfalls, 5 FAQs.

Published August 12, 20268 min read
<!-- ai-image-to-3d-workflow-sop | sop | Image-to-3D Workflow SOP: img2threejs and Meshy Dual-Route Pipeline -->

AI image-to-3D has two routes: one generates Three.js program code, the other generates GLB/FBX mesh. The former is free, open-source, token-efficient, and editable, excelling at rule-based objects (geometry/architecture/props); the latter is paid SaaS with auto-rigging, excelling at complex organic shapes (characters/creatures). Picking the wrong route means wasted effort -- using img2threejs to rebuild a human face will fail, using Meshy to generate a simple box is overkill.

This SOP gives you a repeatable five-step flow: prepare assets -> choose route -> generate -> QA and fix -> export and integrate. img2threejs commands are verified against the official README (as of 2026-08-12), Meshy/Tripo per their official sites. It complements the batch's img2threejs Open Source Analysis (code-based principles), AI 3D Generation Tools Comparison (which SaaS to pick), and AI 3D Generation Boom Hotspot (trends): those answer "why and what," this one answers "how to do it."


1. Two Routes: Code-Based vs Mesh

The core decision is made before you touch any tool: do you want editable program code, or a ready-made mesh file? The two routes differ entirely in output, cost, and use case.

Dimensionimg2threejs (code-based)Meshy / Tripo (mesh)
OutputTypeScript Three.js factory codeGLB / FBX mesh file
PriceFree, open-source (Apache-2.0, 11315 stars)From $19.9-19.99/mo
Runtime dependencyThree.js runtimeAny 3D software/engine
Best atRule-based objects (geometry/architecture/props/weapons)Complex organic shapes (characters/creatures/monsters)
Auto-riggingNo (animation in code)Yes (Meshy/Tripo support it)
EditabilityHigh (code is directly modifiable)Low (mesh is hard to modify programmatically)
Token efficiencyHigh (scripts do heavy lifting, model only judges visuals)N/A (cloud processing)

In one sentence: rule-based objects, want editable, do not want to pay -> img2threejs code-based; complex organic shapes, want game assets, need rigging -> Meshy/Tripo mesh.


2. The Five-Step SOP

Step 1: Prepare Assets

Regardless of route, reference image quality determines the ceiling. Three things:

Clean background. Cluttered backgrounds interfere with the model's ability to identify the object's outline. Shoot on a solid-color backdrop or remove the background in post-processing, making the target object dominate the frame.

Multiple views. A single front view only reconstructs the front. When possible, shoot front, side, and back views. img2threejs supports multi-view silhouette carving (visual hull intersection), and Meshy also accepts multiple images to improve back-side accuracy.

Sharp details. Screws, seams, wear marks, gloss differences -- these identity-defining details determine reconstruction fidelity. Reference image resolution should be at least 1024px, with even lighting to avoid hard shadows.

Step 2: Choose Route

Branch by object type:

  • Rule-based objects (furniture, architecture, props, weapons, containers) -> img2threejs code-based. These objects are composed of geometric primitives, a natural fit for procedural reconstruction.
  • Complex organic shapes (characters, animals, monsters, plants) -> Meshy/Tripo mesh. Organic surface topology and skin textures exceed what code-based reconstruction can handle.
  • Hybrid objects (character holding a weapon, interior props) -> split and route separately, then combine in-engine.

Step 3: Generate

Code-based route (img2threejs):

img2threejs is a Claude Code skill, not a pip package. Install by cloning the repo into your skills directory:

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

In Claude Code, attach the reference image and invoke:

text
/img2threejs Rebuild this object as a Three.js model, keep the proportions, angles, and colours.

The skill automatically classifies the subject, enumerates a detail inventory, and generates with per-pass quality checks. To run the pipeline scripts manually (requires Python 3.10+, pure standard library with zero dependencies):

bash
# 1. Probe image metadata
python3 forge/stage1_intake/probe_image.py <image>

# 2. Generate assessment and spec
python3 forge/stage2_spec/new_pre_spec_assessment.py "Name" --image <image> --out assessment.json
python3 forge/stage2_spec/new_sculpt_spec.py "Name" --image <image> --assessment assessment.json --out spec.json

# 3. Strict quality gate (blocks generation if spec is too shallow)
python3 forge/stage2_spec/validate_sculpt_spec.py spec.json --strict-quality

# 4. Generate Three.js factory code
python3 forge/stage3_build/generate_threejs_factory.py spec.json --out src/createObjectModel.ts

The output is a TypeScript file exporting a THREE.Group factory function, composed of primitives, procedural shaders, and generated geometry, with a runtime hierarchy (pivots, sockets, colliders) -- ready to drop into a Three.js scene and animate.

For multi-session reconstruction, create a local state index first:

bash
python3 forge/state.py init --reference <image> --profile character --spec object-sculpt-spec.json
python3 forge/next.py --state .img2threejs/state.json

Mesh route (Meshy/Tripo):

Upload the reference image to Meshy or Tripo's web interface, choose parameters (style: realistic/PBR/cartoon; subdivision level; auto-rigging on/off), and click generate. Download the resulting GLB/FBX file directly. No local environment needed -- entirely browser-based.

Step 4: QA and Fix

Code-based QA: img2threejs has built-in per-pass quality checks (blockout -> structural -> form -> material -> surface -> lighting -> interaction -> optimization), with a side-by-side comparison at each pass. Under --strict-quality, underspecified specs trigger a fail-closed block that prevents generation. If results are unsatisfactory, check: are the reference image angles insufficient, is the detail inventory incomplete, was spec.json manually broken.

Mesh QA: After downloading the GLB, inspect three things in Blender (free, open-source): is the topology clean (no broken faces or overlapping vertices), are textures aligned (no UV offset), is the rigging reasonable (no joint clipping when bent). Meshy/Tripo auto-rigging is not perfect -- complex poses often need manual weight painting.

Step 5: Export and Integrate

By target platform:

  • Three.js Web: the code-based route's TypeScript imports directly into the project, zero extra files. The mesh route's GLB loads via GLTFLoader.load().
  • Unity / Unreal: the mesh route's FBX/GLB imports directly into the engine. The code-based route requires running the Three.js code first to export GLB (using GLTFExporter), then importing into the engine.
  • 3D printing: the mesh route's GLB converts to STL. The code-based route also needs to export mesh first before converting to STL -- code itself cannot be printed directly.

3. Five Pitfalls

Pitfall 1: Reference image background interference, outline detection goes wrong Cluttered backgrounds make the model treat background objects as reconstruction targets, producing strange appendages on the model. Fix: use a solid-color backdrop before shooting, or remove the background with tools (rembg, Photoshop Subject Select). For multi-view images, ensure background consistency across views.

Pitfall 2: Wrong route selection, wasted effort Using img2threejs to rebuild a human face produces Lego-like geometry; using Meshy to generate a simple box costs money and time without yielding editable code. Fix: judge the object type before choosing -- rule-based geometry goes to code-based, organic surfaces go to mesh. Split hybrid objects and route each part separately.

Pitfall 3: Unstable generation quality, same image gives different results AI generation has randomness -- the same reference image run twice may produce very different results. img2threejs's --strict-quality filters low-quality output but also hard-blocks. Meshy/Tripo consume credits per generation. Fix: run multiple times and pick the best; use multi-view input with img2threejs for stability; test parameters with free credits on Meshy/Tripo before committing.

Pitfall 4: Textures and rigging need manual fixes, auto-rigging is not omnipotent Meshy/Tripo auto-rigging works for simple poses, but complex poses (sitting, clenched fists, head turns) often show joint clipping and weight errors. Textures may also shift color in highlight areas. Fix: after downloading, manually paint weights in Blender and fix textures in Substance Painter. Do not expect auto-rigging to be perfect on the first pass.

Pitfall 5: Export format mismatch with target platform A Three.js project cannot use FBX; a Unity project cannot run TypeScript. 3D printing needs STL but mesh tools default to GLB. Fix: confirm the required format for your target platform before exporting -- Web uses GLB/code, Unity uses FBX, Unreal uses FBX/USD, 3D printing uses STL/OBJ. Use Blender or the assimp command-line tool for format conversion.


4. FAQ

Q1: How do I choose between img2threejs and Meshy/Tripo? A1: It depends on the object type. Rule-based objects (furniture, architecture, props, weapons) go with img2threejs -- free, editable, token-efficient. Complex organic shapes (characters, animals, monsters) go with Meshy/Tripo -- auto-rigging and mesh topology suit organic surfaces better. The two are complementary, not substitutes. See the batch's AI 3D Generation Tools Comparison.

Q2: Can the code generated by img2threejs be used directly? A2: Yes. The output is a TypeScript file exporting a THREE.Group factory function with pivots, sockets, and colliders runtime hierarchy -- import it into any Three.js project and use it immediately. The prerequisite is that your project uses the Three.js runtime. If the target is Unity/Unreal, export to GLB first using GLTFExporter, then import.

Q3: What are the requirements for the reference image? A3: Three things: clean background (solid color or removed in post), sharp details (resolution at least 1024px, even lighting), and multiple views are better (front/side/back three-view greatly improves back-side accuracy). Phone photos work, but avoid severe perspective distortion and over/underexposure.

Q4: How much does it cost to generate a 3D model? A4: img2threejs is free and open-source, but requires Claude Code API credits (the model only does visual judgment and code writing, so token consumption is relatively contained). Meshy starts at $19.99/month, Tripo at $19.9/month, with each generation consuming credits -- see official pricing for details. Recommended: test with free credits first, tune parameters, then batch generate.

Q5: Can I use photos taken with a phone as reference images? A5: Yes, but the result depends on photo quality. Common phone photo issues: perspective distortion (wide-angle lenses bend straight lines), motion blur, uneven lighting. Fix: use the main lens not ultra-wide, shoot in good light, keep the phone parallel to the object to reduce perspective. If possible, use a scanning app (like Polycam) for auxiliary reference. Both img2threejs and Meshy/Tripo accept single-photo input, but multiple views always outperform a single view.


References

This article is AI-assisted and human-edited. Last updated: 2026-08-12

FAQ

How do I choose between img2threejs and Meshy/Tripo?
It depends on the object type. Rule-based objects (furniture, architecture, props, weapons) go with img2threejs -- free, editable, token-efficient. Complex organic shapes (characters, animals, monsters) go with Meshy/Tripo -- auto-rigging and mesh topology suit organic surfaces better. The two are complementary, not substitutes. See the batch's [AI 3D Generation Tools Comparison](/en/ai-3d-generation-tools-comparison-review).
Can the code generated by img2threejs be used directly?
Yes. The output is a TypeScript file exporting a THREE.Group factory function with pivots, sockets, and colliders runtime hierarchy -- import it into any Three.js project and use it immediately. The prerequisite is that your project uses the Three.js runtime. If the target is Unity/Unreal, export to GLB first using GLTFExporter, then import.
What are the requirements for the reference image?
Three things: clean background (solid color or removed in post), sharp details (resolution at least 1024px, even lighting), and multiple views are better (front/side/back three-view greatly improves back-side accuracy). Phone photos work, but avoid severe perspective distortion and over/underexposure.
How much does it cost to generate a 3D model?
img2threejs is free and open-source, but requires Claude Code API credits (the model only does visual judgment and code writing, so token consumption is relatively contained). Meshy starts at $19.99/month, Tripo at $19.9/month, with each generation consuming credits -- see official pricing for details. Recommended: test with free credits first, tune parameters, then batch generate.
Can I use photos taken with a phone as reference images?
Yes, but the result depends on photo quality. Common phone photo issues: perspective distortion (wide-angle lenses bend straight lines), motion blur, uneven lighting. Fix: use the main lens not ultra-wide, shoot in good light, keep the phone parallel to the object to reduce perspective. If possible, use a scanning app (like Polycam) for auxiliary reference. Both img2threejs and Meshy/Tripo accept single-photo input, but multiple views always outperform a single view.

Related

Field SOP

LLaDA-Image Local Deploy SOP: Setup, Inference, Production

A five-step SOP for running Ant's open-source 6B image model LLaDA-Image: (1) environment setup with dependencies and mirror-accelerated downloads; (2) choosing among four weight variants (Base 50-step / Turbo 4-step, each in BF16 or FP8, with ModelScope for China); (3) generating the first image with minimal Base and Turbo commands; (4) advanced work - reference-image editing, text rendering, ComfyUI integration, and degradation strategies when VRAM runs short; (5) productionizing with batch queues, concurrency sizing, cost monitoring, result storage and graceful failure modes. Includes 6 pitfalls and a 10-item launch checklist, with every command copied verbatim from the official README; note the repo license is null, so confirm rights before commercial use.

Sep 9, 202611 min read