img2threejs
它能做什么
这项技能让 AI 把物体或角色的参考图片,转换为用代码构建、可用于动画的 3D 场景。适合希望 3D 模型与图片相符、又不想下载现成 3D 资源的人。
适用场景
- ✓你有某个物体的照片或绘图,并想为网页制作它的 3D 模型的时候。
- ✓你想根据参考图片制作风格化 3D 角色的时候。
- ✓你需要检查 3D 模型与参考图的相似程度,并修正差异的时候。
技能链接
https://github.com/img2threejs/img2threejs/blob/main/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这张椅子的照片重建为 3D 模型,以便我在 Three.js 网页中展示。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会分阶段工作:先编写形状的代码,然后将其渲染结果与参考图片进行比较,并循环修正模型,直到足够吻合。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
img2threejs — Image to procedural Three.js
Rebuild the object visible in a reference image as a code-only procedural Three.js model,
gated by a staged sculpting pipeline and an AI-vision self-correction loop. This is
reconstruction-by-code, not photogrammetry, mesh extraction, or downloaded art packs. That
promise governs how the model is built — it says nothing about which file formats it can
subsequently be exported to; an explicitly-selected emission target (--target <kind>) is a
terminal, whole-artifact transform of the already-built model, verified to its own stated limit,
never a second way to build one.
Agent-agnostic: works under Hermes, Claude Code, Codex, or OpenCode. Wherever this doc says "agent vision" or "agent browser tool", use whatever the host provides — native image reading, a browser MCP (playwright/chrome-devtools), the project preview, or a user-supplied screenshot.
This file is the always-loaded router: it holds the order of operations and every hard rule as one
line. The full contract behind each rule lives in the grimoire/ or docs/ file that rule names —
read the named file at the moment you reach that stage, not before.
Canonical shared checkout
Keep one checkout of this repository and let every host enter it through a symlink, so the hosts
execute the same code instead of drifting apart. npx --yes img2threejs@latest install does this
for the hosts it detects (hermes, claude, codex, opencode); it refuses (exit 2) to replace a
link it does not manage, so a hand-made link is never silently swapped for a release copy.
Hermes reads skills per profile: also link ~/.hermes/profiles/<profile>/skills/img2threejs
(the installer writes only ~/.hermes/skills/). Install, manual symlinks, and troubleshooting:
docs/INSTALL.md.
When To Use
The user attaches/points to an object image and wants a procedural Three.js model, a reconstruction/animation/destruction plan, a sculpt spec, or code. Also for material studies, action-ready props, game objects, botanical/mechanical parts, and stylized reconstructions.
Profile preflight (once per run, before forge/next.py)
Domain knowledge (CS2 skins, animated characters, emission targets) lives in plugins, not in this checkout. Pick the profile from the subject, then confirm this environment can start it:
python3 forge/state.py init --help | grep -- --profile # profiles available here
generic/characterare built in: no harness, no plugin, nothing else to check.- A missing domain profile (e.g.
cs2) is a setup gap: never downgrade togenericsilently. Installing it edits the user's machine, so give them the commands indocs/INSTALL.md§3, get their go-ahead, re-check, and continue. - Installed but not listed (wrong
$IMG2_HOME), or a Hermes plugin link:docs/PLUGINS.md. - Then read what the profile's own steps name, at the moment you reach them: the plugin's
SKILL.mdand contracts govern that domain.
Core Promise
Sculpt from a photo, in order — never one-shot a mesh:
- Run
python3 forge/next.py --state .img2threejs/state.json [<spec>]first, at every start, resume, and before every correction iteration. It reports the ordered checklist, exact next command, evidence status, and bounded correction-loop status; it never replaces the spec/pass gates. Obey a hard stop; never continue from memory. - Validate the image is a suitable 3D target (
grimoire/intake/validation_rubric.md). - Assess object class + complexity, then write a
qualityContractbefore any code. - Spec it: component hierarchy, materials, lighting, pivots, sockets, action anchors.
- Build pass-by-pass from blockout → structure → form → material → lighting → interaction → optimization.
- Verify each pass with a screenshot compared against the reference; fail a pass if an identity-defining feature is wrong even when the global score looks fine.
State explicitly when output is approximate/stylized/low-poly. A single image cannot reveal hidden sides or guarantee exact geometry — say so instead of faking confidence.
Mandatory Local State Gate
Conversation context is disposable; .img2threejs/state.json is the local checklist authority.
Initialize once per reconstruction, then gate every step through it:
python3 forge/state.py init --state .img2threejs/stat
常见问题
它会扫描或复制物体吗?
不会。技能说明的是纯代码重建,而不是摄影测量或网格提取。
它会导出文件吗?
技能提到,在模型构建完成后,可以针对所选目标选择性导出为其他格式。
我需要提供什么?
一张参考图片。在检查过程中,AI 可能会使用浏览器工具查看它自己的渲染结果。
详情
作者的原始描述
Turn an object or character reference image into a quality-gated, animation-ready procedural Three.js model built in code. Use for image-to-3D reconstruction, detail-accurate object rebuilds, stylized/likeness-maximized human characters, sculpt specs, and staged code generation.
repo: img2threejs/img2threejs
热度
- GitHub 星标
- 20k
- 排名
- #10388
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/28
评论
- …