Select Git revision
VHFacialExpressions.h
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
{