跳过主要内容
WEB
Skill免费GameSkill 出品 · 调优版

img2threejs

/img2threejs

An Agent Skill that rebuilds the object or character in a reference image as a code-only, animation-ready Three.js model, checked pass by pass.

许可证
Apache-2.0
出品
GameSkill 出品
下载 ZIP

我们测过

在 Three.js procedural factory (Python 3.13 forge) 上通过 17/17 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。

测试报告

这个 skill 做什么

AI 学会做什么

Rebuild the object or character in one reference image as procedural Three.js code, pass by pass, with vision review and Python quality gates.

什么时候触发

When you invoke /img2threejs in Claude Code, or ask another agent to use the installed img2threejs skill with a reference image.

示例结果

A TypeScript THREE.Group factory built from primitives and procedural shaders, with pivots, sockets and colliders so it is ready to animate.

GameSkill 测过的版本

GameSkill 调优版:skill 文件取自提交 3e7099e1b7fe,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。

协议:基于 img2threejs/img2threejs(作者 img2threejs),协议 Apache-2.0。ZIP 保留协议文件(LICENSE),CHANGES.md 列出了 GameSkill 加的所有文件。

img2threejs

自检清单

  • 先做 pre-spec 评估,再写 ObjectSculptSpec / Do the pre-spec assessment before writing the ObjectSculptSpec
  • 规格过不了 strict-quality 就不生成代码 / No code is generated until the spec passes strict-quality
  • 模型完全用代码搭,不用下载的模型或摄影测量 / The model is built in code only, never from downloaded meshes or photogrammetry
  • 每一轮都对照参考图截图复查 / Each pass is reviewed against the reference image with a capture
  • 要导出别的格式时用 --target,导出前模型已经建好 / Export to other formats with --target only after the model is built

中文指南

这个 skill 做什么

把一张物体或角色的参考图,用代码重建成可以做动画的 Three.js 程序化模型。它是分阶段的流程:先评估图片,写规格(ObjectSculptSpec),过质量闸门后才生成 TypeScript 工厂代码,再截图对照、修正、绑骨骼。全部 Python 标准库,不需要额外依赖。

什么时候用

  • 有一张参考图,想要一个用代码搭的 Three.js 模型
  • 网页游戏里要可动画的道具或角色,又不想用下载的模型
  • 要一份可复查的建模规格

怎么装

下载本页的 ZIP,把 img2threejs/ 整个文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。需要 Python 3.10 以上;作者也提供 npx img2threejs@latest install 自动安装。

最小示例

gameskill/examples/tests/run_tests.py 先跑作者自带的测试,再用 new_sculpt_spec.py "Mug" 建一份空白规格,交给 generate_threejs_factory.py:它会拒绝生成代码,并写出 BLOCKED 报告,列出还缺哪些评估。

我们怎么测的

17 项检查全部通过(触发、运行、产出、单一职责、双语五类)。运行部分:作者自带的 1416 个测试全部通过(跳过 64 个);安装器的 11 个测试通过;空白规格会被校验脚本标成“还是粗模”,并被 strict-quality 闸门挡下(退出码 2,11 条缺项,不写出任何代码)。注意:其中一个 Python 和 TypeScript 对照测试要 Node 22.6 以上,用 Node 20 跑会失败。没测的:从真实图片到模型的完整流程,因为每一步都要 AI 看图判断。这个 skill 是 Apache-2.0 协议,ZIP 里带了原样的 LICENSE(上游没有 NOTICE 文件)。结果在 gameskill/test-report.json。

搭配

  • threejs-game-skills:把模型放进 Three.js 游戏
  • blender-export-pipelines:从 Blender 走的另一条路
  • pixijs-skills:网页 2D

安装

告诉你的 AI

Install the skill from https://gameskill.dev/skills/img2threejs/install.md

GameSkill 测过的版本

测过的版本装到 .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/img2threejs.zip -o /tmp/gameskill-img2threejs.zip
unzip -oq /tmp/gameskill-img2threejs.zip -d .claude/skills
rm /tmp/gameskill-img2threejs.zip

怎么用

提示词 1
/img2threejs Rebuild the object in ./reference.png as a procedural Three.js model.
Keep its proportions, silhouette and colours. Follow the quality gates.
Report the output files, render-review evidence and any inferred regions.
提示词 2
Use img2threejs with the installed character plugin and ./reference.png.
Follow the animated-character profile. Do not claim animation readiness until its rig gates pass.
提示词 3
Use img2threejs with the installed cs2 domain and ./reference.png.
Follow the cs2 profile and its family-specific reconstruction and review gates.

预期结果(依据作者文档)

The agent validates the image, writes an assessment and spec, generates the factory pass by pass and reviews rendered comparisons. The README says it states plainly when a result is approximate or stylized, and that characters are stylized reconstructions, not photoreal likenesses. The last two prompts need the optional plugins.

包含内容

  • A staged pipeline: blockout → structural → form → material → surface → lighting → interaction → optimization
  • A vision review after each pass and Python gates that block weak results
  • Separate tracks for objects and characters
  • Resumable state (forge/state.py and forge/next.py)

适合

  • Game props, vehicles and stylized characters for Three.js games without mesh files
  • Animation-ready models made from primitives and procedural shaders

不适合

  • Photogrammetry or exact mesh extraction: it rebuilds the object in code
  • Guaranteed likeness from one photo: the README reports per-region confidence and asks for more views

关于这个 Skill

img2threejs is a single agent skill with a narrow job: take a reference image and rebuild the subject as a procedural Three.js model. It does not use photogrammetry or downloaded art packs. The live gallery at img2threejs.io shows every result running as generated code in the browser.

The skill first turns the image into a spec, then builds the model in eight passes. Deterministic Python scripts handle validation and gating, so model tokens go only to visual review and code. The authors describe this as token-efficient image-to-3D. Characters go through a separate anatomy-aware track, and plugins add rigging, CS2 weapon skins or GLB export.

It pairs well with Three.js Game Skills: one pack builds the game, the other builds its hero models.

环境要求

  • Node.js 18+, Git and Python 3.10+
  • Claude Code, Codex, OpenCode or Hermes

相关主题

常见问题

同赛道 PRO 商业源码$8.25/mo

AI 2D 美术与序列帧管线 Sprite Asset Pipeline

把 AI 生成的原始视频直接变成商业级透明 2D 游戏序列帧:绿幕/溢色消除命令、0px 脚底锚点锁死排版、动作非线性重定时(4.33s → ~1.88s 含打击顿帧)与 Phaser / Godot 4 图集一键导出。

  • FFmpeg 去绿幕 + 边缘溢色消除抽帧命令生成器
  • 0px 脚底锚点自动对齐排版(彻底杜绝人物上下飘移)

基于 img2threejs/img2threejs (作者 img2threejs,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

相似 skills