Navigation
API > API/Plugins > API/Plugins/NearestNeighborModel
Inheritance Hierarchy
- UMLDeformerModel
- UMLDeformerGeomCacheModel
- UMLDeformerMorphModel
- UNearestNeighborModel
References
| Module | NearestNeighborModel |
| Header | /Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Source/NearestNeighborModel/Public/NearestNeighborModel.h |
| Include | #include "NearestNeighborModel.h" |
Syntax
UCLASS&40;&41;
class UNearestNeighborModel : public UMLDeformerMorphModel
Remarks
The nearest neighbor model. This model contains the PCA basis of the cloth vertex deltas and a small set of cloth for nearest neighbor search. Given a new pose, the pre-trained neural network first predicts the PCA coefficients of the vertex deltas. Then this model uses the predicted PCA coeffcients to find a nearest neighbor in the small cloth set. The total vertex delta is computed by vertex_delta = mean_delta + pca_basis * pca_coeff + nearest_neighbor_delta To prevent popping, a time filtering is applied on predicted vertex deltas. The vertex delta at time t is computed by vertex_delta(t) = decay_factor * vertex_delta(t-1) + (1 - decay_factor) * vertex_delta The cloth can be separated into several parts (e.g. shirt, pants...). The nearest neighbor search is carried out separately for each part. The pca basis and the nearest neighbor data are compressed into morph targets.
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | BasisSmoothIter | ||
| int32 | BatchSize | ||
| bool | bClothPartDataValid | ||
| bool | bMorphTargetDataValid | ||
| bool | bNearestNeighborDataValid | ||
| bool | bRecomputeDeltas | ||
| bool | bRecomputePCA | ||
| bool | bUseDualQuaternionDeltas | ||
| bool | bUseFileCache | ||
| bool | bUseInputMultipliers | ||
| TArray< FClothPartData > | ClothPartData | ||
| TArray< FClothPartEditorData > | ClothPartEditorData | ||
| float | DecayFactor | ||
| FString | FileCacheDirectory | ||
| TArray< int32 > | HiddenLayerDims | ||
| int32 | InputDim | ||
| TArray< FVector3f > | InputMultipliers | ||
| TArray< float > | InputsMax | ||
| TArray< float > | InputsMin | ||
| int32 | KMeansPartId | ||
| float | LearningRate | ||
| float | MorphDataSize | ||
| TArray< FSkeletonCachePair > | NearestNeighborData | ||
| float | NearestNeighborOffsetWeight | ||
| int32 | NumClusters | ||
| int32 | NumEpochs | ||
| int32 | OutputDim | ||
| float | SavedNetworkSize | ||
| TArray< TObjectPtr< UAnimSequence > > | SourceAnims |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNearestNeighborModel
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UMLDeformerInputInfo * | |||
| FString |
Overridden from UMLDeformerMorphModel
| Type | Name | Description | |
|---|---|---|---|
| UMLDeformerModelInstance * | CreateModelInstance
(
UMLDeformerComponent* Component |
||
| bool | |||
| void | PostLoad () |
Overridden from UMLDeformerGeomCacheModel
Constants
| Name | Description |
|---|---|
| NearestNeighborNumFloatsPerBone | |
| NearestNeighborNumFloatsPerCurve |