Navigation
API > API/Plugins > API/Plugins/MLDeformerFramework
An instance of the ML Deformer model. The ML Deformer model contains shared data, while this instance contains data unique to the actor it is being applied to. So if you have 1 ML Deformer model, applied to 100 enemy actors, you will get 100 ML Deformer Model Instance objects. The model instance is created and managed by the ML Deformer component. The main task of the model instance is to feed the neural network with the right input values and run the neural network inference at runtime, and possibly do something with the output.
| Name | UMLDeformerModelInstance |
| Type | class |
| Header File | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFramework/Public/MLDeformerModelInstance.h |
| Include Path | #include "MLDeformerModelInstance.h" |
Syntax
UCLASS (MinimalAPI)
class UMLDeformerModelInstance : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMLDeformerModelInstance
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMLDeformerModelInstance() |
MLDeformerModelInstance.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
MLDeformerModelInstance.h | ||
virtual FString CheckCompatibility
(
USkeletalMeshComponent* InSkelMeshComponent, |
Check whether the deformer is compatible with a given skeletal mesh component. | MLDeformerModelInstance.h | |
virtual void CopyDataFromCurrentDebugActor () |
Copy over data from the debug actor, if any is used. | MLDeformerModelInstance.h | |
virtual void CopyDataFromDebugActor
(
const AActor* DebugActor, |
Copy data from a specific debug actor. | MLDeformerModelInstance.h | |
const FString & GetCompatibilityErrorText () |
Get the compatibility error text. | MLDeformerModelInstance.h | |
USkeletalMeshComponent * GetFinalSkeletalMeshComponent () |
Get the skeletal mesh component to get transforms from etc. | MLDeformerModelInstance.h | |
int32 GetGroundTruthFrameIndex() |
Get the frame index that we use to sample the ground truth vertex positions when showing the heat map in ground truth mode. | MLDeformerModelInstance.h | |
UMLDeformerComponent * GetMLDeformerComponent() |
Get the ML Deformer component that this instance is part of. | MLDeformerModelInstance.h | |
UMLDeformerModel * GetModel() |
Get the model that this is an instance of. | MLDeformerModelInstance.h | |
int32 GetNeuralNetworkInferenceHandle() |
Get the neural network inference handle. | MLDeformerModelInstance.h | |
USkeletalMeshComponent * GetSkeletalMeshComponent() |
Get the skeletal mesh component we're working with. | MLDeformerModelInstance.h | |
bool HasPostInitialized() |
Check whether we already called UMLDeformerModel::PostMLDeformerComponentInit. | MLDeformerModelInstance.h | |
virtual void Init
(
USkeletalMeshComponent* SkelMeshComponent |
Initialize the model instance. | MLDeformerModelInstance.h | |
bool IsCompatible() |
Is the deformer asset used compatible with the skeletal mesh component used during the Init call? | MLDeformerModelInstance.h | |
virtual bool IsReadyForFinishDestroy() |
MLDeformerModelInstance.h | ||
virtual bool IsValidForDataProvider () |
Check if we are in a valid state for the deformer graph's data provider. | MLDeformerModelInstance.h | |
virtual void PostMLDeformerComponentInit () |
Initialize this model, after the ML deformer component has been initialized. | MLDeformerModelInstance.h | |
virtual void PostTick
(
bool bExecuteCalled |
Executed at the end of the tick. | MLDeformerModelInstance.h | |
virtual void Release() |
Release all built lookup tables etc. Also call this base class method if you override this method. | MLDeformerModelInstance.h | |
void SetGroundTruthFrameIndex
(
int32 FrameIndex |
Set the frame index that we use to sample the ground truth vertex positions when showing the heat map in ground truth mode. | MLDeformerModelInstance.h | |
void SetHasPostInitialized
(
bool bHasInitialized |
Set whether we had a successful call to UMLDeformerModel::PostMLDeformerComponentInit. | MLDeformerModelInstance.h | |
void SetModel
(
UMLDeformerModel* InModel |
Set the deformer model that this is an instance of. | MLDeformerModelInstance.h | |
virtual void Tick
(
float DeltaTime, |
Update the deformer instance. | MLDeformerModelInstance.h | |
void UpdateCompatibilityStatus() |
Update the compatibility status, as returned by IsCompatible() and GetCompatibilityErrorText(). | MLDeformerModelInstance.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DrawDebugInputPoses () |
Draw the input poses that are currently input to this instance. | MLDeformerModelInstance.h | |
virtual void Execute
(
float ModelWeight |
Execute the model instance, which can run the neural network inference in case the model uses a neural network. | MLDeformerModelInstance.h | |
virtual void HandleZeroModelWeight () |
Handle when the model weight is zero. | MLDeformerModelInstance.h | |
bool HasValidTransforms () |
Check whether we have valid transforms in the skeletal mesh component. | MLDeformerModelInstance.h | |
virtual int64 SetBoneTransforms
(
float* OutputBuffer, |
Set the bone transformations inside a given output buffer, starting from a given StartIndex. | MLDeformerModelInstance.h | |
virtual int64 SetCurveValues
(
float* OutputBuffer, |
Set the animation curve values inside a given output buffer, starting from a given StartIndex. | MLDeformerModelInstance.h | |
virtual int64 SetNeuralNetworkInputValues
(
float* InputData, |
Update the neural network input values directly inside its input tensor. | MLDeformerModelInstance.h | |
virtual bool SetupInputs () |
Setup the neural network for this frame. | MLDeformerModelInstance.h | |
void UpdateBoneTransforms() |
Updates the bone transforms array. | MLDeformerModelInstance.h |