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

OVRFaceExpressions Class

Extends MonoBehaviour, IReadOnlyCollection< float >
Implements OVRFaceExpressions.WeightProvider
This class manages the face expressions data.
Refers to the OVRFaceExpressions.FaceExpression enum for the list of face expressions.

Properties

Count : int
[Get]
Signature
int OVRFaceExpressions.Count
EyeFollowingBlendshapesValid : bool
[Get]
True if the eye look-related blend shapes are valid, otherwise false.
This property affects the behavior of two sets of blend shapes.
EyesLook:
  • FaceExpression.EyesLookDownL
  • FaceExpression.EyesLookDownR
  • FaceExpression.EyesLookLeftL
  • FaceExpression.EyesLookLeftR
  • FaceExpression.EyesLookRightL
  • FaceExpression.EyesLookRightR
  • FaceExpression.EyesLookUpL
  • FaceExpression.EyesLookUpR
EyesClosed:
  • FaceExpression.EyesClosedL
  • FaceExpression.EyesClosedR
When EyeFollowingBlendshapesValid is false:
  • The EyesLook blend shapes are set to zero.
  • The EyesClosed blend shapes range from 0..1, and represent the true state of the eyelids.
When EyeFollowingBlendshapesValid is true:
  • The EyesLook blend shapes are valid.
  • The EyesClosed blend shapes are modified so that the sum of the EyesClosedX and EyesLookDownX blend shapes range from 0..1. This helps avoid double deformation of the avatar's eye lids when they may be driven by both the EyesClosed and EyesLookDown blend shapes. To recover the true EyesClosed values, add the minimum of EyesLookDownL and EyesLookDownR blend shapes back using the following formula:
    EyesClosedL += min(EyesLookDownL, EyesLookDownR)
    EyesClosedR += min(EyesLookDownL, EyesLookDownR)
Signature
bool OVRFaceExpressions.EyeFollowingBlendshapesValid
FaceTrackingEnabled : bool
[Get]
True if face tracking is enabled, otherwise false.
Signature
bool OVRFaceExpressions.FaceTrackingEnabled
this[FaceExpression expression] : float
[Get]
This will return the weight of the given expression.
Signature
float OVRFaceExpressions.this[FaceExpression expression]
ValidExpressions : bool
[Get]
True if the facial expressions are valid, otherwise false.
This value gets updated in every frame. You should check this value before querying for face expressions.
Signature
bool OVRFaceExpressions.ValidExpressions

Methods

CopyTo ( array , startIndex )
Copies expression weights to a pre-allocated array.
Signature
void OVRFaceExpressions.CopyTo(float[] array, int startIndex=0)
Parameters
array: float[]  Pre-allocated destination array for expression weights
startIndex: int  Starting index in the destination array
Returns
void
Throws
ArgumentNullException  Thrown when array is null. ArgumentException  Thrown when there is not enough capacity to copy weights to array at startIndex index. ArgumentOutOfRangeException  Thrown when startIndex value is out of array bounds. InvalidOperationException  Thrown when OVRFaceExpressions.ValidExpressions is false.
GetEnumerator ()
Signature
FaceExpressionsEnumerator OVRFaceExpressions.GetEnumerator()
Returns
FaceExpressionsEnumerator
GetWeight ( expression )
Signature
float OVRFaceExpressions.GetWeight(FaceExpression expression)
Parameters
expression: FaceExpression
Returns
float
ToArray ()
Allocates a float array and copies expression weights to it.
Signature
float[] OVRFaceExpressions.ToArray()
Returns
float[]
TryGetFaceExpressionWeight ( expression , weight )
This method tries to gets the weight of the given expression if it's available.
Signature
bool OVRFaceExpressions.TryGetFaceExpressionWeight(FaceExpression expression, out float weight)
Parameters
expression: FaceExpression  The expression to get the weight of.
weight: out float  The output argument that will contain the expression weight or 0.0 if it's not available.
Returns
bool  Returns true if the expression weight is available, false otherwise
TryGetFaceTrackingDataSource ( dataSource )
Signature
bool OVRFaceExpressions.TryGetFaceTrackingDataSource(out FaceTrackingDataSource dataSource)
Parameters
dataSource: out FaceTrackingDataSource
Returns
bool
TryGetWeightConfidence ( region , weightConfidence )
This method tries to gets the confidence weight of the given face part if it's available.
Signature
bool OVRFaceExpressions.TryGetWeightConfidence(FaceRegionConfidence region, out float weightConfidence)
Parameters
region: FaceRegionConfidence  The part of the face to get the confidence weight of.
weightConfidence: out float  The output argument that will contain the weight confidence or 0.0 if it's not available.
Returns
bool  Returns true if the weight confidence is available, false otherwise

Inner Interface

WeightProvider Interface

Methods

GetWeight ( expression )
Signature
float OVRFaceExpressions.WeightProvider.GetWeight(FaceExpression expression)
Parameters
expression: FaceExpression
Returns
float

Inner Struct

FaceExpressionsEnumerator Struct

Extends IEnumerator< float >

Properties

Current : float
[Get]
Signature
float OVRFaceExpressions.FaceExpressionsEnumerator.Current
Current : object IEnumerator.
[Get]
Signature
object IEnumerator. OVRFaceExpressions.FaceExpressionsEnumerator.Current

Methods

Dispose ()
Signature
void OVRFaceExpressions.FaceExpressionsEnumerator.Dispose()
Returns
void
MoveNext ()
Signature
bool OVRFaceExpressions.FaceExpressionsEnumerator.MoveNext()
Returns
bool
Reset ()
Signature
void OVRFaceExpressions.FaceExpressionsEnumerator.Reset()
Returns
void

Inner Enums

FaceRegionConfidence Enum

List of face parts used for getting the face tracking confidence weight in TryGetWeightConfidence.

Enumeration Constants

MemberValueDescription
Lower
OVRPlugin.FaceRegionConfidence.Lower
Represents the lower part of the face. It includes the mouth, chin and a portion of the nose and cheek.
Upper
OVRPlugin.FaceRegionConfidence.Upper
Represents the upper part of the face. It includes the eyes, eye brows and a portion of the nose and cheek.
Max
OVRPlugin.FaceRegionConfidence.Max
Used to determine the size of the FaceRegionConfidence enum.

FaceTrackingDataSource Enum

Enumeration Constants

MemberValue
Visual
OVRPlugin.FaceTrackingDataSource.Visual
Audio
OVRPlugin.FaceTrackingDataSource.Audio
Count
OVRPlugin.FaceTrackingDataSource.Count

FaceExpression Enum

List of face expressions.

Enumeration Constants

MemberValue
Invalid
OVRPlugin.FaceExpression2.Invalid
BrowLowererL
OVRPlugin.FaceExpression2.Brow_Lowerer_L
BrowLowererR
OVRPlugin.FaceExpression2.Brow_Lowerer_R
CheekPuffL
OVRPlugin.FaceExpression2.Cheek_Puff_L
CheekPuffR
OVRPlugin.FaceExpression2.Cheek_Puff_R
CheekRaiserL
OVRPlugin.FaceExpression2.Cheek_Raiser_L
CheekRaiserR
OVRPlugin.FaceExpression2.Cheek_Raiser_R
CheekSuckL
OVRPlugin.FaceExpression2.Cheek_Suck_L
CheekSuckR
OVRPlugin.FaceExpression2.Cheek_Suck_R
ChinRaiserB
OVRPlugin.FaceExpression2.Chin_Raiser_B
ChinRaiserT
OVRPlugin.FaceExpression2.Chin_Raiser_T
DimplerL
OVRPlugin.FaceExpression2.Dimpler_L
DimplerR
OVRPlugin.FaceExpression2.Dimpler_R
EyesClosedL
OVRPlugin.FaceExpression2.Eyes_Closed_L
EyesClosedR
OVRPlugin.FaceExpression2.Eyes_Closed_R
EyesLookDownL
OVRPlugin.FaceExpression2.Eyes_Look_Down_L
EyesLookDownR
OVRPlugin.FaceExpression2.Eyes_Look_Down_R
EyesLookLeftL
OVRPlugin.FaceExpression2.Eyes_Look_Left_L
EyesLookLeftR
OVRPlugin.FaceExpression2.Eyes_Look_Left_R
EyesLookRightL
OVRPlugin.FaceExpression2.Eyes_Look_Right_L
EyesLookRightR
OVRPlugin.FaceExpression2.Eyes_Look_Right_R
EyesLookUpL
OVRPlugin.FaceExpression2.Eyes_Look_Up_L
EyesLookUpR
OVRPlugin.FaceExpression2.Eyes_Look_Up_R
InnerBrowRaiserL
OVRPlugin.FaceExpression2.Inner_Brow_Raiser_L
InnerBrowRaiserR
OVRPlugin.FaceExpression2.Inner_Brow_Raiser_R
JawDrop
OVRPlugin.FaceExpression2.Jaw_Drop
JawSidewaysLeft
OVRPlugin.FaceExpression2.Jaw_Sideways_Left
JawSidewaysRight
OVRPlugin.FaceExpression2.Jaw_Sideways_Right
JawThrust
OVRPlugin.FaceExpression2.Jaw_Thrust
LidTightenerL
OVRPlugin.FaceExpression2.Lid_Tightener_L
LidTightenerR
OVRPlugin.FaceExpression2.Lid_Tightener_R
LipCornerDepressorL
OVRPlugin.FaceExpression2.Lip_Corner_Depressor_L
LipCornerDepressorR
OVRPlugin.FaceExpression2.Lip_Corner_Depressor_R
LipCornerPullerL
OVRPlugin.FaceExpression2.Lip_Corner_Puller_L
LipCornerPullerR
OVRPlugin.FaceExpression2.Lip_Corner_Puller_R
LipFunnelerLB
OVRPlugin.FaceExpression2.Lip_Funneler_LB
LipFunnelerLT
OVRPlugin.FaceExpression2.Lip_Funneler_LT
LipFunnelerRB
OVRPlugin.FaceExpression2.Lip_Funneler_RB
LipFunnelerRT
OVRPlugin.FaceExpression2.Lip_Funneler_RT
LipPressorL
OVRPlugin.FaceExpression2.Lip_Pressor_L
LipPressorR
OVRPlugin.FaceExpression2.Lip_Pressor_R
LipPuckerL
OVRPlugin.FaceExpression2.Lip_Pucker_L
LipPuckerR
OVRPlugin.FaceExpression2.Lip_Pucker_R
LipStretcherL
OVRPlugin.FaceExpression2.Lip_Stretcher_L
LipStretcherR
OVRPlugin.FaceExpression2.Lip_Stretcher_R
LipSuckLB
OVRPlugin.FaceExpression2.Lip_Suck_LB
LipSuckLT
OVRPlugin.FaceExpression2.Lip_Suck_LT
LipSuckRB
OVRPlugin.FaceExpression2.Lip_Suck_RB
LipSuckRT
OVRPlugin.FaceExpression2.Lip_Suck_RT
LipTightenerL
OVRPlugin.FaceExpression2.Lip_Tightener_L
LipTightenerR
OVRPlugin.FaceExpression2.Lip_Tightener_R
LipsToward
OVRPlugin.FaceExpression2.Lips_Toward
LowerLipDepressorL
OVRPlugin.FaceExpression2.Lower_Lip_Depressor_L
LowerLipDepressorR
OVRPlugin.FaceExpression2.Lower_Lip_Depressor_R
MouthLeft
OVRPlugin.FaceExpression2.Mouth_Left
MouthRight
OVRPlugin.FaceExpression2.Mouth_Right
NoseWrinklerL
OVRPlugin.FaceExpression2.Nose_Wrinkler_L
NoseWrinklerR
OVRPlugin.FaceExpression2.Nose_Wrinkler_R
OuterBrowRaiserL
OVRPlugin.FaceExpression2.Outer_Brow_Raiser_L
OuterBrowRaiserR
OVRPlugin.FaceExpression2.Outer_Brow_Raiser_R
UpperLidRaiserL
OVRPlugin.FaceExpression2.Upper_Lid_Raiser_L
UpperLidRaiserR
OVRPlugin.FaceExpression2.Upper_Lid_Raiser_R
UpperLipRaiserL
OVRPlugin.FaceExpression2.Upper_Lip_Raiser_L
UpperLipRaiserR
OVRPlugin.FaceExpression2.Upper_Lip_Raiser_R
TongueTipInterdental
OVRPlugin.FaceExpression2.Tongue_Tip_Interdental
TongueTipAlveolar
OVRPlugin.FaceExpression2.Tongue_Tip_Alveolar
TongueFrontDorsalPalate
OVRPlugin.FaceExpression2.Tongue_Front_Dorsal_Palate
TongueMidDorsalPalate
OVRPlugin.FaceExpression2.Tongue_Mid_Dorsal_Palate
TongueBackDorsalVelar
OVRPlugin.FaceExpression2.Tongue_Back_Dorsal_Velar
TongueOut
OVRPlugin.FaceExpression2.Tongue_Out
TongueRetreat
OVRPlugin.FaceExpression2.Tongue_Retreat
Max
OVRPlugin.FaceExpression2.Max