Replies: 2 comments 5 replies
-
The mirroring causes the triangles orientation to flip. What you see is the inside of the mesh. You can try |
Beta Was this translation helpful? Give feedback.
2 replies
-
Probably not directly to the questions of @seblars or @wmcnCG but just in case someone else working in c++ finds this Discussion, this is the code I use to “evert” (turn inside-out) a mesh. I use it for meshes meant to be seen from the inside: // Flip orientation of each tri in a triangle mesh (destructively modifies).
void evertTriangleMesh(open3d::geometry::TriangleMesh& tri_mesh)
{
for (auto& triangle : tri_mesh.triangles_)
{
std::reverse(std::begin(triangle), std::end(triangle));
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to mirror transform the z-axis of a mesh. The transform works but I am getting weird lighting effect when I compute the vertex normals after the transform. It appears that the mesh is inside-out so the inside surface is reflective rather than the outside. I tried transforming the vertex normals without success. Is there another way? Example code below using version 0.17:
Beta Was this translation helpful? Give feedback.
All reactions