如何在Arkit中遮住脸部遮挡面具的眼睛和嘴巴

发布于 2025-02-03 20:12:36 字数 412 浏览 4 评论 0原文

苹果的arkit有一种创建面部遮挡掩码的简便方法:您可以从arfaceanchor中获得arface> arfacemeemetry(换句话说),制作它透明并在其他任何东西之前呈现,以便隐藏了遮挡面罩背后的其他模型的部分。问题在于,来自arfaceanchor的几何形状具有“孔”的眼睛和嘴。这对于其他目的很有用,但是对于遮挡面膜而言,这不是,其他对象可以通过看起来很奇怪的孔看到。我正在尝试找到一种“掩盖”这些孔的方法。 arfaceanchor的几何形状具有固定的结构,因此,从理论上讲,我可以在眼睛和嘴巴周围的确切顶点,并手动向网格添加边缘以覆盖它们。看起来应该有更好的方法。是否有一种简单的方法可以覆盖眼睛和嘴巴的那些孔来形成更好的脸部遮挡面膜?

Apple's ARKit has an easy way to create a face occlusion mask: you can get an ARFaceGeometry (a mesh in other words) from ARFaceAnchor, make it transparent and render it before anything else, that way parts of other models on the scene that are behind the occlusion mask are hidden. The problem is that the geometry that comes from ARFaceAnchor has "holes" for the eyes and the mouth. That is useful for other purposes but for the occlusion mask it's not, other objects can be seen through those holes which looks weird. I'm trying to find a way to "cover" those holes. The geometry from ARFaceAnchor has a fixed structure so, in theory, I could find the exact vertices around the eyes and the mouth and manually add edges to the mesh to cover them. It looks like there should be a better way though. Is there an easy way to cover those holes for the eyes and the mouth to create a better face occlusion mask?

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

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

发布评论

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

评论(1

过气美图社 2025-02-10 20:12:36

像这样创建您的脸部网格:

let facemesh = arscnfacegeomestry(设备:设备,fillMesh:true)

键为fillMesh:true

Create your face mesh like this:

let faceMesh = ARSCNFaceGeometry(device: device, fillMesh: true)

The key being fillMesh: true

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