View Single Post
Old 05-23-2012, 09:42 AM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
Join Date: Jun 2007
Location: Dallas, TX
Posts: 9,444

The mdm format is below but it is probably easier to write out to our skl format and then use our skelConvert tool in the SDK. Skelout is a relatively simple text format.

Mdm format:

int32 identifier
int32 version;
int32 numSurfaces
int32 numTris
int32 numVerts
int32 surfacesOffset
int32 trisOffset
int32 vertsOffset
int32 weightsOffset
int32 collapseMappingsOffset

For all of the surfaces:

int32 surfaceNumber
int32 numVerts
int32 numTris
int32 vertsOffset
int32 trisOffset
int32 collapseMappingsOffset

For all of the tris:

int32 vertIndexes[ 3 ]

For all of the verts:

float32 u
float32 v
Vector3 normal
int32 numBones
int32 firstBone

For all of the vert/bone info

int32 boneIndex
Vector3 vertOffset
float32 boneWeight

Collapse mappings for each surface (these are the order to lose verts in the poly reduction stuff)

int32 vertIndex
Steven Peeler
Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, & Drox Operative 2
Reply With Quote