Original Post
I'm creating an exportor that takes data from one type of mesh file and and procuces an x file from that. However, it seems the x, y and z and in a different order in the other file than to x,y and z. It might be right hand coordinate system or something. It shows up fime in my viewer because I can adjust the culling or turn it off altogether, but when I load the produced x files in MeshView they appear inverted and you only see the faces that are pointed away from you. What I did was, at first the character I exported was showing up backwards and lying down, so I swapped the x, y and z coordinates around so he was stood up and facing forward. I'd had problems with the culling and I didn't notice I'd put the camera at x=1 instead of z=1, so when I fixed that, my character was facing backwards again. So I multiplied the y coordinates by -1.0 to fix that, but that caused I noticed the problem with the normals in MeshView. The swapping around and inverting of of the x, y and z coordinates gets done before the normals are calculated and saving to the x file happens last so I don't know what the problem is. Is there an automatic way of setting the images orientation for saving that doesn't cause the normals to invert. I want to save the orientation so it's starting from upright and facing forward before any transformations are applied. EDIT: I managed to get part way by myself. I think I need to reverse the triangle winding order, but I just need to find how to do that. It's in a mesh so I don't know if I'd need to change the indices or the vertices. It's only simple meshes I'm dealing with for now so vertices and indeces are all it has. What would be the fastest way if I want the saved mesh file to include the reversed order. [Edited by - CodeReaver on January 25, 2006 6:59:35 AM]