PDA

View Full Version : XFile vertex format


feelite
10-15-2004, 01:45 PM
hi

i'm new to programming with Xfile format, but is there a programmatic way to find out the vertex format of the vertices in an Xfile exported from Maya?

I know of a Mesh.VertexFormat available from direct3d, but it gives 274, meaning {none, texture1, normal} and i assumed it to be CustomVertex.PositionNormalVertex.

However, a part of the XFile shows is as follows

Frame Wall_Front {


FrameTransformMatrix {
25.000000,0.000000,0.000000,0.000000,0.000000,10.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,5.000000,-12.000000,1.000000;;
}

Mesh Wall_FrontShape {
24;
-0.500000;-0.500000;0.500000;,
0.500000;-0.500000;0.500000;,
-0.500000;0.500000;0.500000;,
0.500000;0.500000;0.500000;,
-0.500000;0.500000;-0.500000;,
0.500000;0.500000;-0.500000;,
-0.500000;-0.500000;-0.500000;,
0.500000;-0.500000;-0.500000;,
-0.500000;0.500000;0.500000;,
0.500000;0.500000;0.500000;,
-0.500000;0.500000;-0.500000;,
0.500000;0.500000;-0.500000;,
-0.500000;-0.500000;-0.500000;,
0.500000;-0.500000;-0.500000;,
0.500000;-0.500000;0.500000;,
-0.500000;-0.500000;0.500000;,
0.500000;-0.500000;0.500000;,
0.500000;-0.500000;-0.500000;,
0.500000;0.500000;-0.500000;,
0.500000;0.500000;0.500000;,
-0.500000;-0.500000;-0.500000;,
-0.500000;-0.500000;0.500000;,
-0.500000;0.500000;0.500000;,
-0.500000;0.500000;-0.500000;;
6;
4;2,3,1,0;,
4;4,5,9,8;,
4;6,7,11,10;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;

MeshNormals {
6;
-1.000000;0.000000;0.000000;,
0.000000;-1.000000;0.000000;,
0.000000;0.000000;-1.000000;,
0.000000;0.000000;1.000000;,
0.000000;1.000000;0.000000;,
1.000000;0.000000;0.000000;;
6;
4;3,3,3,3;,
4;4,4,4,4;,
4;2,2,2,2;,
4;1,1,1,1;,
4;5,5,5,5;,
4;0,0,0,0;;
}

MeshTextureCoords {
24;
1.000000;1.000000;,
0.000000;1.000000;,
1.000000;0.000000;,
0.000000;0.000000;,
1.000000;-1.000000;,
0.000000;-1.000000;,
1.000000;-2.000000;,
0.000000;-2.000000;,
1.000000;0.000000;,
0.000000;0.000000;,
1.000000;-1.000000;,
0.000000;-1.000000;,
1.000000;-2.000000;,
0.000000;-2.000000;,
0.000000;-3.000000;,
1.000000;-3.000000;,
0.000000;1.000000;,
-1.000000;1.000000;,
-1.000000;0.000000;,
0.000000;0.000000;,
2.000000;1.000000;,
1.000000;1.000000;,
1.000000;0.000000;,
2.000000;0.000000;;
}

MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;

Material lambert3SG {
0.800000;0.800000;0.800000;1.000000;;
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"Concrete.bmp";
}
}
}

VertexDuplicationIndices {
24;
8;
0,
1,
2,
3,
4,
5,
6,
7,
2,
3,
4,
5,
6,
7,
1,
0,
1,
7,
5,
3,
6,
0,
2,
4;
}
}
}

it contains a section called, "FrameTransformMatrix", does this mean it's a Transformed vertex format?

thanks a lot!

feelite
10-16-2004, 03:53 PM
i've figured it out after reading online.

turns out that TransformedVertex is very different and I have yet to see it.

my code listing shows exactly PositionNormalTextured vertices. the FrameTransformMatrix is used to transform the mesh from local to world coordinates.

CGTalk Moderation
01-19-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.