# 保住角色设计的AI 2D角色动画

> 用AI从一张画好的角色图做出 2D 游戏角色动画：待机、行走和攻击，覆盖你的镜头需要的每一个朝向，全部排在同一张精灵图上，引擎直接就能播放，角色的设计从第一帧到最后一帧都保持一致，不用一帧帧重画，也不用为每个方向再单独画一遍同一个角色。

- URL: https://tyrbo.ai/zh-cn/ai-2d-juese-donghua
- Title: AI 2D角色动画 | 一张角色图做出整套动作
- Language: 简体中文 (zh-CN)
- Updated: 2026-11-26
- In other languages: [English](https://tyrbo.ai/ai-2d-character-animation), [Deutsch](https://tyrbo.ai/de/2d-charakter-animieren-ki), [Español](https://tyrbo.ai/es/animacion-2d-de-personajes-con-ia), [Français](https://tyrbo.ai/fr/animation-de-personnage-2d-ia), [Português (Brasil)](https://tyrbo.ai/pt-br/animacao-2d-de-personagem-com-ia), [日本語](https://tyrbo.ai/ja/ai-2d-kyarakuta-animeshon), [한국어](https://tyrbo.ai/ko/ai-2d-kaerikteo-aenimeisyeon)

把一个角色画出来是最有意思的部分。可要为每个动作的每一帧、为镜头需要的每个朝向再画一遍，小游戏往往就卡在这里。`asset character` 一次把整套都要下来：按你的画风画出角色，从这张图画出它的其他朝向，给每个动作做动画，再把所有帧排到同一张精灵图上。

它底下跑的是 `asset animate2d`，由这个引擎决定每个动作用哪种方式来做。

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 look bazaar "cel-shaded desert bazaar, bold outlines, flat bright colours" --view isometric
asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots, twin daggers sheathed" --clips idle,walk,attack
asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots, twin daggers sheathed" --clips spin --model mischief,spin=grok
asset character slime "a jelly slime" --body blob
asset character miner "a small miner with a headlamp and a pickaxe" --view side --takes 3
```

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

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

![The rogue seen isometric: idle](https://tyrbo.ai/asset-gen/bazaar/rogue-idle.webp)

### See prompt

`asset video-clip rogue-idle4 "the hooded rogue standing perfectly still in place, only a slow breath lifting the shoulders and the scarf ends stirring; feet, hips, shoulders and head locked facing the camera, no turning or twisting at all, the camera locked off" --of out/rogue.png --view "isometric, seen from above" --facing "facing the camera" --clip idle --energy calm`

![The rogue seen isometric: walk](https://tyrbo.ai/asset-gen/bazaar/rogue-walk.webp)

### See prompt

`asset video-clip rogue-walk3 "the hooded rogue walking on the spot toward the viewer, a light confident stride, head steady and facing forward, no turning, the camera still" --of out/rogue.png --view "isometric, seen from above" --facing "facing the camera" --clip walk --energy calm`

![The rogue seen isometric: attack](https://tyrbo.ai/asset-gen/bazaar/rogue-attack.webp)

### See prompt

`asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots, twin daggers sheathed" --view isometric --clips attack,attack-up,spin,spin-up --model x-ai/grok-imagine-video-1.5-lite`

![The frog warrior, turned three-quarters: roll](https://tyrbo.ai/asset-gen/bog/warden-roll.webp)

### See prompt

`asset video-clip warden-roll "the frog warrior doing a forward dodge roll to the right: it tucks and tumbles head over heels along the ground in the direction it faces, a somersault rolling forward across the floor, then pops back up into its stance, club in hand" --of out/warden.png --clip roll --view "three-quarter view from above, as a top-down brawler" --facing "facing right" --model x-ai/grok-imagine-video-1.5-lite`

![The knight seen from above: spin side](https://tyrbo.ai/asset-gen/keep/knight-spin-side.webp)

### See prompt

`asset character knight "a knight in fitted silver plate armour with a blue tabard, no cape" --view top-down --clips attack,attack-up,attack-side,spin,spin-up,spin-side --model x-ai/grok-imagine-video-1.5-lite`

![The pixel-art tinker goblin from above: walk](https://tyrbo.ai/asset-gen/workshop/tinker-walk.webp)

### See prompt

`asset sheet stride --of out/tinker.png --clips walk,walk-up --view top-down "a big clear stride in every frame: one knee lifted high with its foot off the ground, then the other, the arms swinging opposite, the body bobbing up and down"`

## 镜头需要的每一个朝向

视角决定一个角色要面朝几个方向。横版视角只要一个侧面，游戏会把它镜像翻转。俯视角需要正面、背面和一个侧面。等距视角需要正面和背面。CLI 会从第一张图画出缺少的朝向，并在每个朝向里给每个动作做动画，所以英雄往屏幕上方走时，露出的是后背而不是脸。

动作的命名跟 2D 起步模板读取的方式一样：`walk` 是正面，`walk-up` 和 `walk-side` 是另外两个。只要角色在游戏里真正会做的动作；一个站在摊位后面的商人，`--clips idle` 就够了。

## 一个动作的三种做法

默认情况下，视频模型会根据角色图把画好的角色拍成动作，每个动作大约 $0.015，帧与帧之间角色的设计保持稳定。免费木偶能套上的身体，团状生物、蛇形身体或会飞的角色，改用代码来弯折，不收费。画风里写着像素、8-bit 或复古的，会改为手绘关键姿势，每个动作四个。

`--via` 可以直接指定路线，报告会写明实际跑了哪条、为什么。`--model` 可以给一部分动作设一个模型，其余用另一个，比如让擅长表现出招的模型做攻击，行走仍用默认模型。`--takes 3` 会并排拍三条，保留通过检查里最有生气的那条。

## 一张图，一个名字

所有内容都落在 `<name>-sheet.png` 上，旁边是它的图集和 `<name>.anim.json`：帧、速率、是否循环，以及包含的朝向。身体站高 `--height` 像素，默认 160，脚都踩在同一条线上，所以角色转身时画面不会跳。2D 起步模板按角色的名字播放这张图。

再要一次时，只补上缺的部分，已经有的保留，所以之后加一个旋转动作，只会拍这个旋转。`--replace` 则整套重来。想要完全不经过拍摄的逐帧精灵图，可以看[AI精灵图生成](https://tyrbo.ai/zh-cn/ai-jinglingtu-shengcheng)。

## 大家常问的问题

### 一整套动作要花多少钱？

用拍摄的方式，一套横版大约 $0.09，一套等距大约 $0.19，一套俯视角大约 $0.31。团状生物、蛇形身体或会飞角色走木偶路线，是免费的。

### 我需要自己调用 animate2d 吗？

很少需要。`asset character` 会把它的参数交给 `animate2d`，还会先画出动画起步用的图，所以平时用它就对了。

### 能给我自己画的图做动画吗？

能。用 `--of` 把图传进去，角色会照着你的图来画，设计保留，然后再做它的各个朝向和动作。

## 骨骼绑定与动画

- [3D模型自动绑定骨骼](https://tyrbo.ai/zh-cn/3d-moxing-zidong-bangding-gugu)

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

- [素材生成器（英文）](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/ai-2d-juese-donghua, from Tyrbo (The AI game engine). Cite and link the page itself. Every page: https://tyrbo.ai/llms.txt