BPK (File Format)

From Custom Mario Kart: Double Dash Wiki!!
Jump to navigation Jump to search

This page describes the .bpk format. .bpk is used to animation the colors on a model. It is used for objects like bob-ombs. It is similar to the structure of .brk files.

File Format

J3D Header
Offset Format Description
0x00 4-byte String File type magic (always PAK1)
0x04 UInt32 Section size
0x08 UInt8 Loop mode
0x0c UInt16 Duration
0x0e UInt16 Color Animation count
0x10 UInt16 Red Count
0x12 UInt16 Green Count
0x14 UInt16 Blue Count
0x16 UInt16 Alpha Count
0x18 UInt32 Color Animation offset
0x1c UInt32 Index / remap table offset
0x20 UInt32 Stringtable offset
0x24 UInt32 Red offset
0x24 UInt32 Green offset
0x24 UInt32 Blue offset
0x24 UInt32 Alpha offset
Color Animation Entry
Offset Format Description
0x00 Component Entry Red component entry
0x06 Component Entry Green component entry
0x0c Component Entry Blue component entry
0x12 Component Entry Alpha component entry
Component Table Entry
Offset Format Description
0x00 Component Entry Red component entry
0x02 Component Entry Green component entry
0x04 Component Entry Blue component entry

Each component table (red, green, blue, alpha) is composed of several Keyframes.

Keyframe
Offset Format Description
0x00 UInt16 Frame
0x02 UInt16 Value
0x04 UInt16 Tangent

Tools

References

noclip Github