Eye Expression¶
VIVE Wave™ XR plugin provides the Eye Expression feature in the VIVE Wave XR Plugin package (refer to Wave XR Plugin Packages).
By following this tutorial you can retrieve the Eye Expression value as below illustrations.
- LEFT_BLINK: This blend shape influences blinking of the right eye. When this value goes higher, left eye approaches close.
- LEFT_WIDE: This blend shape keeps left eye wide and at that time LEFT_BLINK value is 0.
- RIGHT_BLINK: This blend shape influences blinking of the right eye. When this value goes higher, right eye approaches close.
- RIGHT_WIDE: This blend shape keeps right eye wide and at that time RIGHT_BLINK value is 0.
- LEFT_SQUEEZE: The blend shape closes eye tightly and at that time LEFT_BLINK value is 1.
- RIGHT_SQUEEZE: The blend shape closes eye tightly and at that time RIGHT_BLINK value is 1.
- LEFT_DOWN: This blendShape influences the muscles around the left eye, moving these muscles further downward with a higher value.
- RIGHT_DOWN: This blendShape influences the muscles around the right eye, moving these muscles further downward with a higher value.
- LEFT_OUT: This blendShape influences the muscles around the left eye, moving these muscles further leftward with a higher value.
- RIGHT_IN: This blendShape influences the muscles around the right eye, moving these muscles further leftward with a higher value.
- LEFT_IN: This blendShape influences the muscles around the left eye, moving these muscles further rightward with a higher value.
- RIGHT_OUT: This blendShape influences the muscles around the right eye, moving these muscles further rightward with a higher value.
- LEFT_UP: This blendShape influences the muscles around the left eye, moving these muscles further upward with a higher value.
- RIGHT_UP: This blendShape influences the muscles around the right eye, moving these muscles further upward with a higher value.
Modify AndroidManifest.xml¶
To enable the Eye Expression feature, you have to add below content to your AndroidManifest.xml.
<uses-feature android:name="wave.feature.eyetracking" android:required="true" />
Usage¶
After imported the VIVE Wave XR Plugin package, you can find the WaveXREye script at Packages > VIVE Wave XR Plugin > Runtime.
Enumeration:
/// namespace Wave.OpenXR.InputDeviceEye
// Eye Expression definitions.
public enum Expressions
{
LEFT_BLINK = 0,
LEFT_WIDE = 1,
RIGHT_BLINK = 2,
RIGHT_WIDE = 3,
LEFT_SQUEEZE = 4,
RIGHT_SQUEEZE = 5,
LEFT_DOWN = 6,
RIGHT_DOWN = 7,
LEFT_OUT = 8,
RIGHT_IN = 9,
LEFT_IN = 10,
RIGHT_OUT = 11,
LEFT_UP = 12,
RIGHT_UP = 13,
MAX,
}
Functions:
/// namespace Wave.OpenXR.InputDeviceEye
// Enables or disables the Eye Expression feature.
public static void ActivateEyeExpression(bool active)
// Checks if the Eye Expression feature is available currently.
public static bool IsEyeExpressionAvailable()
// Checks if the Eye Expression value is provided in runtime.
public static bool HasEyeExpressionValue()
// Retrieves the value of an eye expression. If the returned value is always 0, you may call HasEyeExpressionValue() to check if the Eye Expression value is provided in runtime.
public static float GetEyeExpressionValue(Expressions exp)
// Retrieves all Eye Expression values in a float array. The values are sorted in the order as Expressions enum.
public static bool GetEyeExpressionValues(out float[] values)
After imported the XR sample from Package Manager > VIVE Wave XR Plugin, you can find the Eye Expression sample at Assets > Samples > VIVE Wave XR Plugin > {version} > XR > EyeExpression.