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”: