img2threejs

Reconstruct reference images as quality-gated procedural Three.js models through staged code generation.

13|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/frabcd/codex-ai-game-studio --skill img2threejs-frabcd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: img2threejs
Source: https://github.com/frabcd/codex-ai-game-studio/tree/main/plugins/ai-game-studio-img2threejs/skills/img2threejs
Command: npx skills add https://github.com/frabcd/codex-ai-game-studio --skill img2threejs-frabcd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Turning a single reference photo of an object or character into usable 3D geometry normally requires manual modeling or opaque one-shot generators; this Skill rebuilds the subject as code-only procedural Three.js through a staged, verifiable pipeline with visual self-correction. ## Core Features & Use Cases - Staged sculpt pipeline: Blockout, structure, form, material, lighting, interaction, and optimization passes are gated by deterministic scripts, comparison sheets, and AI-vision review scores before code generation proceeds. - Projection-first fidelity: Solve the reference camera, de-light the photo into albedo, and project the image's own pixels onto the mesh for patterned finishes and character likeness instead of approximate procedural materials. - Domain tracks: Hard-surface objects, stylized or likeness-maximized characters with anatomy landmarks, and CS2 knife skins with classification manifests, finish routes, and review gates. - Use Case: Given a photo of a CS2 knife skin, classify the family, author a sculpt spec with a detail inventory, generate a TypeScript Three.js factory, and iterate renders against the reference until silhouette, finish, and hardware gates pass. ## Quick Start Use the img2threejs skill to analyze this reference image and plan a quality-gated procedural Three.js reconstruction of the object it shows.

Frequently Asked Questions about img2threejs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a reference image into a Three.js model?

Run the staged pipeline: analyze the image, write a pre-spec assessment and quality contract, author a sculpt spec, then generate a TypeScript Three.js factory pass by pass. Each pass is verified with a render screenshot compared against the reference before continuing.

How does image-to-3D reconstruction handle patterned surfaces like CS2 knife skins?

It authors procedural geometry for the blade, guard, and grip, then projects the de-lit reference photo onto the mesh as the finish instead of a procedural material. Procedural finishes are only a fallback when live view-dependent response matters more than matching the reference.

Does this require installing Python packages or external 3D tools?

No. All forge scripts use only the Python 3.10+ standard library, reading and writing PNGs via struct and zlib. No pip installs, PIL, numpy, or Playwright are required, and generated models are plain Three.js code.

Can a single image produce a photorealistic 3D character?

No. A single image cannot reveal hidden sides or exact geometry, so the pipeline reports per-region confidence and requests more views when needed. Maximum likeness uses landmark fitting, de-lit photo projection, and camera matching; stylized output is the fallback.

Why does the pipeline block code generation for my spec?

Strict-quality validation blocks shallow specs: complex objects need enough macro, meso, and micro components, a detail inventory meeting targetMinDetails, and details mapped to real component or material entries. Fix the spec rather than patching generated code around it.

What happens when a render fails a quality gate?

The review records one action: continue, refine-spec, refine-code, request-input, or stop. A bounded correction loop guarantees termination on repeated defects, oscillation, or plateau, escalating to request-input instead of looping indefinitely.