Navigation
API > API/Plugins > API/Plugins/NeuralMorphModel
Inheritance Hierarchy
- UMLDeformerModel
- UMLDeformerGeomCacheModel
- UMLDeformerMorphModel
- UNeuralMorphModel
References
| Module | NeuralMorphModel |
| Header | /Engine/Plugins/Animation/MLDeformer/NeuralMorphModel/Source/NeuralMorphModel/Public/NeuralMorphModel.h |
| Include | #include "NeuralMorphModel.h" |
Syntax
UCLASS ()
class UNeuralMorphModel : public UMLDeformerMorphModel
Remarks
The neural morph model. This generates a set of highly compressed morph targets to approximate a target deformation based on bone rotations and/or curve inputs. During inference, the neural network inside this model runs on the CPU and outputs the morph target weights for the morph targets it generated during training. Groups of bones and curves can also be defined. Those groups will generate a set of morph targets together as well. This can help when shapes depend on multiple inputs. An external morph target set is generated during training and serialized inside the ML Deformer asset that contains this model. When the ML Deformer component initializes the morph target set is registered. Most of the heavy lifting is done by the UMLDeformerMorphModel class. The neural morph model has two modes: local and global. See the ENeuralMorphMode for a description of the two.
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | BatchSize | The number of frames per batch when training the model. | |
| bool | bEnableBoneMasks | Enable the use of per bone and bone group masks. | |
| TMap< FName, FNeuralMorphMaskInfo > | BoneGroupMaskInfos | Information needed to generate a mask for each bone group. | |
| TArray< FNeuralMorphBoneGroup > | BoneGroups | The set of bones that are grouped together and generate morph targets together as a whole. | |
| TMap< FName, FNeuralMorphMaskInfo > | BoneMaskInfos | Information needed to generate a mask for each bone. | |
| TArray< FNeuralMorphCurveGroup > | CurveGroups | The set of curves that are grouped together and generate morph targets together as a whole. | |
| int32 | GlobalNumHiddenLayers | The number of hidden layers that the neural network model will have.\nHigher numbers will slow down performance but can deal with more complex deformations. | |
| int32 | GlobalNumMorphTargets | The number of morph targets to generate in total. | |
| int32 | GlobalNumNeuronsPerLayer | The number of units/neurons per hidden layer. | |
| float | LearningRate | The learning rate used during the model training. | |
| int32 | LocalNumHiddenLayers | The number of hidden layers that the neural network model will have. | |
| int32 | LocalNumMorphTargetsPerBone | The number of morph targets to generate per bone, curve or group. | |
| int32 | LocalNumNeuronsPerLayer | The number of units/neurons per hidden layer. | |
| ENeuralMorphMode | Mode | The mode that the neural network will operate in. | |
| TObjectPtr< UNeuralMorphNetwork > | NeuralMorphNetwork | The neural morph model network. | |
| int32 | NumIterations | The number of iterations to train the model for. | |
| float | RegularizationFactor | The regularization factor. | |
| float | SmoothLossBeta | The beta parameter in the smooth L1 loss function, which describes below which absolute error to use a squared term. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNeuralMorphModel
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UMLDeformerInputInfo * | |||
| int32 | GetBatchSize () |
||
| const TArray< FNeuralMorphBoneGroup > & | |||
| const TArray< FNeuralMorphCurveGroup > & | |||
| FString | |||
| int32 | |||
| int32 | |||
| int32 | |||
| float | |||
| int32 | |||
| int32 | |||
| int32 | |||
| int32 | |||
| ENeuralMorphMode | GetModelMode () |
||
| UNeuralMorphNetwork * | |||
| int32 | |||
| int32 | |||
| float | |||
| float | |||
| bool | |||
| bool | IsTrained () |
||
| void | SetNeuralMorphNetwork
(
UNeuralMorphNetwork* Net |
||
| void | SetNumIterations
(
int32 InNumIterations |
||
| void |
Overridden from UMLDeformerMorphModel
| Type | Name | Description | |
|---|---|---|---|
| UMLDeformerModelInstance * | CreateModelInstance
(
UMLDeformerComponent* Component |
Overridden from UMLDeformerGeomCacheModel
| Type | Name | Description | |
|---|---|---|---|
| void | GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
||
| void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
||
| void | PostLoad () |
||
| void |