img2threejs

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Turning a single reference photo into a usable 3D model usually requires photogrammetry, downloaded assets, or hand modeling. This Skill reconstructs the object as code-only procedural Three.js geometry, with staged build passes and visual review gates that prevent one-shot low-fidelity results. ## Core Features & Use Cases - Staged sculpting pipeline: Progresses through blockout, structure, form, material, lighting, interaction, and optimization passes, each unlocked only after a reviewed render meets fidelity thresholds. - Evidence-driven specification: Builds a sculpt spec from image analysis, detail inventories, PBR evidence extraction, and local spec search before any code is generated. - Projection-first fidelity: Solves the reference camera, de-lights the photo, and projects its pixels onto the mesh for patterned surfaces and character likeness. - Use Case: Provide a photo of a CS2 knife skin and receive a TypeScript Three.js factory whose blade, guard, and grip geometry is procedural while the patterned finish is projected from the de-lit reference, verified across multiple camera angles. ## Quick Start Ask the agent to rebuild the object in your reference image as a procedural Three.js model and follow the gated sculpt pipeline starting with the next-step command.

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?

Provide one image and 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 rendered screenshot compared against the reference before continuing.

What is the difference between procedural finish and reference projection for surfaces?

Procedural finish authors materials in code and suits flat paint or live view-dependent response. Reference projection de-lights the photo and projects its pixels onto the mesh, which is the required route for patterned surfaces like Doppler or Fade skins where procedural patterns visibly mismatch the reference.

Does img2threejs require external Python packages or pip installs?

No. All forge scripts use only the Python 3.10+ standard library, reading and writing PNG files through struct and zlib. No Pillow, numpy, OpenCV, or Playwright is required, and scripts are invoked by absolute path with the active interpreter.

Can a single image produce a fully accurate 3D reconstruction?

No. A single view cannot reveal hidden sides or guarantee exact geometry, so the pipeline reports per-region confidence and can request additional views. Outputs are explicitly labeled approximate, stylized, or low-poly when fidelity is limited by the input.

Why does the pipeline block code generation for some specs?

Strict-quality validation blocks shallow specs that lack sufficient components, detail inventory entries, repetition systems, or material overrides for their complexity tier. Pass-gated generation also refuses future passes until prior passes have reviewed renders meeting fidelity thresholds.

Which CS2 items are supported for image-matched reconstruction?

Only knife families are supported, requiring an authoritative classification record before geometry adapter selection. Pistols, rifles, gloves, and unknown subtypes stop with an unsupported-family or unsupported-subtype status rather than receiving a generic fallback.