unreal.VertexDeltaModel

class unreal.VertexDeltaModel(outer: Object | None = None, name: Name | str = 'None')

Bases: MLDeformerGeomCacheModel

The vertex delta model, which uses a GPU based neural network. This model acts more as an example of how to implement a model that only uses the GPU. It is not as efficient as the Neural Morph Model, even though that model runs on the CPU. Unlike the Neural Morph Model this Vertex Delta Model does not generate any morph targets. All the vertex deltas are directly output by the neural network. This buffer of output deltas remains on the GPU and is then used as input buffer directly inside an optimus deformer graph.

C++ Source:

  • Plugin: VertexDeltaModel

  • Module: VertexDeltaModel

  • File: VertexDeltaModel.h

Editor Properties: (see get_editor_property/set_editor_property)

  • alignment_transform (Transform): [Read-Write] The transform that aligns the Geometry Cache to the SkeletalMesh. This will mostly apply some scale and a rotation, but no translation.

  • anim_sequence (AnimSequence): [Read-Write] The animation sequence to apply to the base mesh. This has to match the animation of the target mesh’s geometry cache. Internally we force the Interpolation property for this motion to be “Step”. deprecated: Use the training input anims instead.

  • batch_size (int32): [Read-Write] The number of frames per batch when training the model.

  • delta_cutoff_length (float): [Read-Write] Sometimes there can be some vertices that cause some issues that cause deltas to be very long. We can ignore these deltas by setting a cutoff value. Deltas that are longer than the cutoff value (in units), will be ignored and set to zero length.

  • geometry_cache (GeometryCache): [Read-Write] The geometry cache that represents the target deformations. deprecated: Use the training input anims instead.

  • learning_rate (float): [Read-Write] The learning rate used during the model training.

  • max_num_lo_ds (int32): [Read-Write] How many Skeletal Mesh LOD levels should we generate MLD lods for at most? Some examples: A value of 1 means we only store one LOD, which means LOD0. A value of 2 means we support this ML Deformer on LOD0 and LOD1. A value of 3 means we support this ML Deformer on LOD0 and LOD1 and LOD2. We never generate more LOD levels for the ML Deformer than number of LOD levels in the Skeletal Mesh, so if this value is set to 100, while the Skeletal Mesh has only 4 LOD levels, we will only generate and store 4 ML Deformer LODs. The default value of 1 means we do not support this ML Deformer at LOD levels other than LOD0. When cooking, the console variable “sg.MLDeformer.MaxLODLevelsOnCook” can be used to set the maximum value per device or platform.

  • max_training_frames (int32): [Read-Write] The maximum numer of training frames (samples) to train on. Use this to train on a sub-section of your full training data.

  • num_hidden_layers (int32): [Read-Write] 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.

  • num_iterations (int32): [Read-Write] The number of iterations to train the model for.

  • num_neurons_per_layer (int32): [Read-Write] The number of units/neurons per hidden layer. Higher numbers will slow down performance but allow for more complex mesh deformations.

  • skeletal_mesh (SkeletalMesh): [Read-Write] The skeletal mesh that represents the linear skinned mesh.

  • training_input_anims (Array[MLDeformerGeomCacheTrainingInputAnim]): [Read-Write]

property batch_size: int

[Read-Write] The number of frames per batch when training the model.

Type:

(int32)

property learning_rate: float

[Read-Write] The learning rate used during the model training.

Type:

(float)

property num_hidden_layers: int

[Read-Write] 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.

Type:

(int32)

property num_iterations: int

[Read-Write] The number of iterations to train the model for.

Type:

(int32)

property num_neurons_per_layer: int

[Read-Write] The number of units/neurons per hidden layer. Higher numbers will slow down performance but allow for more complex mesh deformations.

Type:

(int32)