如何创建纹理以覆盖在增强现实人脸网格上?

huangapple go评论88阅读模式
英文:

How to create texture to overlay on Augmented Face mesh?

问题

我正在使用ARCore和Sceneform开发AR应用程序。我想要在面部标记(如鼻子、嘴唇、脸部和眼睛)上添加纹理。我想知道如何创建纹理,以便我可以覆盖在增强面部网格上?

Texture.builder()
   .setSource(this, R.drawable.makeupforlips)
   .setUsage(Texture.Usage.COLOR)
   .build()
   .thenAccept(texture -> faceMeshTexture = texture);

addOnUpdateListener:

for (AugmentedFace face: faceList) {

    if (!faceNodeMap.containsKey(face)) {

        AugmentedFaceNode faceNode = new AugmentedFaceNode(face);
        faceNode.setParent(scene);
        // faceNode.setFaceRegionsRenderable(faceRegionsRenderable);
        faceNode.setFaceMeshTexture(faceMeshTexture);
        faceNodeMap.put(face, faceNode);
    }
}
英文:

I am working on an AR application using ARCore and Sceneform. I want to add texture to face landmarks like nose, lips, face and eyes. I want to know how to create texture so that I can overlay it on Augmented Face mesh?

Texture.builder()
   .setSource(this, R.drawable.makeupforlips)
   .setUsage(Texture.Usage.COLOR)
   .build()
   .thenAccept(texture -> faceMeshTexture = texture);

addOnUpdateListener:

for (AugmentedFace face: faceList) {

    if (!faceNodeMap.containsKey(face)) {

        AugmentedFaceNode faceNode = new AugmentedFaceNode(face);
        faceNode.setParent(scene);
        // faceNode.setFaceRegionsRenderable(faceRegionsRenderable);
        faceNode.setFaceMeshTexture(faceMeshTexture);
        faceNodeMap.put(face, faceNode);
    }
}

答案1

得分: 3

当您构建具有增强面部功能的ARCore应用程序时,需要使用保存在.fbx.obj.glTF文件格式中的规范面部网格。将此规范面部导入Autodesk Maya,并使用UV Texture Editor创建一个UV映射纹理,可以在Adobe Photoshop或Pixelmator中重新绘制。

如何创建纹理以覆盖在增强现实人脸网格上?

英文:

When you're building ARCore app with Augmented Faces functionality you need to use a canonical face mesh that was saved in .fbx, .obj, or .glTF file format. Import this canonical face into Autodesk Maya and using UV Texture Editor, create a UV-mapped texture that can be repainted in Adobe Photoshop or Pixelmator.

如何创建纹理以覆盖在增强现实人脸网格上?

huangapple
  • 本文由 发表于 2020年8月13日 16:58:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/63391619.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定