Hmmm... the only thing that did was add the OGRE export option to Milkshape. I tried making a simple cube and exporting it as a .mesh file and Milkshape crashed and the .mesh file was not exported.
I re-booted my computer and using brute force tactics

I managed to export what I thought was a cube.mesh file (about 1K), but Purebasic was unable to read and kept giving the error "Terminate!" from C++ library.
Worse, if you open the .mesh file with notepad, it's not like the .x format where you can see the vertices data.
Basically, the most promising avenue at this time seems to be the file called MeshManual.pb which shows how to create a .mesh file by reading in data statements. We may be able to write a .mesh editor that exports these data statements. These data statements look alot like a .x file that you open with notepad. For example, this is the data of a cube.mesh file from the MeshManual file:
Code: Select all
CubeVertices:
Data.f 0, 0, 0 ; Vertex index 0
Data.f 1, 0, 0 ; Vertex index 1
Data.f 1, 0, 1 ; Vertex index 2
Data.f 0, 0, 1 ; Vertex index 3
Data.f 0, 1, 0 ; Vertex index 4 - Note: exactly the same as above, but with 'y'
Data.f 1, 1, 0 ; Vertex index 5
Data.f 1, 1, 1 ; Vertex index 6
Data.f 0, 1, 1 ; Vertex index 7
CubeFacesIndexes:
Data.w 0, 1, 2 ; bottom face (clockwise as it's reversed...)
Data.w 2, 3, 0
Data.w 6, 5, 4 ; top face
Data.w 4, 7, 6
Data.w 1, 5, 6 ; right face
Data.w 6, 2, 1
Data.w 7, 4, 0 ; left face
Data.w 0, 3, 7
Data.w 5, 1, 0 ; back face
Data.w 0, 4, 5
Data.w 2, 6, 7 ; front face
Data.w 7, 3, 2
CubeTextureCoordinates:
Data.f 0 , 0.33 ; Vertex 0
Data.f 0.33, 0.33 ; Vertex 1
Data.f 0.33, 0 ; Vertex 2
Data.f 0, 0 ; Vertex 3
Data.f 0.66, 1 ; Vertex 4
Data.f 1, 1 ; Vertex 5
Data.f 1, 0.66 ; Vertex 6
Data.f 0.66, 0.66 ; Vertex 7
And here is the data of a cube.x:
Code: Select all
xof 0303txt 0032
template XSkinMeshHeader {
<3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
WORD nMaxSkinWeightsPerVertex;
WORD nMaxSkinWeightsPerFace;
WORD nBones;
}
template VertexDuplicationIndices {
<b8d65549-d7c9-4995-89cf-53a9a8b031e3>
DWORD nIndices;
DWORD nOriginalVertices;
array DWORD indices[nIndices];
}
template SkinWeights {
<6f0d123b-bad2-4167-a0d0-80224f25fabb>
STRING transformNodeName;
DWORD nWeights;
array DWORD vertexIndices[nWeights];
array FLOAT weights[nWeights];
Matrix4x4 matrixOffset;
}
Frame Scene_Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Box01 {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh {
24;
-0.700000;1.125000;-1.300000;,
-0.700000;-1.475000;-1.300000;,
1.725000;1.125000;-1.300000;,
1.725000;-1.475000;-1.300000;,
1.725000;1.125000;-1.300000;,
1.725000;-1.475000;-1.300000;,
1.725000;1.125000;1.300000;,
1.725000;-1.475000;1.300000;,
1.725000;1.125000;1.300000;,
1.725000;-1.475000;1.300000;,
-0.700000;1.125000;1.300000;,
-0.700000;-1.475000;1.300000;,
-0.700000;1.125000;1.300000;,
-0.700000;-1.475000;1.300000;,
-0.700000;1.125000;-1.300000;,
-0.700000;-1.475000;-1.300000;,
-0.700000;1.125000;-1.300000;,
1.725000;1.125000;-1.300000;,
-0.700000;-1.475000;-1.300000;,
1.725000;-1.475000;-1.300000;,
-0.700000;1.125000;1.300000;,
1.725000;1.125000;1.300000;,
-0.700000;-1.475000;1.300000;,
1.725000;-1.475000;1.300000;;
12;
3;0,2,1;,
3;1,2,3;,
3;4,6,5;,
3;5,6,7;,
3;8,10,9;,
3;9,10,11;,
3;12,14,13;,
3;13,14,15;,
3;20,21,16;,
3;16,21,17;,
3;18,19,22;,
3;22,19,23;;
MeshNormals {
24;
0.000000;0.000000;-1.000000;,
0.000000;0.000000;-1.000000;,
0.000000;0.000000;-1.000000;,
0.000000;0.000000;-1.000000;,
1.000000;0.000000;0.000000;,
1.000000;0.000000;0.000000;,
1.000000;0.000000;0.000000;,
1.000000;0.000000;0.000000;,
0.000000;0.000000;1.000000;,
0.000000;0.000000;1.000000;,
0.000000;0.000000;1.000000;,
0.000000;0.000000;1.000000;,
-1.000000;0.000000;0.000000;,
-1.000000;0.000000;0.000000;,
-1.000000;0.000000;0.000000;,
-1.000000;0.000000;0.000000;,
0.000000;1.000000;0.000000;,
0.000000;1.000000;0.000000;,
0.000000;-1.000000;0.000000;,
0.000000;-1.000000;0.000000;,
0.000000;1.000000;0.000000;,
0.000000;1.000000;0.000000;,
0.000000;-1.000000;0.000000;,
0.000000;-1.000000;0.000000;;
12;
3;0,2,1;,
3;1,2,3;,
3;4,6,5;,
3;5,6,7;,
3;8,10,9;,
3;9,10,11;,
3;12,14,13;,
3;13,14,15;,
3;20,21,16;,
3;16,21,17;,
3;18,19,22;,
3;22,19,23;;
}
VertexDuplicationIndices {
24;
20;
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
12,
6,
13,
7;
}
}
}
}
}
Look at the Mesh Normals section above, it's practically identical to the Purebasic code, here are both the sections: first Purebasic:
Code: Select all
Data.w 0, 1, 2 ; bottom face (clockwise as it's reversed...)
Data.w 2, 3, 0
Data.w 6, 5, 4 ; top face
Data.w 4, 7, 6
Data.w 1, 5, 6 ; right face
Data.w 6, 2, 1
Data.w 7, 4, 0 ; left face
Data.w 0, 3, 7
Data.w 5, 1, 0 ; back face
Data.w 0, 4, 5
Data.w 2, 6, 7 ; front face
Data.w 7, 3, 2
And now the .x code:
Code: Select all
3;0,2,1;,
3;1,2,3;,
3;4,6,5;,
3;5,6,7;,
3;8,10,9;,
3;9,10,11;,
3;12,14,13;,
3;13,14,15;,
3;20,21,16;,
3;16,21,17;,
3;18,19,22;,
3;22,19,23;;