![]() ![]() I think the text example is good one to exhibit “normal” behavior. If an arbitrary face is first picked and all other faces are oriented to match it, the above algorithm can be used to determine if this arbitrary face was wrongly oriented, and all faces can be reversed in such case. If the volume is negative the mesh is oriented inwards if positive the mesh is oriented outwards. The volume of all tetrahedrons are summed up. To know what side of the triangle’s plane the point is on the vector between the point and its projection onto the triangle’s plane can be compared to the triangle’s normal using dot multiplication. ![]() If the arbitrary point is in the front of the face the volume is regarded negative and if the point is at the back of the face the volume is regarded positive. in the bounding box center lowers the floating point precision problems. The point can in theory be anywhere but having it close to the other points, e.g. ![]() For each triangle the volume of a tetrahedron formed between the triangle and an arbitrary point is calculated. The volume of a closed oriented mesh can be calculated by iterating all its triangles. If the object is a solid (aka closed mesh) it is possible to extend the algorithm to not require a starting face with a correct orientation. Which brings us back to the question of when and how the texture was applied to the face.Įdit: on some further testing, it appears that this is true for any face, not just vertical. To avoid this you need a pre-reversed version of the texture to use for back sides. So, if you apply a texture image to both the front and back sides of a face, it will be reversed on the back side regardless of how you come to view that side - Reverse Faces just changes where the camera must be to see the flipped image. At least for vertical faces, that is, ones that contain the z axis, the image coordinates are left-right backward on the back side of the face! This causes a texture image applied to the back side to be left-right reversed, as the OP’s images illustrate. Unless a material has already been applied to both the front and back of a face, the un-altered side will still have the default material and that is what will show if the user clicks Reverse Faces, just as it would if you orbit to view the back side.īut perhaps the problem is due to a strange glitch (or maybe bug) in how faces handle UV coordinates for texture images mapped to faces. Hmm…on re-reading the original post, I see your point but I’m confused what the OP is really trying to accomplish. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |