MDP

From mgsdevwiki
Jump to: navigation, search

This is the Model Format used for the 'Portable' line of Metal Gear games.

Format Specifications

Metal Gear Solid: Peace Walker (PSP)

Header
Size Value Extra Info
uint32 {4} Magic
uint32 {4} Number of Bones
uint32 {4} Number of Mesh Groups
uint32 {4} Number of Mesh Objects
uint32 {4} Hashed filename
uint32 {4} Bone Table Offset
uint32 {4} Mesh Group Table Offset
uint32 {4} Object Table Offset
uint32 {4} Unknown May be two shorts rather than a long
uint32 {4} Unknown
uint32 {4} Unknown
uint32 {4} Unknown
float {4} Max X
float {4} Max Y
float {4} Max Z
float {4} Max W
float {4} Min X
float {4} Min Y
float {4} Min Z
float {4} Min W
Bone Table (For Number of Bones)
uint32 {4} Hashed Bone Name
float {4} y0 Usually 0x0 so I'm not sure
uint32 {4} Parent
float {4} w0 Usually 0x0 so I'm not sure
float {4} Rotation X
float {4} Rotation Y
float {4} Rotation Z
float {4} Rotation W
float {4} Position X
float {4} Position Y
float {4} Position Z
float {4} Position W
float {4} Max X
float {4} Max Y
float {4} Max Z
float {4} Max W
float {4} Min X
float {4} Min Y
float {4} Min Z
float {4} Min W
Mesh Group Table (For Number of Mesh Groups)
uint32 {4} Hashed Mesh Group Name
uint32 {4} Unknown
uint32 {4} Parent Mesh Group
uint32 {4} Unknown Possibly just padding
Object Table (For Number of Objects)
uint32 {4} Hashed Mesh Group Name This mesh object will sit in this mesh group
uint32 {4} Flags Determines Vert Definition and how Faces are read
uint32 {4} Number of Face Indexes
uint32 {4} Face Index Offset
uint32 {4} Vertex Buffer Offset
uint32 {4} Skinning Table Offset
uint32 {4} Vertex Buffer Size
uint32 {4} Unknown Most likely padding
float {4} Max X
float {4} Max Y
float {4} Max Z
float {4} Max W
float {4} Min X
float {4} Min Y
float {4} Min Z
float {4} Min W
float {4} Position X
float {4} Position Y
float {4} Position Z
float {4} Position W
Face Index (For Number of Face Indexes)
uint16 {2} Unknown Always 0x0
uint16 {2} Number of Face Indices
uint32 {4} Face Index Offset if Object flag && 0xF000 = 0x1000 this is the vertex buffer offset and face index is built from vertex index
if this is 0x0 and vertex buffer offset is 0x0 vertex buffer is compressed in some way at the end of file
uint32 {4} Material Table Offset
Vertex Buffer (if Object Flag && 0x000F = 0x01)
byte {1} Weight Max is 0x80
byte {1} Weight2 Max is 0x80
uint16 {2} Tu
uint16 {2} Tv
uint16 {2} Normal X
uint16 {2} Normal Y
uint16 {2} Normal Z
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x02)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
uint16 {2} Tu
uint16 {2} Tv
uint16 {2} Normal X
uint16 {2} Normal Y
uint16 {2} Normal Z
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x03)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
byte {1} Weight5
byte {1} Weight6
byte {1} Weight7
byte {1} Weight8
uint16 {2} Tu
uint16 {2} Tv
uint16 {2} Normal X
uint16 {2} Normal Y
uint16 {2} Normal Z
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x04)
uint16 {2} Tu
uint16 {2} Tv
byte {1} Colour R
byte {1} Colour G
byte {1} Colour B
byte {1} Colour A
uint16 {2} Normal X
uint16 {2} Normal Y
uint16 {2} Normal Z
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x08)
Unknown Unknown Looks to do vertex compression near end of file, method is unknown to me
Vertex Buffer (if Object Flag && 0x000F = 0x09)
byte {1} Weight
byte {1} Weight2
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x0A)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x0B)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
byte {1} Weight5
byte {1} Weight6
byte {1} Weight7
byte {1} Weight8
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x0C)
byte {1} Weight
byte {1} Weight2
uint16 {2} Unknown
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x0D)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
uint16 {2} Unknown
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Vertex Buffer (if Object Flag && 0x000F = 0x0E)
byte {1} Weight
byte {1} Weight2
byte {1} Weight3
byte {1} Weight4
byte {1} Weight5
byte {1} Weight6
byte {1} Weight7
byte {1} Weight8
uint16 {2} Unknown
uint16 {2} Tu
uint16 {2} Tv
byte {1} Normal X
byte {1} Normal Y
byte {1} Normal Z
byte {1} Normal W
uint16 {2} Vertex X
uint16 {2} Vertex Y
uint16 {2} Vertex Z
Face Buffer (For Number of Faces)
uint16 {2} Face
Material Table
uint32 {4} Diffuse Map (Hashed Texture Name)
uint8 {1} Unknown
uint8 {1} Unknown
uint8 {1} Unknown
uint8 {1} Unknown
uint32 {4} Colour R
uint32 {4} Colour G
uint32 {4} Colour B
float {4} Specular Power
Skinning Table
uint16 {2} Unknown
uint16 {2} Bone Count
uint8 {x} Bone Number For Bone Count (Max 8)