API reference
API reference
Select your platform
No SDKs available
No versions available

OVRCustomFaceExtensions Class

This class is responsible for managing the mapping between blend shapes of a character's mesh and the set of available OVRFaceExpressions.FaceExpression.
Use this class to apply the generation of the mapping using OVRCustomFaceExtensions.AutoGenerateMapping, so that each blend shape has an associated face expression. For more information, see Face Tracking for Movement SDK for Unity.

Static Member Functions

Find the best matching blend shape for each facial expression based on their names.
Use this function to create an association between a SkinnedMeshRenderer's blend shapes and OVRFaceExpressions.FaceExpression values.This function tokenizes face expression enum strings and blend shape name strings in order to find an array of OVRFaceExpressions.FaceExpression to the blend shapes of a model. It quantifies the quality of the match by the total number of characters in the matching tokens. Furthermore, it requires at least a total of more than 2 characters to match, to avoid matching just single characters. A better technique might be to use Levenshtein distance to match the tokens to allow some typos while still being allowing flexibility with respect to the order of tokens.
Parameters
skinnedMesh
The mesh to find a mapping for.
blendShapeNames
Array of blend shape names.
faceExpressions
Array of id for mapping to them.
Parameters
allowDuplicateMapping
Whether to allow duplicate mapping or not
Returns
Returns an array of OVRFaceExpressions.FaceExpression of the same length as the number of blend shapes on the skinnedMesh , with each element identifying the closest match found.
The extension method that generates a mapping between the OVRCustomFace blend shapes and the OVRFaceExpressions.FaceExpressions.
Use this function to generate the mapping on the OVRCustomFace in order for face tracking to function properly on the character's skinned mesh renderer. ///
Parameters
customFace
Custom face component.
The extension method that clears the blend shape mappings on a OVRCustomFace instance.
Use this in case the mappings on the instance are not correct. This could happen if the mapping algorithm did not produce a satisfactory result when being driven by face tracking's OVRFaceExpressions.FaceExpression values.
Parameters
customFace
custom face component
Did you find this page helpful?
Thumbs up icon
Thumbs down icon