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.

  1. LEFT_BLINK: This blend shape influences blinking of the right eye. When this value goes higher, left eye approaches close.
../_images/00.XR_EYE_EXPRESSION_LEFT_BLINK_HTC.png
  1. LEFT_WIDE: This blend shape keeps left eye wide and at that time LEFT_BLINK value is 0.
../_images/01.XR_EYE_EXPRESSION_LEFT_WIDE_HTC.png
  1. RIGHT_BLINK: This blend shape influences blinking of the right eye. When this value goes higher, right eye approaches close.
../_images/02.XR_EYE_EXPRESSION_RIGHT_BLINK_HTC.png
  1. RIGHT_WIDE: This blend shape keeps right eye wide and at that time RIGHT_BLINK value is 0.
../_images/03.XR_EYE_EXPRESSION_RIGHT_WIDE_HTC.png
  1. LEFT_SQUEEZE: The blend shape closes eye tightly and at that time LEFT_BLINK value is 1.
../_images/04.XR_EYE_EXPRESSION_LEFT_SQUEEZE_HTC.png
  1. RIGHT_SQUEEZE: The blend shape closes eye tightly and at that time RIGHT_BLINK value is 1.
../_images/05.XR_EYE_EXPRESSION_RIGHT_SQUEEZE_HTC.png
  1. LEFT_DOWN: This blendShape influences the muscles around the left eye, moving these muscles further downward with a higher value.
../_images/06.XR_EYE_EXPRESSION_LEFT_DOWN_HTC.png
  1. RIGHT_DOWN: This blendShape influences the muscles around the right eye, moving these muscles further downward with a higher value.
../_images/07.XR_EYE_EXPRESSION_RIGHT_DOWN_HTC.png
  1. LEFT_OUT: This blendShape influences the muscles around the left eye, moving these muscles further leftward with a higher value.
../_images/08.XR_EYE_EXPRESSION_LEFT_OUT_HTC.png
  1. RIGHT_IN: This blendShape influences the muscles around the right eye, moving these muscles further leftward with a higher value.
../_images/09.XR_EYE_EXPRESSION_RIGHT_IN_HTC.png
  1. LEFT_IN: This blendShape influences the muscles around the left eye, moving these muscles further rightward with a higher value.
../_images/10.XR_EYE_EXPRESSION_LEFT_IN_HTC.png
  1. RIGHT_OUT: This blendShape influences the muscles around the right eye, moving these muscles further rightward with a higher value.
../_images/11.XR_EYE_EXPRESSION_RIGHT_OUT_HTC.png
  1. LEFT_UP: This blendShape influences the muscles around the left eye, moving these muscles further upward with a higher value.
../_images/12.XR_EYE_EXPRESSION_LEFT_UP_HTC.png
  1. RIGHT_UP: This blendShape influences the muscles around the right eye, moving these muscles further upward with a higher value.
../_images/13.XR_EYE_EXPRESSION_RIGHT_UP_HTC.png

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.