[.net] Save .x MeshNormals error

Started by
0 comments, last by gsamour 12 years, 8 months ago
Hi all,

I am trying to save a mesh in .x file, and the I wan to be able to load it.

The problem I have is that the meshnormals are being saved as 0 and the load crashes (if I manually modify the values, it works)

Here is how my x-file looks:


Mesh {
3;
0.000000;0.000000;0.000000;,
0.500000;1.000000;0.000000;,
1.000000;0.000000;0.000000;;
1;
3;[color="#ff0000"]0,0,0;;

MeshNormals {
3;
-0.707100;0.000000;-0.707100;,
0.000000;0.707100;-0.707100;,
0.707100;0.000000;-0.707100;;
1;
3[color="#ff0000"];0,0,0;;
}

and here how I modify it manually in txt so I force it work:


Mesh {
3;
0.000000;0.000000;0.000000;,
0.500000;1.000000;0.000000;,
1.000000;0.000000;0.000000;;
1;
[color="#ff0000"]3;0,1,2;;

MeshNormals {
3;
-0.707100;0.000000;-0.707100;,
0.000000;0.707100;-0.707100;,
0.707100;0.000000;-0.707100;;
1;
[color="#ff0000"]3;0,1,2;;
}


How can I set Mesh and Meshnormal information??
Advertisement
Can you post the code that saves a .x file?

This topic is closed to new replies.

Advertisement