![]() |
![]() |
![]() |
![]() |
![]() |
#1
|
|||
|
|||
![]() Hey Shadow
I'd like to possibly mod the models, and to convert them to Blender format. I've figured out some of the model file format: 1. Header 2. An unknown section (possibly bones but haven't encountered a full section yet) 3. Polygon section 4. Info about points: u,v coords and normal 5. Points 6. Unknown optional section. 32 bits per point. Could you fill in the missing gaps? Once I figure this section out I'll also check out the animation file format, so if you could provide the specs there it'd make things easier ![]() Last edited by Bluddy : 05-21-2012 at 04:51 PM. |
#2
|
|||
|
|||
![]() OK I figured out all the formats except for the unknown 2nd section in the model file and the optional last section in the same file.
|
#3
|
||||
|
||||
![]() Which file type are you looking at (skl, mda, mds, mdm)?
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#4
|
|||
|
|||
![]() I got how the mda and mds files work, so my questions are about the mdm file.
1. Looking at the mdm files, the first section after the header does nothing in files for objects (even ones with skeletons) but does have a little bit of content in files for more complex things like monsters. This is the section before the polygons are laid out, and I can't figure out what it does. It seems to have some offsets and some other numbers. 2. Then, the mdm file has another optional section that's only available for complex objects. This section appears in the end, and there's a uint32 number for every vertex in the object. Not sure what this does either. Those are the main things I couldn't get, but there are 2 more minor things: 3. The section that I believe has U,V and normal values per vertex has the format (I think) {float u; float v; float norm_x; float norm_y; float norm_z; uint32 number; uint32 count} where number is usually 1, 2 or 3, and count is a count of vertices that skips number from the last count. Not sure what the number and the count are for. 4. The vertex section has the format {uint32 surface; float x; float y; float z; float unknown;} and I'm not sure what unknown does. I think it's the vertex magnitude with respect to the surface but I'm not sure. |
#5
|
||||
|
||||
![]() 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 Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#6
|
|||
|
|||
![]() Awesome -- thanks, it filled in the gaps I had.
|
#7
|
|||
|
|||
![]() BTW for poly reduction -- is that based on the 'low model' setting?
|
#8
|
||||
|
||||
![]() Yes. You can probably give a 0 as the offset and ignore the entire section though.
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#10
|
||||
|
||||
![]() Yeah, for Zombasite and Din's Legacy the vert info looks like this:
float32 u float32 v Vector3 normal Vector4 tangent int32 numBones int32 firstBone
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
![]() |
Thread Tools | |
Display Modes | |
|
|