保住角色设计的AI 2D角色动画
把一个角色画出来是最有意思的部分。可要为每个动作的每一帧、为镜头需要的每个朝向再画一遍,小游戏往往就卡在这里。asset character 一次把整套都要下来:按你的画风画出角色,从这张图画出它的其他朝向,给每个动作做动画,再把所有帧排到同一张精灵图上。
它底下跑的是 asset animate2d,由这个引擎决定每个动作用哪种方式来做。
Tyrbo 应用也支持简体中文:它会跟随你的浏览器语言,你也可以在设置中更改。
要运行的命令
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 真正写出的文件,每个文件上方是生成它的那条命令。

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
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
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
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
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
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精灵图生成。
大家常问的问题
一整套动作要花多少钱?
用拍摄的方式,一套横版大约 $0.09,一套等距大约 $0.19,一套俯视角大约 $0.31。团状生物、蛇形身体或会飞角色走木偶路线,是免费的。
我需要自己调用 animate2d 吗?
很少需要。asset character 会把它的参数交给 animate2d,还会先画出动画起步用的图,所以平时用它就对了。
能给我自己画的图做动画吗?
能。用 --of 把图传进去,角色会照着你的图来画,设计保留,然后再做它的各个朝向和动作。
先装好它,再说出你要的画风。
获取素材密钥先在 Tyrbo 应用里创建密钥,再运行 asset login。想先免费试,给任何命令加上 --mock 即可。