Skip to content
Snippets Groups Projects
Select Git revision
  • 9e168acb2fae4675c4068ef5e69063a7e9f36d45
  • 5.3 default protected
  • feature/animation-layering-system
  • feature/MH-audio2face
  • feature/add-new-animations
  • fix/investigate-sync-issues
  • WIP/MA_Dasbach_Bystander
  • thesis/MA_Kuehlem
  • deprecated/4.27
  • thesis/MA_drupp_city-guide
  • thesis/BA_pgriesser_handshake
  • thesis/BA_rschaefer
  • deprecated/4.26
  • thesis/MA_Ye
  • thesis/BA_tsittart
  • thesis/MA_amoedder_natural_gaze_sim
  • thesis/MA_tyroller_backchannels
  • thesis/BA_dvonk_influence-maps
  • thesis/MA_dkuznietsov_emotional-speech
  • fix/random
  • deprecated/4.22
21 results

VHFacialExpressions.h

Blame
  • VHFacialExpressions.h 3.54 KiB
    // Fill out your copyright notice in the Description page of Project Settings.
    
    #pragma once
    
    #include "CoreMinimal.h"
    #include "Components/ActorComponent.h"
    #include "Animation/PoseAsset.h"
    #include "Misc/DefaultValueHelper.h"
    #include "VHFacialExpressions.generated.h"
    
    class UAnimInstance;
    class AVirtualHuman;
    
    UENUM()
    enum Emotions 
    {
    	Neutral = 0	UMETA(DisplayName = "Neutral"), 
    	Happiness = 1 UMETA(DisplayName = "Happiness"), 
    	Sadness = 2 UMETA(DisplayName = "Sadness"),
    	Surprise = 3 UMETA(DisplayName = "Surprise"),
    	Fear = 4 UMETA(DisplayName = "Fear"),
    	Anger = 5 UMETA(DisplayName = "Anger"),
    	Disgust = 6 UMETA(DisplayName = "Disgust"),
    	Contempt = 7 UMETA(DisplayName = "Contempt"),
    	Custom = 9 UMETA(DisplayName = "Custom")
    };
    
    UENUM()
    enum FACSSidedness 
    {
    	AU_Both = 0	UMETA(DisplayName = "Both"), 
    	AU_Left = 1 UMETA(DisplayName = "Left"), 
    	AU_Right = 2 UMETA(DisplayName = "Right")
    };
    
    // Action Units (from FACS) and their associated CharacterCreator 3 blendshapes
    // AUs that are bSided, use the names BlendShapeName + "_L" and + "_R"
    USTRUCT()
    struct FAUBlendshape
    {
    	GENERATED_BODY()
    	int ActionUnitNumber;
    	FString BlendShapeName;
    	float BlendShapeValue;
    };
    
    USTRUCT()
    struct FAUPose
    {
    	GENERATED_BODY()
    	int ActionUnitNumber;
    	bool bSided = false;
    	//if not sided, Blendshapes has one element
    	//if sided, Blendshapes has two elements: 0: left, 1: right
    	TArray<TArray<FAUBlendshape>> Blendshapes;
    };
    
    USTRUCT(BlueprintType, Blueprintable)
    struct FACSValue
    {
    	GENERATED_BODY()
    	int AUNumber;
    	float Value;
    	FACSSidedness Side;
    };
    
    
    UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
    class CHARACTERPLUGIN_API UVHFacialExpressions : public UActorComponent
    {