Repository navigation
Animation.en
Real Minecraft player state
movement speed, on-ground, swimming, swinging, item use, look direction
↓
RigWorks picks the action source
native pose / FBX clip / scripted control
↓
AssimpLoader animation evaluation
keyframe sampling, pose blending, bone hierarchy, IK, configured visual physics
↓
Finished bone pose and equipment mount transforms
↓
Skinning and drawing
The engine orders evaluation by processor category; JS call order alone does not determine the final override.
Switching straight from idle to run snaps the body. blendSeconds in profile.json controls the transition time for direct clip switches, for example 0.15 seconds. Switching again mid-transition keeps the current pose and continues from the middle of the blend instead of snapping back to the first frame.
AnimationBlender provides linear blending, additive layers and body-part layers. Each layer has its own weight and can be restricted by a bone mask.
The CLIPS integration puts item use, swinging and optional hurt clips in an upper-body layer that excludes the hips and legs while the base locomotion clip keeps playing. When a custom upper-body action takes over the arms, the vanilla arm pose yields accordingly.
A non-empty bone mask in the generic script API contains only the nodes explicitly listed — listing a chest node does not automatically include all descendants. The built-in CLIPS upper-body mask collects the subtree itself. The two behave differently.
| Method | Meaning | Use |
|---|---|---|
| Override | approaches another pose by weight | replace both arms with a weapon pose |
| Additive | adds the delta from a reference pose on top of the current pose | breathing, light recoil, torso lean |
Weight 0 means the layer has no effect, 1 means full effect. Additive layers need a suitable reference pose; an arbitrary full walk clip is not a recoil animation.
Locomotion clips adjust playback speed from actual velocity and the configured stride. walkStride is the travel distance a full cycle should cover; mismatched values still slide and need animation adjustment.
Swings read Minecraft's accepted swing generation and normalised progress to align the attack clip phase. A mouse click does not mean an attack was accepted, let alone that damage happened; animation code does not change server damage, reach or cooldown.
The motions object in rig.json is a keyframed layer that runs before bone Morph, append transforms, ground/IK, rigid-body physics and skinning. Nodes not named by the active motion are still supplied by the imported animation.
{
"version": 1,
"motions": {
"nod": {
"duration": 1,
"bones": {
"Head": [
{"time": 0, "translation": [0,0,0], "rotation": [0,0,0,1]},
{"time": 1, "rotation": [0.1,0,0,0.9949874],
"curves": {"rotation": [0.25,0,0.75,1]}}
]
},
"morphs": {"Blink": [{"time":0,"weight":0},{"time":1,"weight":1}]},
"ik": {"left_leg_probe": [{"time":0.5,"enabled":false}]}
}
}
}Bone keys are rest-relative local translation offsets and XYZW quaternion rotations. Translation uses the imported node's local units, which may not be metres in FBX. The destination key owns the interval's cubic Bezier controls; curves.x/y/z/rotation each accept [x1,y1,x2,y2] in [0,1], and omitted curves are linear. Morph tracks interpolate linearly and IK switches step at exact timestamps.
Limits: 256 named motions, 256 tracks per type, 4096 keys per track, 16384 keys per motion, up to 86400 seconds. The layer stays inactive until explicitly played.
| Goal | Right approach |
|---|---|
| good-looking walk, run, attack, dance | author keyframes in the DCC, bake if needed, export clips |
| hand always touching the weapon's support grip | calibrate equipment first, then configure runtime contact IK |
| feet adapting to terrain | configure grounding and IK targets rather than relying on flat-ground clips |
| head or eyes following a target | runtime aim or the corresponding bone control |
| hair, hems, decoration sway | configure Spring or visual rigid-body physics per model |
| fixed performance where only the final motion matters | a baked result is enough; the game does not rebuild authoring constraints |
Blender controllers, drivers and constraint graphs do not become equivalent in-game solvers. Baking records the computed deformation-bone motion; runtime IK recomputes joints from the target at that moment. The two can share the work — bake a walk in Blender, then use grounding correction in game to adapt to slopes.
FBX root motion (root-bone translation) does not push the server player automatically. Locomotion clips are normally authored as in-place loops and Minecraft controls actual movement; keep an eye on visual drift when root translation is retained.
基于 AssimpLoader 的 Minecraft 玩家角色与动画系统。 A Minecraft player character and animation system built on AssimpLoader.
- Home
- Getting Started
- Blender Workflow
- Vanilla Actions
- Rig Calibration
- Animation
- Equipment
- Hand Contacts
- Scripting
- Avatar Packages
- Multiplayer Sync
- Workbench and Troubleshooting