UMLDeformerAsset

The machine learning deformer asset.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MLDeformer

Header

/Engine/Plugins/Experimental/MLDeformer/Source/MLDeformer/Public/MLDeformerAsset.h

Include

#include "MLDeformerAsset.h"

Syntax

UCLASS(BlueprintType, HideCategories=Object)
class UMLDeformerAsset :
    public UObject,
    public IBoneReferenceSkeletonProvider

Remarks

The machine learning deformer asset. At runtime this contains only the data needed to run the neural network inference. In the editor it contains the skeletal mesh and geometry cache that are required to calculate vertex position deltas.

Variables

Name Description

Public variable UProperty Category, EditAnywhere, AdvancedDisplay BlueprintReadWrite

EActivationFunc...

 

ActivationFunction

The activation function to use in the neural network.

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

FTransform

 

AlignmentTransform

The transform that aligns the Geometry Cache to the SkeletalMesh.

Public variable UProperty Category, EditAnywhere

TObjectPtr< UAn...

 

AnimSequence

The animation sequence to apply to the base mesh.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

BatchSize

The number of frames per batch when training the model.

Public variable UProperty Category, EditAnywhere, Meta

TArray< FBoneRe...

 

BoneIncludeList

The bones to include during training.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

CacheSizeInMegabytes

The maximum allowed size of the training cache in memory, in megabytes.

Public variable UProperty Category, EditAnywhere, Meta

TArray< FCurveR...

 

CurveIncludeList

The curves to include during training.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay BlueprintReadWrite

EDecayFunction

 

DecayFunction

The decay function to adapt the learning rate.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta BlueprintReadWrite

float

 

DecayRate

The decay rate to apply to the learning rate once non-decay epochs have been reached.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

float

 

DeltaCutoffLength

Sometimes there can be some vertices that cause some issues that cause deltas to be very long.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay BlueprintReadWrite

EDeviceType

 

DeviceType

The loss function to use during model training.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

Epochs

The number of epochs to process without any decay.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

EpochsWithDecay

The number of epochs to process that include a decay.

Public variable UProperty Category, EditAnywhere

TObjectPtr< UGe...

 

GeometryCache

The geometry cache that represents the complex mesh deformations.

Public variable UProperty

FMLDeformerInpu...

 

InputInfo

The information about the neural network inputs.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta BlueprintReadWrite

float

 

LearningRate

The learning rate used during the model training.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay BlueprintReadWrite

ELossFunction

 

LossFunction

The loss function to use during model training.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

MaxTrainingFrames

The maximum numer of training frames (samples) to train on.

Public variable UProperty

TObjectPtr< UNe...

 

NeuralNetwork

The neural network to use for inference.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta BlueprintReadWrite

float

 

NoiseAmount

The percentage of noise to add.

Public variable UProperty

int32

 

NumGeomCacheVerts

Cached number of geom cache vertices.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

NumHiddenLayers

The number of hidden layers that the neural network model will have.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

int32

 

NumNeuronsPerLayer

The number of units/neurons per hidden layer.

Public variable UProperty

int32

 

NumSkeletalMeshVerts

Cached number of skeltal mesh vertices.

Public variable

FRenderCommandF...

 

RenderResourceDestroyFence

Fence used in render thread cleanup on destruction.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta BlueprintReadWrite

float

 

ShrinkageSpeed

Shrinkage speed. Only if the shrinkage loss is used.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta BlueprintReadWrite

float

 

ShrinkageThreshold

Shrinkage threshold. Only if the shrinkage loss is used.

Public variable UProperty Category, EditAnywhere

TObjectPtr< USk...

 

SkeletalMesh

The skeletal mesh that represents the linear skinned mesh.

Public variable

ETrainingInputs

 

TempTrainingInputs

Public variable UProperty Category, EditAnywhere

ETrainingInputs

 

TrainingInputs

Describes what inputs we should train the neural network on.

Public variable UProperty

FVector3f

 

VertexDeltaMean

The vertex delta mean.

Public variable UProperty

FVector3f

 

VertexDeltaScale

The vertex delta scale. This is passed to the deformer shader to rescale the output deltas.

Public variable UProperty

TArray< int32 >

 

VertexMap

This is an index per vertex in the mesh, indicating the imported vertex number from the source asset.

Public variable

FVertexMapBuffe...

 

VertexMapBuffer

GPU buffers for Vertex Map.

Public variable UProperty

TObjectPtr< UML...

 

VizSettings

The visualization settings.

Constructors

Name Description

Public function

UMLDeformerAsset

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

FMLDeformerI...

 

CreateInputInfo()

Public function Static

int32

 

ExtractNumImportedGeomCacheVertices

(
    UGeometryCache* GeomCache
)

Public function Static

int32

 

ExtractNumImportedSkinnedVertices

(
    USkeletalMesh* SkeletalMesh
)

Public function Static

void

 

GenerateMeshMappings

(
    UMLDeformerAsset* DeformerAsse...,
    TArray< FMLDeformerMeshMapping >& ...,
    TArray< FString >& OutFailedImport...
)

Public function Const

const FTrans...

 

GetAlignmentTransform()

Public function

UAnimSequenc...

 

GetAnimSequence()

Public function Const

const UAnimS...

 

GetAnimSequence()

Public function Const

FText

 

GetAnimSequenceErrorText

(
    UGeometryCache* InGeomCache,
    UAnimSequence* InAnimSequence
)

Public function Const

FText

 

GetBaseAssetChangedErrorText()

Public function Const

const TArray...

 

GetBoneIncludeList()

Public function

TArray< FBon...

 

GetBoneIncludeList()

Public function Const

int32

 

GetCacheSizeInMegabytes()

Public function Const

const TArray...

 

GetCurveIncludeList()

Public function

TArray< FCur...

 

GetCurveIncludeList()

Public function Const

float

 

GetDeltaCutoffLength()

Public function Const

FText

 

GetGeomCacheErrorText

(
    UGeometryCache* InGeomCache
)

Public function

UGeometryCac...

 

GetGeometryCache()

Public function Const

const UGeome...

 

GetGeometryCache()

Public function Const

FText

 

GetIncompatibleSkeletonErrorText

(
    USkeletalMesh* InSkelMesh,
    UAnimSequence* InAnimSeq
)

Public function Const

UNeuralNetwo...

 

GetInferenceNeuralNetwork()

Public function Const

const FMLDef...

 

GetInputInfo()

Public function

FMLDeformerI...

 

GetInputInfo()

Public function Const

FText

 

GetInputsErrorText()

Public function Const

FText

 

GetMeshMappingErrorText()

Public function Const

int32

 

GetNumFrames()

Public function Const

int32

 

GetNumFramesForTraining()

Public function

USkeletalMes...

 

GetSkeletalMesh()

Public function Const

const USkele...

 

GetSkeletalMesh()

Public function Const

FText

 

GetSkeletalMeshNeedsReimportErrorText()

Public function Const

FText

 

GetTargetAssetChangedErrorText()

Public function Const

ETrainingInp...

 

GetTempTrainingInputs()

Public function Const

int32

 

GetTrainingFrameLimit()

Public function Const

ETrainingInp...

 

GetTrainingInputs()

Public function Const

const FVecto...

 

GetVertexDeltaMean()

Public function Const

const FVecto...

 

GetVertexDeltaScale()

Public function Const

FText

 

GetVertexErrorText

(
    USkeletalMesh* InSkelMesh,
    UGeometryCache* InGeomCache,
    const FText& SkelName,
    const FText& GeomCacheName
)

Public function Const

const TArray...

 

GetVertexMap()

Public function Const

const FVerte...

 

GetVertexMapBuffer()

Public function Const

const UMLDef...

 

GetVizSettings()

Public function

UMLDeformerV...

 

GetVizSettings()

Public function

void

 

InitBoneIncludeListToAnimatedBonesOnly()

Public function

void

 

InitCurveIncludeListToAnimatedCurvesOnly()

Public function

void

 

InitGPUData()

Public function

void

 

InitVertexMap()

Public function Const

bool

 

IsCompatibleWithNeuralNet()

Public function

void

 

SetInputInfo

(
    const FMLDeformerInputInfo& Input
)

Public function

void

 

SetTempTrainingInputs

(
    ETrainingInputs Inputs
)

Public function

void

 

UpdateCachedNumVertices()

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from IBoneReferenceSkeletonProvider

Name Description

Public function Virtual

USkeleton &#...

 

GetSkeleton

(
    bool& bInvalidSkeletonIsError
)

Called to get the skeleton that FBoneReference's details customization will use to populate bone names.