英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论