Anim BP - Mixing upper & lower body without montages

I have a player with idle animation, and two skills: fireball, and stomp.

The fireball can be used while moving, hence it’s an upper body only animation.
The stomp can’t be used while moving, and it’s a full body animation.

I want to use 2 state machines - one for moving/walking/around (locomotion), and the other for spells (it will include both the fireball and the stomp), but I don’t know how to blend them.

I thought it should be simple - isn’t there any function that gets a list of poses, and override previous bones based on existing keyframes (or not, if it doesn’t exist) ??

You mean something like this…

Possibly; what do you put in your acutal UpperRight/UpperLeft/Lower though? isn’t many of the states replicated? (imagine a skill that needs to affect bot the upper right and the upper left, or another one that needs to be in both lower and upper right and upper left)
Also, how do you choose blend weight? how is it changing, based on what?

First off, don’t worry about UpperRight / Upperleft in your case - you’ll probably just have use your normal Fullbody pose as base pose and filter the Blend Pose 0 to be Upper body. (You won’t need a Blend Pose 1 if you’re just doing Upper / Lower)

In the config for the Layered Blend Per Bone, set the Branch Filter bone name to whatever the “lowest” bone you want to count as upper body - like Spine_01, or whatever your right calls it. Keep depth at 0 and everything attached further down the bone chain will count as Upper body.

Make an upper body state machine and attach it’s resulting pose to Blend Pose 0. You don’t need to cache the pose like in the pic above, afaik.

You will then need to set the blend weight to 1 (or lerp to it ideally) whenever your character does something with an upper body animation, and set to 0 when you want full body. You’d do this through the animation blueprint event graph or through some other logic in your game.

1 Like

JBernhelm - that will solve the single part + locomotion part; but don’t forget my animations can be either full part or upper part, depending on the skill. Does that mean I’ll need to have skills in both my Base Pose and my Blend Pose 0? Or is there a better solution (which is what I’m looking for) ?

Also, how would I blend the weight value? I don’t want to calculate it my self over an arbitrary time, but rather make it based on the actual upper part animation (I thought about finding the animation left time and dividing it by the animation total time, but I can’t seem to get those parameters dynamically from the animation blueprint).

I feel like this entire thing is going the wrong way here… Is it better to just use animations for everything (that is, for every combination of bottom and upper parts) ? or am I missing something here?

matan19, so what was your solution to come ? I’m struggling with the same questions now and I find it quite complicated to find an answer to my request or a hint to start thinking in the different direction.

You have 2 different state machines, you need to have different states. No way around it.

The alternative is to use montages, which do not require a state machine and essentially do the same thing. Differently.

Either direction, I’m not sure there are any performance concerns to have on your main character. It needs to do what you want it to do, however much it costs. Even adding 10 state machines and layering them together won’t/shouldn’t cause a major performance loss anyway…
bad code in the BP on the other hand will.