My custom character has a skeleton that works with 72 animations. I’ve spent weeks retargeting and fixing all these animations in UE5 with animation curves and I’ve been trying to think of a way to speed up my workflow. What I would like to do is create a duplicate version of my characters’ existing skeleton, modify it, and make it exactly the same bone hierarchy and naming convention as the UE4 SK_Mannequin.
The reason for this is that I bought two different animation packs from the Unreal Marketplace that use the UE4 SK_Mannequin skeleton and there are hundreds of animations. By creating a copy of my characters’ skeleton that is posed, named, and structured exactly the same as the UE4 Sk_Mannequin, I won’t have to do any retargeting at all and those hundreds of animations will just work on my character (I’ve already tested this concept and it works).
Is it possible to use C++ or blueprints to switch between two or more different skeletons with different hierarchies, in-game, for one character mesh that can be used for different types of animations I may buy from the marketplace?
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.