MetaPerson Eyes Animation Sample
This sample demonstrates how to animate eye movements, such as looking up, down, left, and right.
The source code of the sample is available on GitHub: MetaPerson Eyes Animation Sample
How To Move Eyes
To move the eyes, follow these steps:
- Set the corresponding blendshape values for the AvatarHead and AvatarEyelashes meshes.
- Rotate the LeftEye and RightEye bones.
- The rotation angle should be interpolated between zero and the maximum angle value.
- This angle depends on the blendshape weight.
Blendshapes names and maximum angles values can be found below.
Look Up Extreme Position
- AvatarHead and AvatarEyelashes blendshapes:
eyeLookUpLeft
= MAX_BLEND_VALUEeyeLookUpRight
= MAX_BLEND_VALUEeyeLookDownLeft
= 0eyeLookDownRight
= 0
- Rotate LeftEye and RightEye along the local X axis by -23 degrees.
Look Down Extreme Position
1. AvatarHead and AvatarEyelashes blendshapes:
eyeLookUpLeft
= 0eyeLookUpRight
= 0eyeLookDownLeft
= MAX_BLEND_VALUEeyeLookDownRight
= MAX_BLEND_VALUE
2. Rotate LeftEye and RightEye along the local X axis by 23 degrees.
Look Left Extreme Position
1. AvatarHead and AvatarEyelashes blendshapes:
eyeLookOutLeft
= MAX_BLEND_VALUEeyeLookOutRight
= 0eyeLookInLeft
= 0eyeLookInRight
= MAX_BLEND_VALUE
2. Rotate LeftEye along the local Y axis by -45 degrees.
3. Rotate RightEye along the local Y axis by -25 degrees.
Look Right Extreme Position
1. AvatarHead and AvatarEyelashes blendshapes:
- eyeLookOutLeft = 0
- eyeLookOutRight = MAX_BLEND_VALUE
- eyeLookInLeft = MAX_BLEND_VALUE
- eyeLookInRight = 0
2. Rotate LeftEye along the local Y axis by 25 degress.
3. Rotate RightEye along the local Y axis by 45 degress.