Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove occluded faces on a closed mesh

I need to remove some hidden faces that are inside a closed triangular mesh. I've found a way to do it using MeshLab, but there are two problems: 1) the article says that it could fail in some cases (can you image in which cases?) and 2) I would like to do it programatically (do you know of any existing implementation?). I don't even know the name of this kind of simplification filters.

I would really appreciate any hint.

like image 991
Federico Avatar asked Apr 15 '11 14:04

Federico


1 Answers

The most obvious (but almost certainly not the most efficient one) algorithm to do that is as follows:

  1. Consider one triangle in the mesh. Draw three lines between the three vertices of the triangle and camera point. (If the camera is infinitely far away just consider the direction of viewpoint).
  2. If all the drawn lines intersect with triangulated surface, do not display the triangle under consideration. If only some of them do, partially show the triangle.
  3. Repeat for all the triangles in the mesh.
like image 132
grzkv Avatar answered Oct 29 '22 02:10

grzkv