Face Tracking Unity Demo
- If you have any questions/comments, please visit Pico Developer Support Portal and raise your question there.
Environment:
- PUI 5.4.0
- Unity 2021.3.13f1
- Pico Unity Integration SDK 2.1.4
Applicable devices:
- PICO 4 Pro
Description:
To enable Face Tracking, you need to pick a Face Tracking Mode on PXR_Manager.
Hybrid: Enable face tracking and lipsync. Uses all 52 blend shapes and 20 visemes.
Face Only: Enable face tracking only. Uses all 52 blend shapes.
Lipsync Only: Enable lipsync only. Uses all 20 visemes.
In this demo, you will learn how to get Face Tracking data and apply the data to an ARKit standard avatar.
To check the specific data, enable the debug UI.
Method explanation:
Get device Face Tracking ability: PXR_Plugin.System.UPxr_QueryDeviceAbilities(PxrDeviceAbilities.PxrTrackingModeFaceBit)
Get Face Tracking Mode: PXR_Manager.Instance.trackingMode
Get Face Tracking data based on the mode and store in faceTrackingInfo: PXR_System.GetFaceTrackingData(0, GetDataType.PXR_GET_FACELIP_DATA, ref faceTrackingInfo);
For detailed Face Tracking Data explanation, please visit Face Tracking Document .