ایجاد بافت های سفارشی و مدل های سه بعدی برای چهره های افزوده
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برای پیادهسازی چهرههای افزوده، به بافتها و مدلهای سفارشیسازی شده برای پوشش روی مشهای چهره مشخص نیاز دارید. این دارایی ها توسط هنرمندان پیش از موعد در نرم افزارهای مدل سازی سه بعدی و انیمیشن ایجاد شده و به صورت فایل *.fbx
صادر می شوند.
Sceneform SDK برای Android با یک فایل canonical_face_mesh.fbx
و یک فایل canonical_face_mesh.psd
ارائه می شود تا به هنرمندان کمک کند دارایی هایی را ایجاد کنند که به درستی روی چهره های شناسایی شده توسط ARCore همپوشانی داشته باشند. این فایل ها را می توانید در پوشه assets
پیدا کنید.
استفاده از فایل *.fbx
برای ایجاد دارایی
فایل *.fbx
حاوی توپولوژی مش چهره، مختصات بافت UV و ریگ است که نواحی صورت پشتیبانی شده ارائه شده برای ایجاد و پیوست کردن دارایی ها را تعریف می کند. برای اطمینان از سازگاری آنها با ARCore، فایل های *.fbx
باید با استفاده از تنظیمات پشتیبانی شده ذخیره شوند. سپس می توانید این فایل ها را به عنوان فایل *.sfb
وارد پروژه خود کنید.
این فایل حاوی یک facemesh
مرجع است که نباید به عنوان بخشی از *.fbx
نهایی صادر شود. ARCore در زمان اجرا یک فیس مش جداگانه تولید و به روز می کند.
استفاده از *.psd
برای ایجاد دارایی
بافت مرجع .psd
face mesh برای مشاهده اینکه چگونه بافتی که یک هنرمند ایجاد می کند با ویژگی های صورت کاربر در زمان اجرا مطابقت دارد استفاده می شود. شامل چهار لایه است:
- ماسک: محل قرارگیری چشم ها، سوراخ های بینی و دهان را در بافت نشان می دهد.
- خطوط: دستورالعملهایی که نشان میدهند چگونه ویژگیهای صورت کاربر در طول زمان اجرا با یک بافت هماهنگ میشوند.
- اشعه ماوراء بنفش: نمایانگر مثلث بندی مش بافت 468 نقطه ای است.
- پس زمینه: یک لایه پس زمینه خاکستری خنثی برای شفاف سازی بصری سه جزء دیگر.
![]()
اگر *.psd
را تغییر دهید، به محض صادرات باید تغییرات خود را مشاهده کنید.
ما تنظیمات زیر را برای فایل های *.fbx
صادر شده از نرم افزارهای مدل سازی و انیمیشن توصیه و پشتیبانی می کنیم.
فرمت فایل: FBX 2016/2017 یا بالاتر
تبدیل محور: محور بالا Y است
ضریب مقیاس: سانتی متر
تنظیمات هندسی مورد نیاز:
- گروه های صاف کننده
- مش صاف
- محتوای دارایی ارجاع شده
تنظیمات هندسی توصیه شده:
- مماس ها و دونرمال ها
- مثلثی
- NURBS
انیمیشن: فعال
تنظیمات مدل های تغییر شکل یافته:
- مدل های تغییر شکل یافته
- پوسته ها
سفارشی کردن مش صورت متعارف
اگر مدلها و بافتها با استفاده از 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
قرار دهید.
استفاده از فضای نام پشتیبانی می شود.
دارایی شامل چهار استخوان است که از root
و سه ناحیه تشکیل شده است: NOSE_TIP
، FOREHEAD_RIGHT
، و FOREHEAD_LEFT
. نام این استخوان ها را تغییر ندهید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2022-09-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2022-09-26 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eAugmented Faces in ARCore uses custom 3D models and textures (\u003ccode\u003e.fbx\u003c/code\u003e files) overlaid on detected faces.\u003c/p\u003e\n"],["\u003cp\u003eARCore provides a \u003ccode\u003ecanonical_face_mesh.fbx\u003c/code\u003e and \u003ccode\u003ecanonical_face_mesh.psd\u003c/code\u003e file to aid in creating these custom assets.\u003c/p\u003e\n"],["\u003cp\u003eArtists should use the provided \u003ccode\u003e.psd\u003c/code\u003e file as a guide to align textures with facial features and understand UV mapping.\u003c/p\u003e\n"],["\u003cp\u003eExported \u003ccode\u003e.fbx\u003c/code\u003e files should adhere to specific settings, including FBX format, axis, scale, and geometry settings, for compatibility with ARCore.\u003c/p\u003e\n"],["\u003cp\u003eCustom meshes should be skinned to designated bones (\u003ccode\u003eNOSE_TIP\u003c/code\u003e, \u003ccode\u003eFOREHEAD_RIGHT\u003c/code\u003e, \u003ccode\u003eFOREHEAD_LEFT\u003c/code\u003e) and organized under the 'asset' node in the hierarchy.\u003c/p\u003e\n"]]],["Artists create `*.fbx` files for face overlays using 3D software, utilizing the provided `canonical_face_mesh.fbx` and `canonical_face_mesh.psd` files as references. The `*.fbx` contains face mesh data, while the `*.psd` helps align textures with facial features. When exporting `*.fbx`, specific settings (e.g., FBX 2016/2017 format, Y-axis up) and a defined hierarchy with `root`, `NOSE_TIP`, `FOREHEAD_RIGHT`, and `FOREHEAD_LEFT` are required. Custom meshes should be children of the `asset` node. The facemesh model provided is a reference and should not be exported.\n"],null,["# Creating 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\nThe Sceneform SDK for Android ships 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` folder.\n\nUsing the `*.fbx` file to create assets\n---------------------------------------\n\nThe `*.fbx` file contains the face mesh topology, UV texture coordinates, and\nrig that define 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. You can then import these files into your\nproject as `*.sfb` files.\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\nUsing the `*.psd` file to create assets\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\nFBX asset format and requirements\n---------------------------------\n\nWe recommend and support the following settings for `*.fbx` files exported from\nmodeling and animation software.\n\n- File format: FBX 2016/2017 or later\n\n- Axis conversion: Up axis is Y\n\n- Scale factor: Centimeters\n\n- Required geometry settings:\n\n - Smoothing groups\n - Smooth mesh\n - Referenced asset content\n- Recommended geometry settings:\n\n - Tangents and binormals\n - Triangulate\n - NURBS\n- Animation: enabled\n\n- Deformed models settings:\n\n - Deformed models\n - Skins\n\n### Customizing the canonical face mesh\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 three regions:\n `NOSE_TIP`, `FOREHEAD_RIGHT`, and `FOREHEAD_LEFT`. Do not change the names\n of these bones."]]