简体   繁体   中英

How to create texture to overlay on Augmented Face mesh?

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);
    }
}

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

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM