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

OVRCustomFaceExtensions Class

Static Methods

AutoGenerateMapping ( skinnedMesh , blendShapeNames , faceExpressions , allowDuplicateMapping )
Find the best matching blend shape for each facial expression based on their names.
Auto generation idea is to tokenize expression enum strings and blend shape name strings and find matching tokens We quantify the quality of the match by the total number of characters in the matching tokens We require at least a total of more than 2 characters to match, to avoid matching just L/R LB/RB etc. A better technique might be to use Levenshtein distance to match the tokens to allow some typos while still being loose on order of tokens
Signature
static OVRFaceExpressions.FaceExpression[] OVRCustomFaceExtensions.AutoGenerateMapping(Mesh skinnedMesh, string[] blendShapeNames, OVRFaceExpressions.FaceExpression[] faceExpressions, bool allowDuplicateMapping)
Parameters
skinnedMesh: Mesh  The mesh to find a mapping for.
blendShapeNames: string[]  Array of blend shape names
faceExpressions: OVRFaceExpressions.FaceExpression[]  Array of FaceExpression id for mapping to them
allowDuplicateMapping: bool  Whether to allow duplicate mapping or not
Returns
OVRFaceExpressions.FaceExpression[]  Returns an array of OVRFaceExpressions.FaceExpression of the same length as the number of blendshapes on the skinnedMesh with each element identifying the closest found match
AutoMapBlendshapes ( customFace )
Signature
static void OVRCustomFaceExtensions.AutoMapBlendshapes(this OVRCustomFace customFace)
Parameters
customFace: this OVRCustomFace
Returns
void
ClearBlendshapes ( customFace )
Signature
static void OVRCustomFaceExtensions.ClearBlendshapes(this OVRCustomFace customFace)
Parameters
customFace: this OVRCustomFace
Returns
void