Hi everyone,
I have a question about cooking of triangle mesh. I have a .obj file, which includes 24 vertices and 12 faces. I imported the mesh and output all the vertices and faces, as shown below:
10 10 10
-10 10 10
10 -10 10
-10 -10 10
10 10 10
10 -10 10
10 10 -10
10 -10 -10
10 10 10
10 10 -10
-10 10 10
-10 10 -10
-10 -10 -10
-10 10 -10
10 -10 -10
10 10 -10
-10 -10 -10
10 -10 -10
-10 -10 10
10 -10 10
-10 -10 -10
-10 -10 10
-10 10 -10
-10 10 10
0 1 2
3 2 1
4 5 6
7 6 5
8 9 10
11 10 9
12 13 14
15 14 13
16 17 18
19 18 17
20 21 22
23 22 21
After cooking the triangle mesh, I output the vertexBuffer and the indexBuffer, which are shown as below:
10 10 10
-10 10 10
10 -10 10
-10 -10 10
10 10 10
10 -10 10
10 10 -10
10 -10 -10
10 10 10
10 10 -10
-10 10 10
-10 10 -10
-10 -10 -10
-10 10 -10
10 -10 -10
10 10 -10
-10 -10 -10
10 -10 -10
-10 -10 10
10 -10 10
-10 -10 -10
-10 -10 10
-10 10 -10
-10 10 10
15 14 13
12 13 14
16 17 18
19 18 17
7 6 5
23 22 21
0 1 2
20 21 22
8 9 10
11 10 9
3 2 1
4 5 6
The order of the faces are different. For example, the first face was (0, 1, 2), however, after cooking, the first face is (15, 14, 13).
Is it real, or did I do something wrong?
Thanks for your help!