Sign in to follow this  
zukisan

[.net] Save .x MeshNormals error

Recommended Posts

zukisan    100
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;;[/color]

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;;[/color]
}

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[/color];;

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;[/color];
}


How can I set Mesh and Meshnormal information??

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this