Create ML Deformer training data using Principal Shapes

The ML Deformer calculates deltas that approximate the desired target shape when applied to the base shape. By default, the ML Deformer calculates these deltas per vertex.

But you can also approximate the overall shape difference as a combination of several generated blend shapes which can evaluate faster during deformation. These generated blend shapes are called Principal Shapes.

Principal Shapes achieve the same effect as learning from the individual vert movement by learning the Principal Shapes required blend weights. In other words, instead of mapping controls directly to individual vert movement, controls are mapped to the Principal Shape weights.

The number of Principal Shapes used determines how accurately it can achieve the same result. You can generate Principal Shapes after the training data has been exported.

Before training the ML Deformer, you can limit how many Principal Shapes are used depending on whether speed or accuracy is more important. The Principal Shapes analysis tells you how many principal shapes are needed to reach a certain level of accuracy.

To use Principal Shapes for your Target deformation

  1. Once the ML Deformer is set up, (reach step 8 from the Create an ML Deformer using separate Target geometry topic.) export the training data. (See ML Deformer Export Training Data window for an explanation of the settings.)
  2. Open the ML Deformer Training Settings window and verify that the training data location is correct.
  3. Expand the Advanced Settings section and check Principal Shapes.

    Activate Principal Shapes

  4. Click Analyze Principal Shapes.

    It may take time to analyze depending on the size of the training data. Once the analysis is complete, the table is populated.

  5. Review the table populated by the analysis. Rows in white indicate the Principal Shapes that will be used in training. There will be as many shapes as set in the Principal Shapes Accuracy setting, but no more than the Principal Shapes Limit.

    White rows indicate Principal Shapes used for training

  6. Adjust the Principal Shapes Limit and Principal Shapes Accuracy sliders to include the number of shapes you want to use. The number of shapes to use depends on the rig and deformations being approximated, and sometimes, it may not be possible to reach the level of accuracy required.

    Adjust other training settings as needed.

  7. Train the model. The Principal Shapes are analyzed again, which may take a moment.
  8. Review the results. If needed, you can tweak the settings and train again.