Equivalent of UDK AnimSets and AnimTrees in Persona?

Call me stupid, but I can’t seem to find a strict equivalent for UDK’s AnimSets and AnimTrees in Persona. Consider this scenario:

We have 10 different weapons with animations, and we also have “hand” animations for each weapon. The animations use the same names, but have different data stored in them (for example we have a “fire” animation for the pistol and another “fire” animation for the rifle, using completely different skeletons). The hand animations obviously use the same skeleton, but the weapons don’t, because they have different parts and pieces. The way to go in UDK (my way at least) would be to create an AnimTree for the hands and one global AnimTree for the weapons (since they all use exactly the same animations). I’d then switch the AnimSets of the hands to match the weapon they’re holding, and each weapon would plug its own animations into the global Weapon AnimTree, thus allowing us to animate a gazillion different weapons using just two AnimTrees.

With the new system, the first thing you need to do is to create skeleton assets, so that pretty much rules out the global weapon AnimTree thing altogether (unless we created a skeleton asset with ALL the bones of the weapons, which is bad since the bone names may be inconsistent between weapons). Even if we somehow got around that, we’d still be unable to plug different animations into the same Animation Blueprint (or am I missing something critical here?), so the question would be, how do you handle the same situation as above in UE4 without creating a gazillion Animation Blueprints, if possible at all?

Unfortunately for different skeleton, you’ll have to create different animation blueprint.

If you have similar hierarchy, you can share the animation blueprint using blueprint inheritance that you can override certain animations for child blueprint. If the hierarchy is totally different, you’ll have to create different blueprint for each.

Having lots of bones in skeleton doesn’t matter. In run-time we only go through bones that exists in mesh, so not all bones transform will be calculated. It would be best if you can organize similar hierarchy for weapon, and share the animation blueprint if possible.

Thanks,

–Lina,

Thanks for the info. I don’t know why I never thought of Animation Blueprints as inheritable (not used to Blueprints being classes yet I guess). However, I didn’t manage to figure out how to override animations in child blueprints. Could you please give me a hint as to where I should look?

In the current build inherited blueprints can’t easily override animations in their parents. It’s something I’ve been working on exposing in blueprint mode in Persona so it should appear in an upcoming build. You’ll be able to override the animation assets used in any of the player or evaluator nodes and they’ll be overriden as the blueprint is compiled. These overrides will work as long as the blueprints use the same skeleton, so you could have a player node to play one of your hand animations and override that in any children to a different hand animation.

If you’re comfortable enough with the codebase you can take a look at FAnimBlueprintCompiler. This is where all of the animation node data is compiled ready to be used, you can override the properties on a derived class when/after it is compiled (which is what I’ve been working on with a UI in Persona).

Cheers,

Benn.