BLS (File Format)

This page describes the .bls format. .bls is used for vertex data in conjunction with cluster animations (BCK and BLA).

File Format

Header
Offset Type Description
0x00 Word File Magic (CLS1)
0x04 UInt32 Always 0xCDCDCDCD (Placeholder)
0x08 UInt16 Cluster Count (usually 1)
0x0A UInt16 Cluster Key Count
0x0C UInt16 Normal Blend Count
0x0E UInt16 Vertex Position Count
0x10 UInt16 Vertex Normal Count
0x12 - 2-byte Padding
0x14 UInt32 Cluster Table Offset
0x18 UInt32 Cluster Key Table Offset
0x1C UInt32 Normal Blend Table Offset
0x20 UInt32 Vertex Position Table Offset
0x24 UInt32 Vertex Normal Table Offset
0x28 UInt32 Cluster Stringtable Offset
0x2C UInt32 Cluster Key Strintable Offset
0x30 - 16-byte Padding
Cluster
Offset Type Description
0x00 Float Maximum Blend Angle
0x04 Float Minimum Blend Angle
0x08 UInt32 Cluster Key Address
0x0C UInt8 Flag
0x0D - 3-byte Padding
0x10 UInt16 Cluster Key Count
0x12 UInt16 Vertex Position Count
0x14 UInt16 Vertex Normal Count
0x16 UInt16 Normal Blend Count
0x18 UInt32 Vertex Position Index Offset
0x1C UInt32 Normal Blend Offset
0x20 UInt32 Deformer Offset (Usually 0x0000)
Cluster Key
Offset Type Description
0x00 UInt16 Vertex Position Count
0x02 UInt16 Vertex Normal Count
0x04 UInt32 Vertex Position Index Offset
0x08 UInt32 Vertex Normal Index Offset
Normal Blend
Offset Type Description
0x00 UInt16 Vertex Normal Count
0x02 - 2-byte Padding
0x04 UInt32 Start Vertex Normal Index Offset
0x08 UInt32 Destination Vertex Normal Index Offset

Vertex Tables

First, there is a table of positions, as defined below.

Vertex Position
Offset Type Description
0x0 Float X-Coordinate
0x4 Float Y-Coordinate
0xC Float Z-Coordinate

Then, there is a table of indices into this table.

Vertex Index (Cluster Key)
Offset Type Description
0x0.0 Bit X sign bit multiplier
0x0.1 Bit Y sign bit multiplier
0x0.2 Bit Z sign bit multiplier
0x0.3 13-Bit Index into the vertex position table above

For clusters, there are no sign bits. Additionally, the index is into the .bmd VTX1 section.

Normals Section The normals section is similar to the Vertex Positions above.