vinhhien112/img2obj
Codex plugin that turns attached object images into code-only, animation-ready procedural Three.js models.
What it solves
img2obj solves the challenge of manually recreating 3D objects from 2D images by automating the process of generating procedural Three.js code. Instead of converting pixels directly into a mesh, it uses a structured workflow to analyze a reference image and write the code necessary to build a 3D model that mimics the original's silhouette, structure, and materials.
How it works
The tool operates as a Codex plugin that guides an AI through a multi-phase reconstruction process:
- Validation: It checks the reference image for quality and visibility to ensure it is suitable for reconstruction.
- Planning: It creates an
ObjectSculptSpecthat defines the object's hierarchy, geometry, materials, and animation anchors (pivots and sockets). - Phased Building: The model is built in stages—starting with a basic blockout, moving to refined form, then look-development (materials), and finally adding interaction.
- Review: It compares browser renders of the generated code against the original image, requiring approval before moving to the next phase.
Who it’s for
It is designed for developers and creators building interactive 3D web experiences who need stylized props, mechanical objects, plants, or scene assets that are animation-ready and built entirely with code rather than imported meshes.
Highlights
- Code-Based Generation: Produces procedural Three.js geometry and TypeScript factories instead of static mesh files.
- Coded Hierarchy: Plans parent-child relationships and sockets to ensure models are ready for animation.
- Material Extraction: Derives PBR (Physically Based Rendering) evidence like roughness and normal maps from the reference image.
- Quality Gating: Uses a specific quality model that evaluates both overall identity and critical recognizable features to prevent generic outputs.
Related
- Project
- Project
- Project
- Project
- Project