Turning reference photos into code-sculpted Three.js props
A Codex plugin that rebuilds reference objects as code-only Three.js models by forcing the AI through a gated, iterative sculpting workflow rather than one-shot generation.

What it does
Takes an attached image and guides Codex through reconstructing the visible object as a browser-ready, procedural Three.js model built entirely from TypeScript and geometry code. It writes a structured ObjectSculptSpec that decomposes the object into hierarchy, materials, pivots, and animation anchors, then generates a factory skeleton. The output is not a downloaded mesh or photogrammetry scan, but a code-driven asset with meaningful parent-child relationships and transform sockets.
The interesting bit The plugin intentionally slows Codex down. It requires a global surface-topology plan before any visual modules are accepted, runs blockout-form-lookdev passes in order, and locks final generation until AI vision has compared browser renders against the original reference. Unsupported geometry is rejected rather than silently replaced with a box.
Key highlights
- Gated sculpting pipeline with complexity assessment and quality contracts before code generation
- Geometry registry covering tubes, lathes, extrusions, curve sweeps, and sculpted-surface fields; unsupported shapes fail explicitly
- Animation-ready hierarchies with pivots, sockets, destruction anchors, and collider hooks planned upfront
- Adaptive workflow that skips structure and optimization passes for simple objects
- Self-correcting review loop using AI vision comparison, silhouette IoU, and critical-feature scoring
- Procedural PBR evidence generation for albedo, roughness, height, normal, and AO maps
- Python helper scripts using only standard-library modules and shell image tooling; no Playwright or Chromium bundle required
Caveats
- Requires Codex with local plugin support and a separate Three.js browser project to run the generated factories
- Visual acceptance depends on an external AI vision reviewer and rendered screenshots, so the workflow is not fully autonomous
- Physics simulation and raymarched volumes remain out of scope
Verdict Worth exploring if you want Codex to produce reusable, animation-ready 3D props from concept art or reference photos without touching external asset stores. Skip it if you need exact scanned replicas or a fully self-contained 3D pipeline.
Frequently asked
- What is vinhhien112/Three.js-Object-Sculptor-Codex-Plugin?
- A Codex plugin that rebuilds reference objects as code-only Three.js models by forcing the AI through a gated, iterative sculpting workflow rather than one-shot generation.
- Is Three.js-Object-Sculptor-Codex-Plugin open source?
- Yes — vinhhien112/Three.js-Object-Sculptor-Codex-Plugin is open source, released under the MIT license.
- What language is Three.js-Object-Sculptor-Codex-Plugin written in?
- vinhhien112/Three.js-Object-Sculptor-Codex-Plugin is primarily written in Python.
- How popular is Three.js-Object-Sculptor-Codex-Plugin?
- vinhhien112/Three.js-Object-Sculptor-Codex-Plugin has 1.1k stars on GitHub.
- Where can I find Three.js-Object-Sculptor-Codex-Plugin?
- vinhhien112/Three.js-Object-Sculptor-Codex-Plugin is on GitHub at https://github.com/vinhhien112/Three.js-Object-Sculptor-Codex-Plugin.