BCK

BCK is the format that stores bone animation data for BMD and BDL models. It consists of the standard animation header, followed by BCK-specific data in the ANK1 chunk, with data stored in banks at the end separated by component type - scale, rotation, and translation.

The keyframes are grouped according to their components, and are always in the order of scale/rotation/translation.

Each keyframe is 6 bytes long, with the following layout:

//0x6/6 bytes long
/*0x00*/ short keyCount; //Number of keys in this keyframe
/*0x02*/ short startingIndex; //Starting index of data in relevant bank
/*0x04*/ short unknownShort; //Either 0 or 1

Thus, a keyframe contains the number of keys that will be interpolated over the course of the animation, the index of the first key in the relevant data bank, and a short with an unknown purpose.

This section is padded to the nearest 32 bytes with the standard padding string.

Data Banks

There are 3 data banks after the keyframe data that store the keys for scaling, rotation, and translation. The scale and translation values are stored as floats, but the rotation values are stored as shorts.

Each bank begins with one "default" value that the keyframes can reference when they don't need to sample any keys. For scale, this is 1.0f; for rotation, this is 0; and for translation, this is 0.0f. This default is just the value, but every key after it follows this format:

var Timestamp;
var Value;
var Tangent;

The timestamp and the tangent are stored in the same datatype as the value - float for the scale and translation banks, and short for the rotation bank.