From CloudModding TWW Wiki

BTP is a format used to store animations involving texture swaps. It is mainly used in The Wind Waker for animating characters' facial expressions. It consists of the standard animation header, followed by the TTP1 chunk, which stores information unique to the BTP format.

Standard Header

This header is found at the start of all the animation formats. Below is what it looks like for the BTP format.

//0x20/32 bytes long
/*0x00*/ char[4] Magic; // "J3D1"
/*0x04*/ char[4] StudioType; // "btp1"
/*0x08*/ int FileSize;
/*0x0C*/ int NumChunks;
// From 0x10 to 0x20 is an array of padding bytes with the value 0xFF/255.


This follows the standard header and contains data specific to the BTP format. It contains keyframe data for each material being animated.


The header is outlined below.

// 0x20/32 bytes long
/*0x00*/ char[4] Magic_TPT1;
/*0x04*/ int TPT1Size;
/*0x08*/ byte Flag; // Assuming from BCK/BTP
/*0x09*/ byte AngleMultiplier; // Assuming from BCK/BTP. Probably not used
/*0x0A*/ short AnimationLength; // Can be zero, probably because Facial Animation entries specify their own length
/*0x0C*/ short KeyframeCount;
/*0x0E*/ short Unknown2;
/*0x10*/ int KeyframeDataOffset;
/*0x14*/ int TextureIndexBankOffset;
/*0x18*/ int RemapTableOffset; // Possibly? Not sure.
/*0x1C*/ int StringTableOffset;

Keyframe Data

Each material being animated has one keyframe entry. The format for keyframes is shown below.

// 8 bytes long
/*0x00*/ short FrameCount; // Number of frames in the anim
/*0x02*/ short FirstIndexOffset; // Index of the first texture index in the texture index bank
/*0x04*/ short Unknown1; // Always 0x00FF?
/*0x06*/ short Unknown2; // Always 0xFFFF?

Texture Index Bank


Remap Table


String Table