移除闭合网格上被遮挡的面

发布于 2024-11-01 15:03:28 字数 270 浏览 5 评论 0原文

我需要删除封闭三角形网格内的一些隐藏面。我找到了一种使用 MeshLab 来做到这一点的方法,但有两个问题:1)文章说它在某些情况下可能会失败(你能想象在哪些情况下吗?)和2)我想以编程方式执行此操作(你知道任何现有的吗? 执行?)。我什至不知道这种简化过滤器的名称。

我真的很感激任何提示。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

树深时见影 2024-11-08 15:03:28

最明显的(但几乎肯定不是最有效的)算法如下:

  1. 考虑网格中的一个三角形。在三角形的三个顶点和相机点之间绘制三条线。 (如果相机无限远,只需考虑视点方向)。
  2. 如果所有绘制的线都与三角形表面相交,则不显示所考虑的三角形。如果只有其中一些这样做,则部分显示三角形。
  3. 对网格中的所有三角形重复此操作。

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.
五里雾 2024-11-08 15:03:28

您想要做的是一劳永逸地删除几何图形内的面。

如果您只想从一个方向查看对象,罗马解决方案可能是可以接受的。
由于不可见的表面可能会变得可见,因此如果旋转相机,这不是可接受的解决方案。

使用洪水填充适用于多维数组,但它也适用于 3D 坐标吗?由于表面并不总是 (int) 并且具有除 (1,0,0)、(0,1,0) (0,0,1) 之外的其他倾角,因此在我看来,这种方法也不起作用。

算法可能失败的情况:
计算出的遮挡值可以告诉您表面的顶点是否在对象内部。然而:虽然所有顶点都在对象内部,但表面的一部分可能会显示出来。
考虑一下:您有三个提升的对象,每个对象内部都包含一个顶点。虽然未显示顶点,但它们之间跨越的表面部分可见。

我自己无法帮助你,因为我也在寻找一种可以做到这一点的算法。

问候

What you want to do is deleting faces wich are inside a geometric figure once and for all.

Romans solution may be acceptable if you only want to look at the object from 1 direction.
Since non visible surfaces may become visible, if you rotate the camera, it is not an acceptable solution.

Using floodfill works with multi dimensional arrays, but does it also work with 3D Koordinates? since surfaces are not always (int) and have other inclination than (1,0,0), (0,1,0) (0,0,1), this approach, in my oppinion, does not work either.

the cases in wich the algorithm may fail:
The occlusion value computed tells you wheter or not the vertices of your surface are inside your object. However: although all vertices are inside the object, part of the surface may show anyway.
Consider this: You have three elevated Objects, each containing a Vertex inside. While the vertices are not shown, the surface spanned between them is partially visible.

I myselve cannot help you, since I am also looking for an algorithm wich can do this.

greets

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文