สร้างพื้นผิวที่กำหนดเองและโมเดล 3 มิติสำหรับ Augmented Faces
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หากต้องการใช้ใบหน้าที่เพิ่มประสิทธิภาพ คุณต้องมีพื้นผิวและโมเดลที่กําหนดเองสําหรับวางซ้อนบนเมชใบหน้าที่ระบุ ศิลปินสร้างชิ้นงานเหล่านี้ล่วงหน้าในซอฟต์แวร์โมเดล 3 มิติและภาพเคลื่อนไหว และส่งออกเป็นไฟล์ FBX
ไฟล์ Canonical
SDK จะมาพร้อมกับไฟล์ canonical_face_mesh.fbx
และไฟล์ canonical_face_mesh.psd
เพื่อช่วยศิลปินสร้างชิ้นงานที่วางซ้อนบนใบหน้าที่ ARCore ตรวจพบได้อย่างถูกต้อง ไฟล์เหล่านี้จะอยู่ในโฟลเดอร์ assets/canonical_face_mesh.fbx
สร้างโมเดล 3 มิติด้วยไฟล์ FBX
ไฟล์ FBX มีโทโพโลยีของเมชใบหน้า พิกัดพื้นผิว UV และริกที่กําหนดบริเวณใบหน้าที่รองรับสําหรับการสร้างและแนบชิ้นงาน คุณควรบันทึกไฟล์ FBX โดยใช้การตั้งค่าที่รองรับเพื่อให้เข้ากันได้กับ ARCore
ไฟล์นี้มีข้อมูลอ้างอิง facemesh
ที่ไม่ควรจะส่งออกเป็นส่วนหนึ่งของ FBX เวอร์ชันสุดท้าย ARCore จะสร้างและอัปเดตเมชใบหน้าแยกต่างหากเมื่อรันไทม์
สร้างพื้นผิว 2 มิติด้วยไฟล์ PSD
.psd
พื้นผิวอ้างอิงเมชใบหน้าใช้เพื่อดูว่าพื้นผิวที่ศิลปินสร้างขึ้นสอดคล้องกับลักษณะใบหน้าของผู้ใช้ขณะรันไทม์อย่างไร ซึ่งประกอบด้วยเลเยอร์ 4 เลเยอร์ ได้แก่
- มาสก์: แสดงตำแหน่งของตา รูจมูก และปากในพื้นผิว
- เส้น: หลักเกณฑ์ที่แสดงลักษณะใบหน้าของผู้ใช้ว่าสอดคล้องกับพื้นผิวอย่างไรในระหว่างรันไทม์
- UV: แสดงการแบ่งรูปสามเหลี่ยมของเมชพื้นผิวใบหน้า 468 จุด
- พื้นหลัง: เลเยอร์พื้นหลังสีเทากลางเพื่อให้องค์ประกอบอีก 3 อย่างแสดงผลได้ชัดเจน

หากแก้ไขไฟล์ PSD คุณควรเห็นการเปลี่ยนแปลงทันทีที่ส่งออก
ปรับแต่งเมชใบหน้าที่ถูกต้อง
หากสร้างโมเดลและพื้นผิวโดยใช้ assets/canonical_face_mesh.fbx
ที่รวมอยู่ใน SDK คุณจะต้องตั้งค่าเหล่านี้ด้วยเมื่อส่งออกไฟล์ FBX
ตรวจสอบว่าเมชที่กำหนดเองมีการสกินกับกระดูกหรือภูมิภาคที่เกี่ยวข้อง
ใช้ลําดับชั้นต่อไปนี้
asset
|__root
| |__NOSE_TIP
| |__FOREHEAD_RIGHT
| |__FOREHEAD_LEFT
|__facemesh <-- for reference
|__ <-- place additional custom 3D meshes here
อย่าส่งออกโมเดล facemesh
ที่รวมอยู่ด้วย ตาข่ายนี้มีไว้สำหรับอ้างอิงเท่านั้น
ARCore จะสร้างเมชใบหน้าแยกต่างหากเมื่อรันไทม์ ใช้ UV ใน facemesh
เป็นข้อมูลอ้างอิงเมื่อสร้างพื้นผิวเมชใบหน้าที่กำหนดเอง
วางเมชที่กำหนดเองเป็นโหนดย่อยของโหนด asset
ระบบรองรับการใช้เนมสเปซ
ชิ้นงานมี 4 กระดูก ได้แก่ root
และ NOSE_TIP
FOREHEAD_RIGHT
และ FOREHEAD_LEFT
อย่าเปลี่ยนชื่อกระดูกเหล่านี้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eAugmented Faces in ARCore uses custom 3D models and 2D textures, created by artists and exported as FBX files, to overlay onto detected faces.\u003c/p\u003e\n"],["\u003cp\u003eARCore provides a canonical face mesh (FBX and PSD files) to guide the creation of compatible assets for accurate overlay on user faces.\u003c/p\u003e\n"],["\u003cp\u003eThe FBX file defines the face mesh structure and regions, and any custom 3D models should be skinned to its associated bones while adhering to a specific hierarchy.\u003c/p\u003e\n"],["\u003cp\u003eThe PSD file provides a reference texture with layers for mask, lines, UVs, and background, aiding artists in aligning textures with facial features.\u003c/p\u003e\n"],["\u003cp\u003eWhen exporting custom FBX files, the reference 'facemesh' should be excluded, as ARCore generates its own face mesh at runtime.\u003c/p\u003e\n"]]],[],null,["# Create custom textures and 3D models for Augmented Faces\n\nTo implement Augmented Faces, you need customized textures and models for\noverlaying on identified face meshes. These assets are created by artists\nahead of time in 3D modeling and animation software, and exported as FBX\nfiles.\n\nCanonical files\n---------------\n\nThe SDKs ship with a `canonical_face_mesh.fbx` file and a\n`canonical_face_mesh.psd` file to help artists create assets that will overlay\nproperly onto faces detected by ARCore. These files can be found in the\n`assets/canonical_face_mesh.fbx` folder.\n| **Note:** Both the FBX and PSD files are included in the [public iOS GitHub repository](https://github.com/google-ar/arcore-ios-sdk/tree/master/Assets), but are not shipped as part of the ARCore Cocoapod.\n\nCreate 3D models with the FBX file\n----------------------------------\n\nThe FBX file contains the face mesh topology, UV texture coordinates, and\nrig that defines the supported facial regions provided for creating and\nattaching assets. To ensure they're compatible with ARCore, FBX files should\nbe saved using supported settings.\n\nThis file contains a reference `facemesh` that should not be exported as part of\nthe final FBX. ARCore will generate and update a separate face mesh at\nruntime.\n\nCreate 2D textures with the PSD file\n------------------------------------\n\nThe `.psd` face mesh reference texture is used to see how a texture that an\nartist creates lines up with a user's facial features at runtime. It includes\nfour layers:\n\n- **Mask:** Shows where the eyes, nostrils, and mouth are located in the texture.\n- **Lines:** Guidelines that show how a user's facial features line up with a texture during runtime.\n- **UVs:** Represents triangulation of the 468 point face texture mesh.\n- **Background:** A neutral gray background layer to make the other three components visually clear.\n\nIf you modify the PSD file, you should see your changes as soon as you\nexport.\n\nCustomize the canonical face mesh\n---------------------------------\n\nIf models and textures are being created using the\n`assets/canonical_face_mesh.fbx` included in the SDK, these settings are also\nrequired when exporting FBX files:\n\n- Make sure the any custom meshes are skinned to the associated bones or regions.\n\n- Use the following hierarchy:\n\n ```\n asset\n |__root\n | |__NOSE_TIP\n | |__FOREHEAD_RIGHT\n | |__FOREHEAD_LEFT\n |__facemesh \u003c-- for reference\n |__ \u003c-- place additional custom 3D meshes here\n ```\n- Do not export the included `facemesh` model. This mesh is for reference only.\n ARCore will create a separate face mesh at runtime. Use the UVs in `facemesh`\n as a reference when creating custom face mesh textures.\n\n- Place custom meshes as children of the `asset` node.\n\n- Use of namespaces is supported.\n\n- The asset contains four bones consisting of `root` and `NOSE_TIP`,\n `FOREHEAD_RIGHT`, and `FOREHEAD_LEFT` regions. Do not change the names of\n these bones."]]