"Apply Additive" node changes bones scale

Hello all, I’m using UE 5.2 and trying to migrate Lyra’s animation system to a project created from a Third-Person template. However, I haven’t migrated the entire Blueprints, but copy-pasted or recreated them in small parts, and, apparently, I’ve missed something because not all parts are working as they work in Lyra.

In my project, any usage of “ApplyAdditive” node accumulates scales of base and additive poses. Here is an example from CycleState from LocomotionSM: Blend space with leaning is applied on top of FullBody_CycleState anim layer, and in Lyra it works perfectly, but not in my case (also, you can see I added “watch pose” to every node, and checked that input poses are correct).

I went to the source code, and found the following code there (how scale is calculated when additive pose is applied):

		const TransformVectorRegister DefaultScale = GlobalVectorConstants::Float1110;

		const TransformVectorRegister Zero = VectorZero();
		const TransformVectorRegister BlendedScale3D = FMath::Lerp<TransformVectorRegister>(Zero, SourceAtom.Scale3D, BlendWeight);

		FinalAtom.Scale3D = VectorMultiply( FinalAtom.Scale3D, VectorAdd(DefaultScale, BlendedScale3D));

Here, SourceAtom is a transform of a bone from the additive pose, and FinalAtom is a transform of a bone from the base pose.
So, let’s say we have a blending weight = 0.2f, then BlendedScale3D would be equal to Vector(0.2), DefaultScale is Vector(1), so VectorAdd(DefaultScale, BlendedScale3D) gives us Vector(1.2), and VectorMultiply which is component-wise multiplication results in Vector(1.2) as well (because Scale3D in the base pose is Vector(1)).

And, indeed, after calculations, bones in Base (Final) Pose are scaled by 1.2:

Hence, accumulating scale seems to be the intended behavior, and perhaps some pose post/preprocessing or checkboxes are used to get an adequate result instead of Shrek, but I’m struggling to find what exactly.

Before and after “Apply Additive”:



Oh and i exported my anim as fbx2020 with bake animations

1 Like

Thanks, but that was already set correctly. However, my mistake was very close to that place.

For anyone else interested, in order to apply animation additively, Unreal needs to know the “difference” that should be applied. In my case, leaning animations didn’t have BasePoseAnimation set and thus, they were compared to zero and then the difference was applied to the base pose in AnimBP.

BasePoseRef

In my case. the solution was to set Lean_Center animation as Base Pose Animation for Lean_Center, Lean_Left, and Lean_Right. Thus, if Lean_Center animation is applied additively, it applies zero difference, Lean_Left applies only its difference with Lean_Center which is, let’s say -5 by X or whatever it is, but anyway the applied scale will be 0 because Lean_Center and Lean_Left have the same scale.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.