如何在Arkit中遮住脸部遮挡面具的眼睛和嘴巴
苹果的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样创建您的脸部网格:
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