Forum: Archive RSS
MDL Information

Announcement

2008-11-05, 14:54 by Keshire
Rules for posting on this site.
Follow them or have your posting rights removed or be banned.

[cut=Full List Of Rules]*  If a topic makes no sense to you, do not ask broad questions about it.  We have a lot of developer posts that will make no sense to someone who doesn't know how to program or has not taken the time to explore the game files.


*  All modifications we release for the xbox will require a modified xbox.  Ask for instruction and then tell us you don't have one will result in banning/deletion of all posts for failure to read instructions.  THERE WILL BE NO SAVES ON THIS SITE SO DO NOT REQUEST THEM.


*  We do not endorse pirating.  Suggesting or asking for such will get you banned.  If you like a game BUY IT.  People worked hard to make something to entertain you, it's the least you can do.  If you are caught without one of these you will be banned.


*  Posting of original game files is strictly prohibited.  If you have code to share post just the code you have made.  Only attach files if you have created an application or something similar that requires the attachment.  If you made many changes to a file but did not change ALL of it then post a PPF or something similar to avoid posting any original code at all.  Do not link to original files either.  Either way it's just the same as posting them here.


*  Harassing admins/moderators through PM/Email because of your own inability to work things out with other people in the forums will result in loss of PM an removal of ability to post.


*  Harassing admins/moderators through PM/Email because of your own inability to read posts and stickies in the forums with any compitence will result in loss of PM an removal of ability to post.


*  Harassing or just flooding a topic/person because you are too lazy to use search will get your posting rights removed.  Search exists for a reason and we won't deal with people that constantly ask for things that are easy to find with search.


*  Public bashing of other members will get your posts removed.  If it is done repeatedly you will get your account banned.


*  Posting a reply to merely say you don't know or you also want to know something is a waste of space and all of our collective time (assuming you weren't asked directly, but if you were it probably should have been done in PM).  Repeated offenders will get their posting rights removed.

*  Do not cross post questions/requests in forums.  Pick the appropriate forum and post it there.  People read in all of the forums and don't need to see the extra spam.


*  Everything on this site is provided AS IS.  If you use a tool that someone wrote here and it crashes your computer, we don't care.  The programmer should be informed with as much information as you can provide in order to prevent that from happening again though.

*  Being an open forum, try to contribute to it.  As in by helping crack file formats or developing new tools or game modifications.  Leeches are never appreciated.  Especially when they are ungrateful for the work that other people put into doing something for them.  Being ungrateful is a very quick path to being banned.


*  Lack of acting like a mature person or inability to type in proper english or something close to it will not be tolerated (i.e. l33t,ALL CAPS, or IM shorthand).


Basically, this is a technically based Fable modding site.  This is NOT a playground. [/cut]

If you have a problem with these rules, don't come here.

Failure to not read the stickies on forums (like this one) is not an excuse.  Failure to read this post is also not an excuse.
Avatar
Keshire Administrator #1
Member since Nov 2008 · 29 posts
Group memberships: Administrators, Members
Show profile · Link to this post
Subject: MDL Information
Since Hunter asked me about it.

I've mentioned before that MDL is a pretty standard and generic format. There may be differences from version to version and game to game, but it's going to be roughly the same.

Anyways it looks like they used the SoftImageXSI SDK to make a few changes to the format itself. Plus like all the other files they stripped the headers.

Anyways, I've seen reference to polymsh and grid mesh types. I guess they forgot to rename those submeshes....

I'll take a closer look and see if I can write up a spec within the next few days.

For a good example of what I'm talking about:
File: LucienGuard_Collar.mdl
MeshName: polymsh_detached1
http://www.kxcad.net/Softimage_XSI/Softimage_XSI_Documenta…
Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
This post was edited on 2008-12-15, 06:00 by Keshire.
TodX Administrator #2
Member since Oct 2008 · 16 posts · Location: San Diego
Group memberships: Administrators, Members
Show profile · Link to this post
Took a whack at the models.
This is based on a clothing item/non-static mesh.  I know the static meshes have diff format, at least for verts.

*Updated: most of the layout is done.  Now need to make sense of unknowns.  HW chokes on these structures due to zstring bugs.*
Requires HexWorkshop 6: But doesn't working either way

#include "standard-types.hsl"

#pragma byteorder(big_endian)
#pragma maxarray(65535)

struct BoneEntry
{
    zstring    BoneName;
    DWORD    BoneID;
}BoneEntry;

struct BoneTransform
{
    DWORD Unk1[11];
}BoneTransform;

struct Material
{
    zstring TextureName;
    zstring SpecularMapName;
    zstring NormalMapName;
    char Unk1[3];
    float Unk2[3];
}Material;

struct Vertex
{
    float Unk1[3];
    DWORD Unk2[3];
    float Unk3;
}Vertex;

struct Unk16
{
    float Unks[4];
}Unk16;

struct Mesh
{
    DWORD Unk1;
    zstring MeshName;
    float Unk2[2];
    char Unk3[21];
    float Unk4;
    DWORD Unk5[3];
    DWORD MaterialCount;
    Material Materials[MaterialCount];
   
}Mesh;

struct SubMeshDesc
{
    DWORD Unk1;
    char Unk2;
    DWORD Unk3[3];
    float Unk4[6];
}SubMeshDesc;

struct MeshBuffer
{
    DWORD Unk8[2];
    DWORD SomeCount1;
    DWORD TriangleStripLength;
    DWORD VertexCount;
    DWORD SubMeshCount;
    SubMeshDesc SubMeshes[SubMeshCount];
    Vertex Vertices[VertexCount];
    WORD Faces[TriangleStripLength];
    Unk16 Unk16[VertexCount];
}MeshBuffer;

struct MDL_File
{
    DWORD Unk1[8];
    DWORD BoneCount;
    BoneEntry Bones[BoneCount];
    DWORD BoneTransformCount;
    BoneTransform BoneTransforms[BoneTransformCount];
    float Unk2[10];
    DWORD MeshCount;
    DWORD Unk3[2];
    char Unk4[13];
    DWORD Unk5[5];
    DWORD Unk6Count;
    float Unk6s[Unk6Count];
    DWORD Unk7;
    Mesh Meshes[MeshCount];
    MeshBuffer MeshBuffers[MeshCount];
}MDL_File;
This post was edited on 2009-06-20, 06:42 by TodX.
TodX Administrator #3
Member since Oct 2008 · 16 posts · Location: San Diego
Group memberships: Administrators, Members
Show profile · Link to this post
I've been looking at the vertex format, and the one above is definitely not correct.

I can't quite make out what they are doing in the vert data.  I've managed to find the bone indices and weights, but that's about it.  I've tried to read the data as 16bit floats and I can't seem to get a definite match on anything.  I still need to try packed 10bit data, but either way I can't seem to make any sense of it yet.

I wouldn't mind a little help here if anyone could take a look.  (Like, maybe Kesh? =)

Once we bang this out, I'll start on a 3DS Max import plugin so we can play with the models.
LittleCodingFox #4
Member since Nov 2008 · 34 posts
Group memberships: Members
Show profile · Link to this post
TodX, can you at least verify if the vertex element data uses the same size as your vertex specs' size?
TodX Administrator #5
Member since Oct 2008 · 16 posts · Location: San Diego
Group memberships: Administrators, Members
Show profile · Link to this post
I wouldn't have posted it if I hadn't.
LittleCodingFox #6
Member since Nov 2008 · 34 posts
Group memberships: Members
Show profile · Link to this post
Quote by TodX on 2009-06-27, 19:18:
I wouldn't have posted it if I hadn't.

Touché. Still, i have Windows 7 and Hex Workshop 6, and i'm unable to use your specs because Hex Workshop just blocks and keeps adding more and more memory, reaching over 700MB of RAM until i terminate it's process. Got any idea of what i should do? Is that even "normal"?
Avatar
JohnDoe Moderator #7
User title: Community Pet
Member since Nov 2008 · 19 posts · Location: Texas
Group memberships: Global Moderators, Members
Show profile · Link to this post
Quote by LittleCodingFox on 2009-06-29, 04:25:
Is that even "normal"?
HW5 and HW6 has some issues with zstrings, it seems HW6 is worse.
Okay, sorry, lame movie reference, I just had to.

But yea, TodX had the same problem. As for what to do about it, well, I'd suggest writing a parser. ;)
An optimist is a pessimist in the making.
This post was edited on 2009-07-02, 03:52 by JohnDoe.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Not logged in. · Lost password · Registration disabled
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 303.9 ms (112.1 ms) · 55 database queries in 259.3 ms
Current time: 2024-11-14, 02:11:51 (UTC -07:00)