为增强面创建自定义纹理和 3D 模型
要实现增强面,您需要为
叠加在已识别的人脸网格上。这些资产由音乐人创作
并导出为 FBX 格式
文件。
规范文件
SDK 附带有 canonical_face_mesh.fbx
文件和
canonical_face_mesh.psd
文件,帮助音乐人创建可叠加的素材资源
正确覆盖在 ARCore 检测到的人脸上。您可以在以下位置找到这些文件:
assets/canonical_face_mesh.fbx
文件夹。
使用 FBX 文件创建 3D 模型
FBX 文件包含面网格拓扑、UV 纹理坐标以及
该绑定定义了支持的面部区域,这些区域用于创建和
附加资源。为确保它们与 ARCore 兼容,FBX 文件应
使用支持的设置进行保存
此文件包含引用 facemesh
,不得作为
最终的 FBXARCore 将在
运行时。
使用 PSD 文件创建 2D 纹理
.psd
面网格参考纹理用于了解
音乐人在运行时创建与用户面部特征的对齐。其中包括
四个层:
- Mask:显示纹理中眼睛、鼻孔和嘴巴的位置。
- 线条:显示用户的面部特征与面部特征之间的排列关系的准则
呈现纹理。
- UV:表示 468 个点的面纹理网格的三角测量。
- 背景:中性灰色背景图层,可让其他三项
组件。

如果您修改了 PSD 文件,
导出。
自定义规范人脸网格
如果模型和纹理是使用
assets/canonical_face_mesh.fbx
,则这些设置也
导出 FBX 文件时所需的条件:
确保所有自定义网格的皮肤都覆盖了关联的骨骼或区域。
使用以下层次结构:
asset
|__root
| |__NOSE_TIP
| |__FOREHEAD_RIGHT
| |__FOREHEAD_LEFT
|__facemesh <-- for reference
|__ <-- place additional custom 3D meshes here
请勿导出包含的 facemesh
模型。此网格仅供参考。
ARCore 将在运行时创建一个单独的人脸网格。在 facemesh
中使用 UV
作为参考。
将自定义网格作为 asset
节点的子级放置。
支持使用命名空间。
该资产包含四个架构,分别由 root
和 NOSE_TIP
组成,
FOREHEAD_RIGHT
和 FOREHEAD_LEFT
区域。请勿更改
这些骨头。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-13。
[null,null,["最后更新时间 (UTC):2024-09-13。"],[[["Augmented Faces uses custom textures and 3D models (FBX files) created by artists to overlay onto detected faces."],["The SDK provides a canonical face mesh (FBX and PSD files) to guide asset creation and ensure compatibility with ARCore."],["Artists use the FBX file to create 3D models, ensuring correct topology and rigging for facial regions."],["The PSD file aids in creating 2D textures, providing layers to align artwork with user facial features during runtime."],["When exporting FBX files, specific settings and hierarchy must be followed for seamless integration with ARCore's face tracking."]]],["Artists create custom 3D models and 2D textures in FBX and PSD formats for overlaying on detected face meshes. The SDK provides `canonical_face_mesh.fbx` and `.psd` files for guidance. The FBX file defines face mesh topology and facial regions; `.psd` guides texture alignment with features, using layers for masks, lines, UVs, and background. When exporting custom FBX files, ensure custom meshes are skinned to specified bones and follow the outlined hierarchy, excluding the reference `facemesh`.\n"]]