![hero [bruce]](./images/smilies/bruceleeanim.gif)
Here is a 3D with .xmx format
Code: Select all
XMX-Files
==============================
Byte { 16 } - Header
{
Byte { 8 } - File Identification ("LDMXXOBX") -> "XboxModel"
Dword { 4 } - Number Of Sections (see below)
Dword { 4 } - File Size - 16 byte (Header Size)
}
Byte { x } - Section
{
Byte { 4 } - Section Name
if Section Name == "LEDM" -> "Model"
then
{
Byte { 41 } - Unknown
Dword { 4 } - Vertex Count (see below)
}
Byte { x } - Unknown
}
To get the vertices, just read the next bytes till there comes "XTRV" ("Vertex"). When you reached this section, the data is:
Byte { x } - Section
{
Byte { 4 } - Section Name
if Section Name == "XTRV" -> "Vertex"
then
{
Float { 4 } - Vertex X
Float { 4 } - Vertex Y
Float { 4 } - Vertex Z
Float { 4 } - Unknown
Float { 4 } - UV X
Float { 4 } - UV Y
}
}
Code: Select all
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
010D0 02 00 00 00 00 00 00 00 4D 4E 58 54 56 50 52 47 ........MNXTVPRG
010E0 8C 01 00 00 00 00 00 00 >66 0C 00 00 00 00 00 00 -- vertex count
010F0 >2C 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- face indices count