Quote: "MeshNormals {
8; // define 8 normals
0.333333;0.666667;-0.666667;,
-0.816497;0.408248;-0.408248;,
-0.333333;0.666667;0.666667;,
0.816497;0.408248;0.408248;,
0.666667;-0.666667;-0.333333;,
-0.408248;-0.408248;-0.816497;,
-0.666667;-0.666667;0.333333;,
0.408248;-0.408248;0.816497;;
12; // For the 12 faces,
3;0,1,2;, // define the normals
3;0,2,3;,
3;0,4,5;,
3;0,5,1;,
3;1,5,6;,
3;1,6,2;,
3;2,6,7;,
3;2,7,3;,
3;3,7,4;,
3;3,4,0;,
3;4,7,6;,
3;4,6,5;;
}
"
that's an example I ripped off from a site explaining the .x file format. So .x file format uses per-face/polygon format. kinda.
So basically you save all the different Normals you need, then go through all the faces and apply the appropriate normals.
It's pretty confusing at first. Because you can have as many normals as you want (let's you do smoothing groups, sort of) but you'll need to sort them out. Probably the easiest way for exporter is to save a normal for each vertex and not worry about making duplicates. then just write out the numbers of the vertices in a face, and you get the normals right too.
it is a bit trickier to calculate the vectors. Well, not exactly, as long as you know which way a face is looking. Basically those three values are just x/y/z values between 0 and 1.0. Simple as that. but you decide how you want to play them out. If you know the "direction", just point the object and get the x/y/z distances.
Keyboard not detected. Press F1 to continue.