Navigation
API > API/Plugins > API/Plugins/NeuralMorphModel
The specialized neural network for the Neural Morph Model. This class is used to do inference at runtime at a higher performance than using UNeuralNetwork. The reason why it is faster is because it is a highly specialized network for this specific model. When the model is a local mode based model, there can be actually two neural networks inside this: one main network and a bone/curve group network. The group network uses groups of bones or curves to generate morph targets, rather than individual bones/curves.
| Name | UNeuralMorphNetwork |
| Type | class |
| Header File | /Engine/Plugins/Animation/MLDeformer/NeuralMorphModel/Source/NeuralMorphModel/Public/NeuralMorphNetwork.h |
| Include Path | #include "NeuralMorphNetwork.h" |
Syntax
UCLASS (MinimalAPI)
class UNeuralMorphNetwork : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UNeuralMorphNetwork
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| These are required because of the use of TSharedPtr. | NeuralMorphNetwork.h | ||
UNeuralMorphNetwork
(
const FObjectInitializer& ObjectInitializer |
NeuralMorphNetwork.h | ||
UNeuralMorphNetwork
(
FVTableHelper& Helper |
NeuralMorphNetwork.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UNeuralMorphNetwork() |
NeuralMorphNetwork.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GroupModel | TSharedPtr< UE::NNE::IModelCPU > | The Neural Network for the bone and curve groups, when in local mode. | NeuralMorphNetwork.h | |
| GroupModelData | TObjectPtr< UNNEModelData > | The Model Data for the Group Network | NeuralMorphNetwork.h | |
| InputMeans | TArray< float > | The means of the input values, used to normalize inputs. | NeuralMorphNetwork.h | |
| InputStd | TArray< float > | The standard deviation of the input values, used to normalize inputs. | NeuralMorphNetwork.h | |
| MainModel | TSharedPtr< UE::NNE::IModelCPU > | The Neural Network that acts as main network. | NeuralMorphNetwork.h | |
| MainModelData | TObjectPtr< UNNEModelData > | The Model Data for the Main Network | NeuralMorphNetwork.h | |
| Mode | ENeuralMorphMode | The mode of the network, either local or global. | NeuralMorphNetwork.h | |
| NumBones | int32 | The number of bones that were input. | NeuralMorphNetwork.h | |
| NumCurves | int32 | The number of curves that were input. | NeuralMorphNetwork.h | |
| NumFloatsPerCurve | int32 | The number of floats per curve. | NeuralMorphNetwork.h | |
| NumGroups | int32 | The number of groups. This is a group of bones/curves that create their own morphs. | NeuralMorphNetwork.h | |
| NumItemsPerGroup | int32 | The number of items (bones/curves) per group. | NeuralMorphNetwork.h | |
| NumMorphs | int32 | The total number of morph targets, if set Mode == Global, otherwise ignored. | NeuralMorphNetwork.h | |
| NumMorphsPerBone | int32 | The number of morph targets per bone, if set Mode == Local, otherwise ignored. | NeuralMorphNetwork.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNeuralMorphNetworkInstance * CreateInstance() |
Create an instance of this neural network. | NeuralMorphNetwork.h | |
void Empty() |
Clear the network, getting rid of all weights and biases. | NeuralMorphNetwork.h | |
UNeuralMorphMLP * GetGroupMLP() |
NeuralMorphNetwork.h | ||
UE::NNE::IModelCPU * GetGroupModel () |
Get the Model used for group of bones and curves. | NeuralMorphNetwork.h | |
const TArrayView< const float > GetInputMeans() |
Get the means of each input, used for normalizing the input values. | NeuralMorphNetwork.h | |
const TArrayView< const float > GetInputStds() |
Get the standard deviations of each input, used for normalizing the input values. | NeuralMorphNetwork.h | |
PRAGMA_DISABLE_DEPRECATION_WARNINGSUNeuralMorphMLP * GetMainMLP() |
NeuralMorphNetwork.h | ||
UE::NNE::IModelCPU * GetMainModel () |
Get the main Model. | NeuralMorphNetwork.h | |
ENeuralMorphMode GetMode() |
Get the mode that the model was trained for, either global or local mode. | NeuralMorphNetwork.h | |
int32 GetNumBones() |
Get the number of bones that are input to the network. | NeuralMorphNetwork.h | |
int32 GetNumCurves() |
Get the number of curves that are input to the network. | NeuralMorphNetwork.h | |
int32 GetNumFloatsPerCurve() |
Get the number of floats used to represent a single curve value. | NeuralMorphNetwork.h | |
int32 GetNumGroupInputs() |
Get the number of network inputs for the group network. | NeuralMorphNetwork.h | |
int32 GetNumGroupOutputs() |
Get the number of network outputs for the group network. | NeuralMorphNetwork.h | |
int32 GetNumGroups () |
Get the number of groups. | NeuralMorphNetwork.h | |
int32 GetNumInputs() |
Get the number of network inputs. This is the number of main network inputs. | NeuralMorphNetwork.h | |
int32 GetNumItemsPerGroup () |
Get the number of items per group. | NeuralMorphNetwork.h | |
int32 GetNumMainInputs() |
Get the number of network inputs for the main network. | NeuralMorphNetwork.h | |
int32 GetNumMainOutputs() |
Get the number of network outputs for the main network. | NeuralMorphNetwork.h | |
int32 GetNumMorphsPerBone () |
Get the number of morph targets per bone. | NeuralMorphNetwork.h | |
int32 GetNumOutputs () |
Get the number of network outputs. | NeuralMorphNetwork.h | |
bool IsEmpty () |
Check if the network is empty or not. | NeuralMorphNetwork.h | |
bool Load
(
const FString& Filename |
Load the network from a file on disk. When loading fails, the network will be emptied. | NeuralMorphNetwork.h | |
virtual void PostLoad() |
Used to convert the legacy neural network format to the NNE format | NeuralMorphNetwork.h |