跳到正文
CuteGuy☣️· 来源· @cutetoxicguy · X·· 5 小时前精选AI 评分78
推荐理由

通过代码重构替代传统资产生成,提供可编辑的3D模型构建新思路。

正文 · 原文

🎮 What if an AI coding agent could recreate almost any object from a reference image using nothing but Three.js code?

No downloaded 3D models. No photogrammetry. No mesh-generation API.

Meet img2threejs, an open-source skill for Claude Code, Codex, OpenCode and other coding agents.

It rebuilds objects and characters as fully procedural, editable 3D models written in TypeScript.

Here's the difference from ordinary image-to-3D AI.

Traditional models generate geometry that you then import into Blender or a game engine.

img2threejs generates a program that constructs the geometry.

A model can consist of:

▪️ Primitive shapes and custom procedural surfaces.

▪️ Parametric curves and measured geometric profiles.

▪️ Procedural materials and shaders.

▪️ Hierarchical object parts with named pivots.

▪️ Animation joints, sockets and collision geometry.

▪️ Skeletons and skinning systems for characters.

The resulting model is a http://THREE.Group factory.

You can modify its proportions, animate individual components and change its appearance by editing ordinary code.

But how does AI achieve visual accuracy?

The agent follows a structured reconstruction workflow.

1. Analyze the reference

Identify proportions, major forms, silhouettes and recognizable details.

2. Plan the geometry

Break the object into parts and choose suitable procedural representations.

3. Generate the model

Write TypeScript that creates the shapes, materials and component hierarchy.

4. Render and compare

Capture the generated object from matching camera angles.

5. Improve

Identify visual differences and refine the code until the model passes quality checks.

The process includes specific validation gates for geometry, visual similarity and animation behavior.

And the gallery demonstrates how far this can go.

The project includes live examples of:

▪️ A stylized tropical island.

▪️ Mechanical objects and vehicles.

▪️ Detailed procedural weapons.

▪️ Humanoid characters with articulated parts.

▪️ Interactive game scenes.

Every example runs directly in the browser, and its generated source code can be inspected.

Where would this be useful?

▪️ Procedural game environments.

▪️ Interactive websites.

▪️ Product configurators.

▪️ Lightweight 3D illustrations.

▪️ Animation-ready objects with editable parameters.

There are important trade-offs.

The output isn't guaranteed to perfectly match the reference.

Complex organic shapes and photorealistic surfaces can be difficult to reproduce with procedural geometry.

Generation also depends heavily on the coding agent's visual reasoning and its ability to inspect rendered results.

But the underlying idea is powerful.

Instead of generating another 3D asset, generate the code that knows how to build it.

That turns 3D reconstruction into an editable software engineering problem.

💻 https://github.com/img2threejs/img2threejs

🎮 https://img2threejs.io/

#ThreeJS #AICoding #3DArt #OpenSource

来源:CuteGuy☣️ · x.com