Lip Expression

VIVE Wave™ XR plugin provides the Lip Expression feature in the VIVE Wave XR Plugin and Essence packages (refer to Wave XR Plugin Packages).

By following this guide you can retrieve total 37 lip expression values representing as the illustrations below.

  • 00.JAW_RIGHT
../_images/00.JAW_RIGHT.png
  • 01.JAW_LEFT
../_images/01.JAW_LEFT.png
  • 02.JAW_FORWARD
../_images/02.JAW_FORWARD.png
  • 03.JAW_OPEN
../_images/03.JAW_OPEN.png
  • 04.MOUTH_APE_SHAPE
../_images/04.MOUTH_APE.png
  • 05.MOUTH_UPPER_RIGHT
../_images/05.MOUTH_UPPER_RIGHT.png
  • 06.MOUTH_UPPER_LEFT
../_images/06.MOUTH_UPPER_LEFT.png
  • 07.MOUTH_LOWER_RIGHT
../_images/07.MOUTH_LOWER_RIGHT.png
  • 08.MOUTH_LOWER_LEFT
../_images/08.MOUTH_LOWER_LEFT.png
  • 09.MOUTH_UPPER_OVERTURN
../_images/09.MOUTH_UPPER_OVERTURN.png
  • 10.MOUTH_LOWER_OVERTURN
../_images/10.MOUTH_LOWER_OVERTURN.png
  • 11.MOUTH_POUT
../_images/11.MOUTH_POUT.png
  • 12.MOUTH_SMILE_RIGHT
../_images/12.MOUTH_SMILE_RIGHT.png
  • 13.MOUTH_SMILE_LEFT
../_images/13.MOUTH_SMILE_LEFT.png
  • 14.MOUTH_SAD_RIGHT
../_images/14.MOUTH_SAD_RIGHT.png
  • 15.MOUTH_SAD_LEFT
../_images/15.MOUTH_SAD_LEFT.png
  • 16.CHEEK_PUFF_RIGHT
../_images/16.CHEEK_PUFF_RIGHT.png
  • 17.CHEEK_PUFF_LEFT
../_images/17.CHEEK_PUFF_LEFT.png
  • 18.CHEEK_SUCK
../_images/18.CHEEK_SUCK.png
  • 19.MOUTH_UPPER_UPRIGHT
../_images/19.MOUTH_UPPER_UPRIGHT.png
  • 20.MOUTH_UPPER_UPLEFT
../_images/20.MOUTH_UPPER_UPLEFT.png
  • 21.MOUTH_LOWER_DOWNRIGHT
../_images/21.MOUTH_LOWER_DOWNRIGHT.png
  • 22.MOUTH_LOWER_DOWNLEFT
../_images/22.MOUTH_LOWER_DOWNLEFT.png
  • 23.MOUTH_UPPER_INSIDE
../_images/23.MOUTH_UPPER_INSIDE.png
  • 24.MOUTH_LOWER_INSIDE
../_images/24.MOUTH_LOWER_INSIDE.png
  • 25.MOUTH_LOWER_OVERLAY
../_images/25.MOUTH_LOWER_OVERLAY.png
  • 26.TONGUE_LONGSTEP1
../_images/26.TONGUE_LONGSTEP1.png
  • 27.TONGUE_LEFT
../_images/27.TONGUE_LEFT.png
  • 28.TONGUE_RIGHT
../_images/28.TONGUE_RIGHT.png
  • 29.TONGUE_UP
../_images/29.TONGUE_UP.png
  • 30.TONGUE_DOWN
../_images/30.TONGUE_DOWN.png
  • 31.TONGUE_ROLL
../_images/31.TONGUE_ROLL.png
  • 32.TONGUE_LONGSTEP2
../_images/32.TONGUE_LONGSTEP2.png
  • 33.TONGUE_UPRIGHT_MORPH
../_images/33.1.TONGUE_UPRIGHT_MORPH.png ../_images/33.2.TONGUE_UPRIGHT_MORPH.png
  • 34.TONGUE_UPLEFT_MORPH
../_images/34.1.TONGUE_UPLEFT_MORPH.png ../_images/34.2.TONGUE_UPLEFT_MORPH.png
  • 35.TONGUE_DOWNRIGHT_MORPH
../_images/35.1.TONGUE_DOWNRIGHT_MORPH.png ../_images/35.2.TONGUE_DOWNRIGHT_MORPH.png
  • 36.TONGUE_DOWNLEFT_MORPH
../_images/36.1.TONGUE_DOWNLEFT_MORPH.png ../_images/36.2.TONGUE_DOWNLEFT_MORPH.png

Modify AndroidManifest.xml

To enable the Lip Expression feature, you have to add below content to your AndroidManifest.xml.

<uses-feature android:name="wave.feature.lipexpression" android:required="true" />

XR Plugin Feature

After imported the VIVE Wave XR Plugin package you can use the Lip Expression interface.

Lip Expression API

You can refer to Packages > VIVE Wave XR Plugin > Runtime > WaveXRLip.cs about the Lip Expression API.

public enum Expressions
{
    Jaw_Right = 0,
    Jaw_Left = 1,
    Jaw_Forward = 2,
    Jaw_Open = 3,
    Mouth_Ape_Shape = 4,
    Mouth_Upper_Right = 5,
    Mouth_Upper_Left = 6,
    Mouth_Lower_Right = 7,
    Mouth_Lower_Left = 8,
    Mouth_Upper_Overturn = 9,
    Mouth_Lower_Overturn = 10,
    Mouth_Pout = 11,
    Mouth_Smile_Right = 12,
    Mouth_Smile_Left = 13,
    Mouth_Sad_Right = 14,
    Mouth_Sad_Left = 15,
    Cheek_Puff_Right = 16,
    Cheek_Puff_Left = 17,
    Cheek_Suck = 18,
    Mouth_Upper_UpRight = 19,
    Mouth_Upper_UpLeft = 20,
    Mouth_Lower_DownRight = 21,
    Mouth_Lower_DownLeft = 22,
    Mouth_Upper_Inside = 23,
    Mouth_Lower_Inside = 24,
    Mouth_Lower_Overlay = 25,
    Tongue_Longstep1 = 26,
    Tongue_Left = 27,
    Tongue_Right = 28,
    Tongue_Up = 29,
    Tongue_Down = 30,
    Tongue_Roll = 31,
    Tongue_Longstep2 = 32,
    Tongue_UpRight_Morph = 33,
    Tongue_UpLeft_Morph = 34,
    Tongue_DownRight_Morph = 35,
    Tongue_DownLeft_Morph = 36,
    Max,
}

/// Enables or disables the Lip Expression component.
public static void ActivateLipExp(bool active);

/// <summary>
/// Retrieves current status of Lip Expression.
/// </summary>
/// <returns>
/// 0: Not Start
/// 1: Start Failure
/// 2: Starting
/// 3: Stopping
/// 4: Available
/// 5: Unsupported
/// </returns>
public static uint GetLipExpStatus();

/// Checks if the Lip Expression feature is available currently.
public static bool IsLipExpAvailable();

/// Checks if the Lip Expression value is provided in runtime.
public static bool HasLipExpValue();

/// Retrieves the value in float between {0, 1} of an "Expressions".
public static float GetLipExpValue(Expressions exp);

/// Retrieves all Lip Expression values in a float array. The values are sorted in the order of "Expressions"".
public static bool GetLipExpValues(out float[] values);

XR Plugin - Essence Feature

After imported the VIVE Wave XR Plugin - Essence package you can use the Lip Expression interface.

Note

DO NOT use the Lip Expression API of XR Plugin and Essence packages concurrently if you are not familiar with both of them. Choosing one of them is enough for Lip Expression development.

Lip Expression Manager

Before using the Lip Expression API, you need to add a LipExpManager to your scene from the menu item.

../_images/UnityXRLipExp01.png ../_images/UnityXRLipExp02.png

Initial Start: Enables the Lip Expression feature when the AP starts.

Note

Enabling the Lip Expression feature will consume additional power.

Lip Expression API

You can refer to Packages > VIVE Wave XR Plugin - Essence > Runtime > Scripts > LipExpression > LipExpManager.cs about the Lip Expression API.

using Wave.Essence.LipExpression;

public enum LipExp {
    Jaw_Right,
    Jaw_Left,
    Jaw_Forward,
    Jaw_Open,
    Mouth_Ape,
    Mouth_Upper_Right,      // 5
    Mouth_Upper_Left,
    Mouth_Lower_Right,
    Mouth_Lower_Left,
    Mouth_Upper_Overturn,
    Mouth_Lower_Overturn,   // 10
    Mouth_Pout,
    Mouth_Smile_Right,
    Mouth_Smile_Left,
    Mouth_Sad_Right,
    Mouth_Sad_Left,         // 15
    Cheek_Puff_Right,
    Cheek_Puff_Left,
    Cheek_Suck,
    Mouth_Upper_UpRight,
    Mouth_Upper_UpLeft,     // 20
    Mouth_Lower_DownRight,
    Mouth_Lower_DownLeft,
    Mouth_Upper_Inside,
    Mouth_Lower_Inside,
    Mouth_Lower_Overlay,    // 25
    Tongue_Longstep1,
    Tongue_Left,
    Tongue_Right,
    Tongue_Up,
    Tongue_Down,            // 30
    Tongue_Roll,
    Tongue_Longstep2,
    Tongue_UpRight_Morph,
    Tongue_UpLeft_Morph,
    Tongue_DownRight_Morph, // 35
    Tongue_DownLeft_Morph,
    Max,
}

public LipExpStatus GetLipExpStatus()
public void StartLipExp()
public void StopLipExp()
public bool IsLipExpEnabled()

// Specify a type of enum LipExp to retrieve the expression value as float.
public float GetLipExpression(LipExp lipExp)