计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
animation-systems【效率与协作】Expert character animation systems — skeletons, skinning, state machines, blending, root motion, IK, retargeting and animation performance budgeting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Animation makes characters feel alive. This skill covers the skeleton/skinning pipeline, animation state machines and blending, root motion, IK, retargeting and the performance budgets that keep hundreds of characters animating on 16 ms budgets.
AnimClip (per-bone keyframes)
→ AnimInstance (time, pose)
→ blending (state machine, layers)
→ skeleton-relative posed bones
→ skinning (GPU: vertex skin via bone matrices)
→ render
The hot path is per-bone matrix generation + skinning — the two budget walls for crowds (see §8).
struct Bone { int parent; Mat4 bindPoseInv; /* inverse bind */ const char* name; };
struct Skeleton { vector<Bone> bones; /* sorted so parent < child */ };
bindPoseInv * worldParent can vectorize.| Representation | Size/frame | Quality |
|---|---|---|
| Raw (Vec3 quats float) | ~ 52 B/bone | exact |
| Compressed quats (16-bit + smallest-three) | ~ 10 B/bone | great |
| Keyframe-Lerp (only on change) | keys compressed | tuned |
compression ref).states: Idle, Walk, Run, Jump, Attack_A...
transitions: {from, to, triggers, blendTime, condition}
lerp(pose) or quat nlerp.blend w ramps 0→1 over blendTime (frame-rate independent — state.time/transition.duration).base layer: whole-body locomotion
masked layer: upper-body (aim, pickup, minor)
combine: mix per-bone by mask weights (blend-by-mask)
The mask = per-bone weights (torso 1.0, hips 0.2...) — cache offsets.
| IK use | Method | Cost |
|---|---|---|
| Foot placement | 2-bone (leg) analytic | cheap |
| Head/hand target | 2-bone + reach | cheap |
| Full-body align (grippers) | CCD/FABRIK | heavier |
{referenceBone → actorBone, weight} + scale handling.Per-character cost budget (skinned):
| Metric | Target/char (100 chars) |
|---|---|
| CPU pose eval (LOD0) | ~0.1–0.3 ms |
| Skinning GPU | ~0.05–0.2 ms |
| skin vertices | 3–8k quads LOD0 |
| animation memory (decompressed) | LOD0 ~1 MB/char-anim-set |
state.time advances by fixed or sim-driven dt; blends use the same polygon (no wall-clock).references/skeleton-and-skinning.md — bone chain, bind pose, local evaluation, GPU skin matrix mathreferences/animation-blending.md — blend spaces, masks, state machine transitions, continuous blendsreferences/clip-compression.md — keyframe dedup, quantization, streaming clips, deterministic decodereferences/root-motion-and-ik.md — root extraction, foot IK, 2-bone/CCD solving, budgetsreferences/retargeting.md — bone maps, scale handles, pose-local rules, merchant/furry-safe rulesreferences/performance-budgeting.md — bone counts, LOD ladder, impostors, profiler histogram