FULL EDIT... worked little on the mesh08:
Code: Select all
[filemask="*.msh"]//mesh08 format
struct mesh08
{
cstr [len=6] ID;
i16 numMesh;
child mshblock [count=numMesh];
}
struct mshblock
{
cstr [len=100] meshName;
cstr [len=100] boneName;
repeat 3
{
//D3DXVECTOR4 x y z w
float material_x;
float material_y;
float material_z;
float material_w;
float material_x;
float material_y;
float material_z;
float material_w;
float material_x;
float material_y;
float material_z;
float material_w;
float material_x;
float material_y;
float material_z;
float material_w;
}
i16 unk1;
i16 faces;
i16 bones;
cstr [len=200] texName;
i32 x;
double x;
//i32 x;
double x;
//i32 x;
float x;
i32 x;
i32 x;
i32 x;
i32 x1;//looks like always 1
i32 somevalue;//changes when there is actual vert. data
i32 x2;//looks like always 1
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i32 x;
i16 x;
i8 x;
i16 numVerts;
repeat numVerts //custom vertex format
{
//D3DXVECTOR4 x y z w
float Vertex_x;
float Vertex_y;
float Vertex_z;
float Vertex_w;
//
float normal_x;
float normal_y;
float normal_z;
float normal_w;
//uv map
float tu1;//0.0f
float tv1;//1.0f
float tu2;//0.0f
float tv2;//0.0f
float tu3;//1.0f
float tv3;//1.0f
float tu4;//1.0f;
float tv4;//0.0f
}
i16 numIdx;
repeat numIdx
{
i16 idxBuff;
}
i16 numBones;
if (numBones > 0)
{
repeat numBones
{
i32 val;
cstr [len=100] meshName;
cstr [len=300] unk7;
}
}
}
The structorian strs.
just a few remaining unknown values i couldn't really make out yet. It seems to be a multitexture (r uv-s : diffuse, alpha, normal, spectacular).
unk5 is always 00 00 as far as i noticed.
There are some unknown values left. also - whats the actual material_x etc for? looks like kind of bone related data? (not really sure ow bone weights etc are set in 3d files).
also the material part has the scale, position and angle info.
EDIT: updated the strs to match the rest of the mesh08 that has a kind of "bone" section.
Also, the reason many of the mesh08 wont load is the bone section and when the vertex value is 0 (particle/bone links or dummy) so the vertex and bugger values are 0, which breaks the script.
i don't know python. Could anyone update the script based off the info?