- Home /
Why does inverting two components of a normal break them?
I have a tool that is creating a mesh from existing data. This data was created in 3DS Max which uses a right-handed Z-up coordinate system.
When I import the vertices (and normals), I swap the Z & Y components then mirror (invert) the points along the X and Z axis. This works fine with the positions, but the normals become distorted (see the image below).
I cannot see why this is. I have not adapted any transforms or anything else that could be deforming the mesh incorrectly, these are just arrays of absolute positions in space.
If I do not invert the X component, the normals display correctly (although my model is mirrored, and I must apply a scale of [-1,1,1] to have it display correctly). Further, if I do not invert the Z component, but instead apply a scale of [1,1,-1], the model also displays correctly.
This last part confuses me the most - inverting the last component and multiplying by a transform scales it negatively, are equivalent are they not? Why can I invert one component and have the normal work, but not two? What have I missed?
(edit: note the teapot is meant to be tapered, so I can tell what direction its facing all axes) ![alt text][1] [1]: /storage/temp/24054-teapot.jpg
I used to have issues like this with Blender imports, no suggestion on how to fix them ins$$anonymous$$d lesson learned: on Blender FBX EXPORT, set the Y/Z "stuff" to be how Unity expects them and all is well. If you don't get a better Answer, something to try in the meantime...
@getyour411 this is a reply to your comment below (I cannot add a comment to the answer post) - I am trying to accept the answer but it says I do not have permission and must login as another user! (my rep isnt high enough to accept my own answer, perhaps?) Should I convert it to a CW? Or should someone else put the answer down under their name and I can accept that one?
Answer by sebj · Mar 22, 2014 at 11:40 PM
A post on this thread prompted me to find the answer: if you want to do this transformation you have to invert the winding order! The coordinate system change is working now.
Good find, tick the Accept this answer below the thumbs!
Your answer
