ML Deformer won't accept skeletal meshes created within Unreal Engine 5.8

Hi there,

I have an annoying problem using the ML Deformer.

My setup is: cube-like character created in-engine deformed using chaos flesh for jiggle. This works but is laggy, so advice is to use ML Deformer to train a model for the jiggle.

Problem: every time I go to add the mesh to the ML Deformer, it gives me a “Skeletal Mesh asset needs to be reimported” error:

Now since this was created in-engine using a primitive shape (box), the ML Deformer doesn’t play nice.

I’ve exported and re-imported the asset, but the issue there is that the faces weren’t welded together, so it breaks the flesh asset CreateTetrahedon step:

(See good output here:

)

So I used the mesh editing tool to weld them back, and this worked to fix the flesh asset. You can see where they weren’t joined before:

But now maddeningly, the ML Deformer is giving the same error as before “Skeletal Mesh asset needs to be reimported”! So I can’t train it.

Is it really the case that the ML Deformer can’t use in-engine modified skeletal meshes? Do I need to recreate the whole welded thing in Blender from scratch? If so, this seems like a huge oversight on Unreal’s part! Unless there is something I’m missing here!

Thanks!

That error means the skeletal mesh asset has no source import data. A mesh built in-engine from a primitive has none, and welding it in the mesh editing tools does not create any. ML Deformer reads the source mesh and the ground-truth cache from that data, so it refuses the asset.

Workaround that keeps the flesh asset working:

  1. In Blender, take the cube, Merge by Distance (Mesh > Clean Up) so the vertices are welded, then check for loose faces and non-manifold edges. This is what Create Tetrahedron needs.
  2. Rig and skin it, export FBX, and import it as a Skeletal Mesh. That gives it import data, so the ML Deformer will accept it.
  3. Rebuild the flesh asset from that imported mesh and re-cache with the Chaos Cache Manager. The geometry cache must match the skeletal mesh’s vertex order and count, so use the same mesh for both.
  4. In the ML Deformer asset, set Skeletal Mesh to the imported one and the Geometry Cache as the ground truth. Then train.

Roundtrip is annoying, but it is the supported path: ML Deformer wants an imported mesh, not an edited in-engine one.

Thanks so much, that did end up working.
Would be a nice update if UE would accept skel meshes created in-engine, e.g. by creating those primitives in the editing tools.

Managed to successfully train the model!

But I cannot get the trained model to deform the cube during gameplay; my engine seems to be missing the “DefaultMLDeformerGraph” that’s noted as being needed here: How to Use the Machine Learning Deformer in Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community