Layered Blend per Bone in a Skeletal Mesh agnostic base animation blueprint template

Okay, so in my current project I made use of the animation blueprint templates that are skeletal mesh agnostic. This way I can keep the major logic of my animaiton blueprint within a base animation blueprint from which I derrive my skeletal specific child blueprints.

To blend upper body animations with lower body animations I want to use the “layered blend per bone” node. This node requires either a blend mask or a branch filter as an input. Blend masks are saved in the skeleton asset. The branch filter is basically a string with the name of a bone from which to start the blend.

However, since the animation blueprint template class is not aware of any skeleton, I don’t have access to a blend mask. Also, because I use different skeletons I can not hardcode the name of the responsible bone from where to start the blend in the branch filter. Now I am looking for a solution how I can ovverride the layered blend per bone inputs in a child animation blueprint. So far I can’t think of any solution. I would like to hear your opinions on this issue!

1 Like

I’m also looking for an answer to this

Still looking for a solution for this. :sweat_smile:

yes, me too actually. Can’t imagine we are the only ones trying to do that.

The solution is already implied in the way you’ve phrased the problem:

blend upper body animations with lower body animations

Since ABP templates are skeleton-agnostic we do not have any knowledge about “lower body” or “upper body”. The template could be used to animate something non-humanoid. So that kind of layering logic does not belong in an ABP template. In fact, any node referring to specific bones should not be used in an ABP template.

Skeleton-specific logic will have to be supplied in a child ABP of that template, either by using LinkedAnimGraph or LinkedAnimLayer.

Granted, currently ABP templates have little support in regards to overriding layers/assets in child blueprints. Hopefully Epic will improve on this and let us override layers directly in the child ABP. For now you’ll just have to link a layer manually.

Here’s my setup in my ABP template:

The layer SkeletonSpecific can then be linked in the concrete child ABP like so:

Or alternatively in C++ in your AnimInstance subclass:

void UMyAnimInstance::NativeBeginPlay()

This approach works in principle, but being forced to introduce another layer of linked instances just to override the templates layers is extremely annoying.
As soon as you try to create a nested linked layer (i.e. a layer within a layer) you now have to find the correct anim instance before the link will work. This can result in very hard to track bugs. Honestly I am switching back to plain ABPs until it’s possible to override layers in the child ABP of a template.

After experimenting with this a bit more I found the following ABP template setup much better to work with:

ABP Template

Implementation of UpperBodyBlend

The template now implies a humanoid skeleton so it’s not 100% agnostic anymore, but at least you don’t need to think about nested anim instances for linking. Small price to pay for ease of use.
You still have to link the UpperBodyBlend manually at runtime though. Again, if we could override layers of an ABP template in the child ABP that would make it much better without needing to link it.

hi, i had some questions about your implementation. Is your ALI_Upperbody - Upperbody linked anim graph a template as well, so does it choose a skeleton. I just wanted to know whether the templateness of the blueprint is maintained. Like can you use multiple skeletons with this blueprint template as long as they are humanoid.

In my case, I want to use fabrik to ensure proper placement of the left hand on guns and I am having a problem as the fabrik node requires access to a skeleton to work.

I’m not sure I follow.

ALI_Upperbody - Upperbody cannot be linked to a template as far as I know. You’ll have to link an ABP with a skeleton bound to it.
And not even sure how that would work, since you’re forced to create a child ABP of the template first and thus bind a skeleton to it. The “templateness” of the template stops immediately with the child ABP.

But yes, you can use anything that’s humanoid. This is not a technical limitation however. It’s just that I called the layer “UpperBody”. It would be awkward to try to define an UpperBody on a spider for instance. But it can be done.

As for the FABRIK node it’s similar to Layered Blend per Bone. The rule for ABP templates is: anything that references concrete skeletons/bones must be supplied/linked at runtime to the child ABP.
See the layer ALI_IK_Offhand - Offhand? That’s what I used to link my hand IK. Your template really must not know anything about any bones or skeletons. You will need to supply that at runtime by linking the layers.

That said, I have since switched back to plain Anim Blueprints because

  1. Having to manually link layers all the time is annoying.
  2. You cannot provide a default implementation for any of the template’s layers in the child ABP.
    The latter is especially annoying since unlinking something will simply leave you with a completely empty layer.
    If Epic made it possible to provide a default implementation in the concrete child ABP I would maybe use templates again.