How can I share an animation with several skeletons?

Maybe the AnimSequence is depends on only one Skeleton. But my animations are created for sharing several skeletons. What can I do for this problem? And It can do with C++ codes?

Hi Jong-il,

If you have multiple meshes that share similar skeletal hierarchies, you can import them and merge the unique bones in a new skeleton into the common USkeleton asset.

For example, you might have:

  • Human (SkeletalMesh)
  • HumanoidWithTail (SkeletalMesh)
  • BipedalSkeleton (Skeleton) - contains all the bones shared by Human and HumanoidWithTail, plus the tail bones)
  • Walk, Run, etc… (AnimSequence) - most of these aren’t going to have any animation data for the tail, so it’d be in ref pose when playing one of these on HumanoidWithTail unless you hooked up a skeletal control or something
  • SwishTail (AnimSequence) - Contains data for the tail, which is ignored if played on a Human

Cheers,
Michael Noland

I can’t understand how to do this. Because Skeleton is also depends on only one SkeletalMesh, isn’t it? Thus to share BipedalSkeleton with Human and HumanoidWithTail is impossible.
If I wrong or misunderstanding, please tell me more concretely.

Hi Jong-Il,

A skeleton does not depend on any other asset. It has a default preview skeletal mesh but it does not depend on it.

There is a one to many relationship between skeletons and skeletal meshes. Each skeletal mesh or animation is ‘bound’ to a specific skeleton, but others can be bound to the same skeleton.

When you import a FBX, a ‘Select Skeleton’ dialog should pop up, and you can pick an existing skeleton instead of creating a new one.

Cheers,
Michael Noland

Got it. I just tested. However it has some problem, too. My assets are for FPS.

Arm(for 1st Person)

Weapons(more than 1, they have more bones than Arm such as Magazine, Trigger etc.)

Animations(Created for Individual Weapons not generalized, it has Reload{include moving Magazine} etc.)

If set skel as you said, Arm is depends on only one weapon. In other words, can play animation for only one weapon. Is there more idea? Thanks.

Hi Jong-Il,

I’m not sure I follow you.

It seems like you can go three different ways, depending on how your assets have already been authored, and your preferences.

Approach 1: have unique skeletons for each weapon (only the weapon, not the human holding it), with unique animations on that weapon skel mesh, and then make the human holding it match up with the weapon using sockets and IK controllers.

Approach 2 & 3:
Merge the skeletons for the weapons into the skeleton for the human.

Approach 2:
Animate both the body and the bones for the specific weapon animation you’re playing, and use a parent-child skeletal component relationship (only the skeletal control for the human is animated, but the skeletal control for the gun mesh reads the bones specific to that gun from the parent component).

Approach 3:
Separate synced animations for the gun and body. The animations for the gun animate the specific gun, and the animations for the body animate the body to match what the gun is doing.

We have typically followed approach 1 for guns, but 2 works great for characters + clothing, and 3 is feasible as well.

Cheers,
Michael Noland

I see. No.1 is recalling a document of setuping weapon content in UE3’s UDN. That was “Recommeded” but now been “Rule” in UE4. Thanks for your helps.

Just like in UDK, you should be able to get your animations to play on multiple skeletons as long as the bone hierarchies and bone names are the same.

However, as of the current July beta build, every animation that gets imported into the engine appears to be uniquely assigned to only one skeleton. Every attempt I’ve made in Rocket to try to change the skeleton used by the animation sequence has been unsuccessful, because the skeleton pointer edit field is disabled.

However, here’s a workaround that should be useful unless Epic decides to allow the same animations with multiple skeletons in the future:

1. Import your skeletons into Rocket.

2. Create multiple copies of your desired animation FBX in windows explorer.

3. Import your animation sequence copies into the content browser. Make sure when FBX Import Options dialog appears, that you choose the “Animation” option. Choose your desired skeleton where it asks for one. Do this for every copy of the animation sequence that you import.

When you open up your animnodesequences in Persona now, you should see the same animation working with your different skeletons. If that doesn’t work, it’s something worth bringing to Epic’s attention as a bug.

Good luck.

Hi Markus,

In the content browser, you can right-click on a Skeleton and select ‘Retarget to another skeleton’, which will load and convert all animations targeting the selected skeleton to a different skeleton.

Cheers,
Michael Noland