EvilEngine/ANIM

Tools
The following tools can be used to work with ANIM files.

BFBBAnimTools
This is a 3ds Max script written by Seil for working with ANIM files. See BFBBAnimTools for the tool page. See Custom Animations for a tutorial.

ANIM Importer (Deprecated)
These are scripts to import most .ANIM files into 3ds Max. You really should not use these. They are listed for historical reasons.

Format
Animation assets are stored using the SKB format. The overall format looks like this:

Header
The header is defined by an iAnimSKBHeader struct:


 * Magic is always 'SKB1'.
 * Flags
 * BoneCount is the number of bones in the model.
 * TimeCount is the number of times (frames) in the animation.
 * KeyCount is the total number of keyframes in the animation.
 * Scale

Keys
Each keyframe in the keys array is defined by an iAnimSKBKey struct:


 * TimeIndex is an index into the times array
 * Quat represents an quaternion rotation (X, Y, Z, W) for a bone at this keyframe.
 * Tran represents an offset position (X, Y, Z) for a bone at this keyframe.

Times
The times array maps each frame of the animation to a time in seconds. Typically this starts at 0 and increases by a multiple of 0.01666... (1/60th of a second). The last time in the animation can be interpreted as the length of the animation in seconds.

Offsets
The offsets array maps each bone in the model to a starting index in the keys array, for each time (frame) in the animation (except for the last one, because it signifies the end of the animation and doesn't have a keyframe associated with it).

For example, if a model has 3 bones, and each bone has a keyframe on every time (so 3 keyframes per time), then the offsets array would look like this: