Search code examples
graphicscomputational-geometrymeshmeshlabtrimesh

surface of mesh cannot be seen from outside, only from inside


Note that this question is not about particular software. Rather, question is about mesh visualization in general.

I have problem in visualizing a mesh file https://gist.github.com/HiroIshida/1ef3bc47e27b36e88890516e78b0a587

Although it seems that there is no holes inside mesh, mesh cannot be visualized properly by trimesh python library. In this case, the surface is supposed to be viewed from the outside because the camera is outside of the mesh, but the surface from the inside is visualized. (see the gif file below) From this visualization, we can observe that there is no holes.

enter image description here

This behavior is not trimesh specific. meshlab software also cannot visualize the mesh properly as below. In this case, from outside the surface is black-out, and can be seen properly only from inside.

enter image description here

My question: What's wrong with my mesh file?


Solution

  • The problem can be fixed by flipping the facet, i.e., by changing the order of vertex indices of each facet.