MDN

From mgsdevwiki
Jump to: navigation, search

MDN files are the primary model format used in MGS4. They contain the standard information you'd expect for a model file (vertex buffer etc) and also information for which texture links to the model.

Format Specifications

Metal Gear Solid 4

Header
uint 32 {4} Header
uint 32 {4} Filename
uint 32 {4} Count of Bones
uint 32 {4} Count (Unknown)
uint 32 {4} Count of Vertex Index
uint 32 {4} Count of Face Index
uint 32 {4} Count of Vertex Definition
uint 32 {4} Count (Unknown)
uint 32 {4} Count of Material
uint 32 {4} Count of Bone Pallet
uint 32 {4} Offset of Bones
uint 32 {4} Offset (Unknown)
uint 32 {4} Offset of Vertex Index
uint 32 {4} Offset of Face Index
uint 32 {4} Offset of Vertex Definition
uint 32 {4} Offset (Unknown)
uint 32 {4} Offset of Material
uint 32 {4} Offset of Bone Pallet
uint 32 {4} Offset of Vertex Buffer
uint 32 {4} Size of Vertex Buffer
uint 32 {4} Offset of Face Buffer
uint 32 {4} Size of Face Buffer
uint 32 {4} null Bytes
uint 32 {4} Filesize
Boundary
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
Bones (For Count of Bones)
uint 32 {4} Name
uint 32 {4} y0
uint 32 {4} Parent
uint 32 {4} w0
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
Unknown (2nd in count/offset)
uint 32 {4} Name
uint 32 {4} null Bytes
uint 32 {4} Parent
uint 32 {4} w0
Vertex Index (For count of vertex index)
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Count of Face Section
uint 32 {4} Start of Face Section
uint 32 {4} Vertex ID
uint 32 {4} Bone Pallet ID
uint 32 {4} Count of Vertex
uint 32 {4} null Bytes
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 count of face index)
uint 16 {2} Type
uint 16 {2} Count
uint 32 {4} Offset
uint 32 {4} Group
uint 16 {2} Start of Vertex
uint 16 {2} Length of Vertex
Vertex Definition (For count of vertex definition)
uint 32 {4} null Bytes
uint 32 {4} Definition Count
uint 32 {4} Size
uint 32 {4} Start
[uint 8 {1}] (variable size array) Definition
[uint 8 {1}] (variable size array) Position
Unknown (6th in count/offset)
uint 32 {4} Size
uint 32 {4} Name
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
uint 32 {4} Unknown
half float {2} Unknown X
half float {2} Unknown Y
half float {2} Unknown Z
half float {2} Unknown W
half float {2} Unknown X
half float {2} Unknown Y
half float {2} Unknown Z
half float {2} Unknown W
half float {2} Unknown X
half float {2} Unknown Y
half float {2} Unknown Z
half float {2} Unknown W
half float {2} Unknown X
half float {2} Unknown Y
half float {2} Unknown Z
half float {2} Unknown W
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
Material Index (for each material index)
uint 32 {4} Name
uint 32 {4} null Bytes
float {4} T
float {4} U
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
uint 32 {4} null Bytes
Bone Pallet (for each bone pallet)
uint 32 {4} Unknown
uint 16 {2} Count
uint 16 {2} null Bytes
[uint 8 {1}] (variable size array (for each count)) Bone ID
Vertex Buffer (for each verticies)
float {4} Mesh Buffer
half float {2} Texture Buffer
uint 8 {1} Weight Buffer
uint 8 {1} Colour Buffer
uint 8 {1} Bone Buffer
uint 8 {1} Normal Buffer
Vertex Buffer (for each face)
uint 16 {2} Face Buffer