Quantcast
Channel: Latest Questions by sebj
Viewing all articles
Browse latest Browse all 12

Why does inverting two components of a normal break them?

$
0
0
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

Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>