AvatarReady
Loading...
Searching...
No Matches
Inria.Avatar.AvatarReady.FacialAnimationFeature Class Referenceabstract

Facial animation feature - API, set values (blendshapes / action units / visemes / emotions) More...

Inheritance diagram for Inria.Avatar.AvatarReady.FacialAnimationFeature:
Inria.Avatar.AvatarReady.AvatarFeature Inria.Avatar.AvatarReady.FacialAnimationFeatureCharacterCreator Inria.Avatar.AvatarReady.FacialAnimationFeatureRocketBox

Classes

class  BlendshapeData
 

Public Types

enum  Emotions {
  None , Happiness , Sadness , Surprise ,
  Fear , Anger , Disgust , Contempt
}
 
enum  Visemes {
  sil , PP , FF , TH ,
  DD , kk , CH , SS ,
  nn , RR , aa , E ,
  ih , oh , ou
}
 
enum  ActionUnits {
  NeutralFace = 0 , InnerBrowRaiser , OuterBrowRaiser , BrowLowerer = 4 ,
  UpperLidRaiser , CheekRaiser , LidTightener , LipsTowardEachOther ,
  NoseWrinkler , UpperLipRaiser , NasolabialDeepener , LipCornerPuller ,
  SharpLipPuller , Dimpler , LipCornerDepressor , LowerLipDepressor ,
  ChinRaiser , LipPucker , TongueShow , LipStretcher ,
  NeckTightener , LipFunneler , LipTightener , LipPressor ,
  LipsPart , JawDrop , MouthStretch , LipSuck ,
  LidDroop = 41 , Slit , EyesClosed , Squint ,
  Blink , Wink , LipCornerPullerRight = 121 , DimplerRight = 141
}
 
enum  MicroExpressionTypes { Continuous , Pulse }
 

Public Member Functions

void SetBlendshape (string blendshapeName, float weight)
 Call this method every frame to set the Blendshape to the given weight. The weight is between 0 and 100.
 
void SetActionUnit (ActionUnits actionUnit, float weight)
 Call this method every frame to set the ActionUnit to the given weight. The weight is between 0 and 100.
 
void SetEmotion (Emotions emotion, float weight)
 Call this method every frame to set the Emotion to the given weight. The weight is between 0 and 100.
 
void SetViseme (Visemes viseme, float weight)
 Call this method every frame to set the Viseme to the given weight. The weight is between 0 and 100.
 
void SetViseme (float[] visemesWeights)
 Call this method every frame to set all the Visemes to their given weights. The weight is between 0 and 1.
 
override void InitFeature (AvatarReady avatar)
 Initialize the feature.
 
- Public Member Functions inherited from Inria.Avatar.AvatarReady.AvatarFeature
virtual void ResetFeature ()
 

Public Attributes

float[] EditorEmotionsWeight
 
float[] EditorVisemesWeight
 
float[] EditorActionUnitsWeight
 
bool EyeBlink = true
 
bool EyeMicroMovement = true
 
bool BreathingMovement = true
 
bool FacialMicroExpressions = true
 
MicroExpressionTypes MicroExpressionType = MicroExpressionTypes.Continuous
 

Protected Member Functions

virtual void AwakeData ()
 

Properties

Dictionary< ActionUnits, List< string > > ActionUnitToBlendshapes [get]
 
Dictionary< Visemes, List< string > > VisemeToBlendshapes [get]
 
List< Tuple< float, List< string > > > MicroExpressionBlendshapes [get]
 
List< Tuple< float, List< string > > > BreathingBlendshapes [get]
 

Private Member Functions

void Awake ()
 
void Start ()
 
void Update ()
 
void LateUpdate ()
 
void AwakeProcedural ()
 
void StartProcedural ()
 
void UpdateProcedural ()
 
IEnumerator BlinkCoroutine ()
 
IEnumerator MicroExpressionContinuousCoroutine (Tuple< float, List< string > > microExpression)
 
IEnumerator MicroExpressionPulseCoroutine ()
 

Private Attributes

AvatarReady avatarReady
 
List< SkinnedMeshRenderer > skinnedMeshRenderers
 
Dictionary< string, BlendshapeDatablendshapesWeight = new Dictionary<string, BlendshapeData>()
 
readonly Dictionary< Emotions, List< Tuple< ActionUnits, float > > > emotionToActionUnits
 Link between an Emotion and the corresponding ActionUnits (with associated Intensity)
 
Animator animator
 
float nextBlink
 
Transform leftEye
 
Transform rightEye
 
Vector3 leftInitialRotation
 
Vector3 rightInitialRotation
 
float nextEyeMovement
 
float nextMicroExpressionPulse
 
bool launchedContinuousCoroutine = false
 

Static Private Attributes

const float FACSIntensityDefault = 1.0f
 
const float FACSIntensityA = 0.6f
 
const float FACSIntensityB = 0.7f
 
const float FACSIntensityC = 0.8f
 
const float FACSIntensityD = 0.9f
 
const float FACSIntensityE = 1.0f
 

Detailed Description

Facial animation feature - API, set values (blendshapes / action units / visemes / emotions)

Facial animation feature - Main logic.

Facial animation feature - Data.

Facial animation feature - behaviour calls.

Member Function Documentation

◆ InitFeature()

override void Inria.Avatar.AvatarReady.FacialAnimationFeature.InitFeature ( AvatarReady avatar)
inlinevirtual

Initialize the feature.

Parameters
avatarAvatar Ready Component on which the feature is initialized

Reimplemented from Inria.Avatar.AvatarReady.AvatarFeature.


The documentation for this class was generated from the following files: