1.1
.p3m
Type | Description |
---|---|
"Header" | File header |
"Data" | Model data |
Type | Value | Description |
---|---|---|
char[4] | {'P', '3', 'M', 0} | Header magic |
u8 | 1 | Major version |
u8 | 1 | Minor version |
u8 | Header flags | Flags |
Bit | Value | Description |
---|---|---|
1-7 | 0 | Unused |
8 | 1 | Has animation data |
Type | Value | Description |
---|---|---|
u16 | – | Vertex count |
"Vertex"[0...] | – | Vertices |
u8 | – | Index group count |
"Index group"[0...] | – | Index groups |
"Animation data"[0..1] | – | (Optional) animation data |
char[1...] | {..., 0} | String table |
Type | Description |
---|---|
float[3] | XYZ |
float[2] | UV |
Type | Description |
---|---|
"String" | Texture path |
u16 | Index count |
u16[0...] | Indices |
Type | Description |
---|---|
u16 | Offset in string table |
Type | Description |
---|---|
u8 | Bone count |
"Bone"[0...] | Bones |
u8 | Action count |
"Action"[0...] | Actions |
u8 | Animation count |
"Animation"[0...] | Animations |
Type | Description |
---|---|
"String" | Name |
float[3] | Head XYZ |
float[3] | Tail XYZ |
u16 | Vertex count |
"Bone vertex"[0...] | Vertex references |
u8 | Child count |
Type | Description |
---|---|
u16 | Index |
u16 | Weight |
Type | Description |
---|---|
u16 | Max frame |
u8 | Number of affected bones |
"Action bone data"[0...] | Per-bone action data |
Type | Description |
---|---|
"String" | Bone |
"Action data" | Action data |
Type | Value | Description |
---|---|---|
u8 | – | Translation count |
u16[0...] | – | Frame |
u8[0...] | Animation interp enum | Interpolation type |
float[0...][3] | – | Translations |
u8 | – | Rotation count |
u16[0...] | – | Frame |
u8[0...] | Animation interp enum | Interpolation type |
float[0...][3] | – | Rotations |
u8 | – | Scale count |
u16[0...] | – | Frame |
u8[0...] | Animation interp enum | Interpolation type |
float[0...][3] | – | Scales |
Name | Value |
---|---|
P3M_ACTINTERP_NONE | 0 |
P3M_ACTINTERP_LINEAR | 1 |
Type | Description |
---|---|
"String" | Name |
u32 | Microseconds per frame |
u8 | Action count |
"Animation action" | Action reference |
Type | Description |
---|---|
u8 | Action index |
float | Speed multiplier |
u16 | Start frame |
u16 | End frame |