Switch Between Multiple Skeletons In-Game on One Character Mesh

what do you mean by “switch between them”
are you talking about having multiple USkeletalMeshComponent dependent objects simultaneously, then yes as long as you manage the animation/pose state of the given SkeletalMesh you can have as many as you want (in theory)

you can have them around and when you want to swap them at runtime in C++ it could look something like this:

// assuming the following
// TObectPtr<USkeletalMeshComponent> Mesh01  (the mesh you start with)
// TObectPtr<USkeletalMeshComponent> Mesh02 (the mesh you want to swap to)

Mesh01->SetVisibility(false);
Mesh01->OverrideAnimationData(nullptr, false, false); // this will stop the current animation that is playing
Mesh02->SetVisibility(true);
Mesh02->OverrideAnimationData(CurrentAnimation); // you want the "CurrentAnimation" to be an animation to play

Keep in mind that you will need to take special steps to get AnimBlueprints to function.

if this is a swap that will happen multiple times then you could have a bool input variable to control the direction of the swap, and the CurrentAnimation would be the transformation Animation.

If your current Skeletal Rig is not “the same” as the one for the default Mannequin, and you want to use all these animations designed for the default Mannequin then there are 2 real avenues you can do:

  • in a separate project do a retarget onto your Skeletal Rig then rebake all those animation onto your Skeletal Rig through the retargetter then in your primary project import those animations for your Skeletal Rig to prevent duplications.
    or
  • take your Skeletal Mesh and take it into a 3D modeling program like Blender and Rig/Pose the Mesh there to have “the Same” rig as the Default Mannequin
    ** the Default Rig was created in Maya which Blender does not natively understand, so you will at the very least need something like the “Blender to Unreal Rigify add-on” (it is a pay if capable add-on) this will enable you to pose it based on what the Default Rig is expected to be using the Blender Rigging system, with the expected Hierarchy, but then export it with “the same” rig as the Default Mannequin. this add-on is designed for the just the Mannequin, so it will not work for Metahuman facial rigs.
1 Like