# 3D模型自动绑定骨骼，走得稳才保留

> 在命令行里为游戏用的3D模型自动绑定骨骼：一个没有骨骼的 glb 会被绑到两足、四足或飞行骨架上，再让它把这套骨架的行走动作完整走一遍，只有网格没有被扯裂、走得干净的结果才会被保留下来写成文件，带 Mixamo 骨骼命名的模型也能免费重新绑定。

- URL: https://tyrbo.ai/zh-cn/3d-moxing-zidong-bangding-gugu
- Title: 3D模型自动绑定骨骼 | 游戏角色，走得稳才算数
- Language: 简体中文 (zh-CN)
- Updated: 2026-11-26
- In other languages: [English](https://tyrbo.ai/auto-rig-3d-model-for-games), [Deutsch](https://tyrbo.ai/de/3d-modell-automatisch-riggen), [Español](https://tyrbo.ai/es/rigging-automatico-modelo-3d), [Français](https://tyrbo.ai/fr/rigging-automatique-modele-3d), [Português (Brasil)](https://tyrbo.ai/pt-br/rig-automatico-de-modelo-3d), [日本語](https://tyrbo.ai/ja/jido-rigingu-3d-moderu), [한국어](https://tyrbo.ai/ko/3d-model-jadong-riging)

你手上有一个模型：3D生成器雕出来的、商店里下载的，或者朋友建的一个角色。它一动不动，因为它没有骨骼。`asset rig` 把它绑到一套骨架上，让这套骨架的行走动作在它身上播放一遍，只有走路时网格没有被扯裂，才会写出绑好的 `.glb`。

本来就带骨架的模型，包括用 Mixamo 骨骼命名的模型，会免费重新绑到同一套骨架上。

Tyrbo 应用也支持简体中文：它会跟随你的浏览器语言，你也可以在设置中更改。

把这段发给你的编程助手

```
Set up Tyrbo asset gen for me so I can make my game's art, sprite sheets, animated characters, 3D models, UI and sound from here, all in one look.
1. Install the CLI: run `npm install -g @tyrbo/asset` (Node 20.11 or later).
2. Add the skill: in Claude Code, run `claude plugin marketplace add https://cdn.jsdelivr.net/npm/@tyrbo/asset/.claude-plugin/marketplace.json`, then `claude plugin install tyrbo-asset@tyrbo`. In another MCP client, add the MCP server `npx -y @tyrbo/asset mcp`. In any other agent, read `asset --help` before the first call.
3. Check it, free: in an empty scratch folder, not my game's, run `asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mock`. It needs no key and writes stand-in files there.
4. Authenticate: ask me to make an asset key at https://app.tyrbo.ai/?from=/asset-generator#/settings/assets (Settings, Asset gen) and to run `asset login` in my own terminal, pasting the key there. Never ask me for the key in chat, and never run `asset login` yourself. Once I have, run `asset spend` to see it works.
Once that's done, let me know when it's ready.
```

[获取素材密钥](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)[查看文档（英文）](https://tyrbo.ai/asset-generator/docs)

## 要运行的命令

```
asset rig knight models/knight.glb
asset rig hound models/hound.glb --as quadruped --no-marks
asset rig hero models/hero-mixamo.glb --as biped
asset animate knight --clips idle,walk,run,jump
asset render2d knight --view top-down
```

## 由 CLI 生成，不是为这个页面画的

下面都是 asset CLI 真正写出的文件，每个文件上方是生成它的那条命令。

![The wolf demon boss as sculpted, in its rest pose, turning once round](https://tyrbo.ai/asset-gen/citadel/wolfboss-rest.webp)

### See prompt

`asset mesh wolfboss "a towering wolf demon boss standing on two legs: wolf head with curved horns and glowing red eyes, dark shaggy fur, iron bracers, a torn loincloth, long claws, no weapon, arms at its sides" --rig biped --triangles 10000`

![The wolf demon boss see-through, its skeleton of 25 bones drawn inside it, turning once round](https://tyrbo.ai/asset-gen/citadel/wolfboss-bones.webp)

![The wolf demon boss walking](https://tyrbo.ai/asset-gen/citadel/wolfboss-walk.webp)

## 三套骨架，按体型挑选

模型会被绑到三套骨架之一：两条腿的用 **biped**（两足），四条腿的用 **quadruped**（四足），有翅膀的用 **flier**（飞行）。`--as` 可以直接指定。不指定时，骨架会从已绑骨骼模型自带的关节名称读出来，或者从网格的形状判断。

对于还没绑骨骼的两足模型，一个便宜的视觉模型会先在正面视图上标出关节，就像动画师在自动绑定前先放好标记点。代码会逐个检查这些标记：膝盖在髋部下方，手肘在肩和手腕之间，左右没有弄反。发现有标记偏了，会再问一次。`--no-marks` 跳过这个模型，只根据网格本身拟合关节，免费。

## 行走就是考试

绑上只是工作的一半；膝盖第一次弯曲就撕裂的骨骼，在游戏里毫无用处。所以写出任何文件之前，骨架的行走动作会在绑好的模型上播放一遍（飞行骨架播放飞行动作）。只要有一个顶点被扯开，这次绑定就会被拒绝，那个顶点也会被点名。

说明里还会写出某条肢体带的蒙皮太少的情况，比如一条手臂沿着自身长度弯折，或一条腿留在身体那边不跟着动，以及都试过了哪些权重方案。已绑骨骼模型上骨骼映射定不下来的关节会被列回给你，你可以用 `--bones joint=bone` 来指定位置，或用 `drop` 把它去掉。

## 从骨骼到动作

绑好的模型就能用上动作库了。`asset animate` 会把 idle、walk、run、jump 这类动作免费写进同一个 `.glb`，这一步的其余内容在[3D动画片段页面（英文）](https://tyrbo.ai/3d-game-animation-clips)里。`asset render2d` 播放这些动作，并从你的游戏镜头把它们画到一张精灵图上，用3D模型做 2D 游戏就是这么来的，[3D模型转精灵图页面（英文）](https://tyrbo.ai/3d-model-to-sprite-sheet)有详细说明。

如果模型还不存在，[文字生成带骨骼的3D角色（英文）](https://tyrbo.ai/text-to-rigged-3d-character)从一段描述开始，一边做一边绑。要先做出模型，也可以看[AI 3D模型生成](https://tyrbo.ai/zh-cn/ai-3d-moxing-shengcheng)。

## 大家常问的问题

### 绑定骨骼要花多少钱？

已经有骨架的模型，重新绑定是免费的。没绑骨骼的两足模型，由一个便宜的模型标关节，大约 $0.001；用 `--no-marks` 的话，整个绑定都免费。

### 能给蜘蛛或者蛇绑骨骼吗？

动作库里的三套骨架覆盖两条腿、四条腿和翅膀。三套都套不上的身体，比如很多条腿或者触手，用 `asset shape --rig own` 在一套专属骨架上制作。

### Mixamo 的角色还能继续用吗？

能。Mixamo 的骨骼名称和其他常见的命名方式都会映射到动作库的骨架上，所以重新绑定之后，动作库里的动作都能在它身上播放。

## 骨骼绑定与动画

- [AI 2D角色动画](https://tyrbo.ai/zh-cn/ai-2d-juese-donghua)

## 素材生成器的更多页面

- [素材生成器（英文）](https://tyrbo.ai/asset-generator)
- [文档（英文）](https://tyrbo.ai/asset-generator/docs)
- [AI精灵图生成](https://tyrbo.ai/zh-cn/ai-jinglingtu-shengcheng)
- [AI 3D模型生成](https://tyrbo.ai/zh-cn/ai-3d-moxing-shengcheng)
- [像素风游戏素材生成](https://tyrbo.ai/zh-cn/xiangsu-youxi-sucai-shengcheng)
- [AI游戏图标生成](https://tyrbo.ai/zh-cn/youxi-tubiao-shengcheng)

## 先装好它，再说出你要的画风。

[获取素材密钥](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)

先在 Tyrbo 应用里创建密钥，再运行 asset login。想先免费试，给任何命令加上 --mock 即可。

---

This is the Markdown version of https://tyrbo.ai/zh-cn/3d-moxing-zidong-bangding-gugu, from Tyrbo (The AI game engine). Cite and link the page itself. Every page: https://tyrbo.ai/llms.txt