HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

MDX Format

06-16-2003, 05:11 PM#61
Guest
some update of my work:
-the the mdx to mdl exporter works now (its probably because of the use of the old war3.exe)
-so its imho kind of useless to wirte an mdx importer/exporter, because mdl is ascii and quite self describing
-i am now trying to write an mdl importer /exporter but have some problems with animations and the bone transformationswithin 'em
07-10-2003, 01:31 AM#62
iloseall
MDX Format
Where can I find the MDX file specification so far?
Where can I get the example source code?


Thanks a lot!
07-12-2004, 02:15 PM#63
glossolalie
Hi,
I write something to read many war3 files under linux, as far as i am i read .mpq, .blp, and i write something for the .mdx.
Thank for providing some spec about .mdx format.
But i have question about :
got the vertex, think that i may use PVTX to use them as triangle.
I think GNDX vertexgroup must give group of vertex such as hand, head ...;
MTGC give the length of those groups....
But what are those matrix???
any help will be welcome, if you are interseted on something working under linux let me know...


--PVTX // [Faces]
long ntris;
short triangles[ntris];
--GNDX // [VertexGroup]
long nvgrps;
byte vertexGroups[nvgrps];
--MTGC // [Groups]
long nmtrcs; // GroupCount is an array of lengths
long groupCount[nmtrcs]; // for each group.
--MATS // [Matrices]
07-15-2004, 07:25 AM#64
Nub
-----
got the vertex, think that i may use PVTX to use them as triangle.
I think GNDX vertexgroup must give group of vertex such as hand, head ...;
MTGC give the length of those groups....
But what are those matrix???
----

the MATS list is the actual data.

MTGC.groupCount[] is a list of numbers,
MATS.matrices[] is a list of values.

for instance, if groupCount[] is {2,3,5,3,2}
and matrices[] is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}

then the actual group list is as follows:

{1, 2}
{3, 4, 5}
{6, 7, 8, 9, 10}
{11, 12, 13}
{14, 15}

Note that if you add the numbers in groupCount[], it gives you the number of values in matrices[].

I hope this answers your question. Unfortunately I don't understand the function of this matrix, I just found the pattern in the data. I could appreciate an explanation myself. Let me know how the development goes, I have lots of Java source for loading MDX files.

http://www.jcampbell.net/jimmy/mdlxdata.txt is the latest version of the spec.
01-11-2005, 04:41 AM#65
leedgitar
In the version of mdxdata.txt I got from this forums, the size of the ASCII name for the MODL section is incorrectly listed as 0x150. It should be 0x50 (80 characters).