Description

When we create curves on additive animations, we are creating a curve based on whether the curve exists in either the base or additive pose.  This wouldn't be the expected behaviour for a user when creating an additive that uses another animation as a base.  In that case, if the base animation contains a curve that the additive doesn't, the expectation would be that the additive also won't have the curve.  The current behavior can leave additive animations with curves that have unexpected negative values (ie. 0 - base curve value).  The code responsible in 5.3 is:

UE::Anim::FNamedValueArrayUtils::Union(*this, BaseCurve, [](ElementType& InOutThisElement, const OtherElementType& InBaseCurveElement, UE::Anim::ENamedValueUnionFlags InFlags)
{
    InOutThisElement.Value -= InBaseCurveElement.Value;
    InOutThisElement.Flags |= InBaseCurveElement.Flags;
}); 

This isn't a result of the curve refactor, we have the same behaviour in 5.2 where we create a curve when either the base or the additive have the curve

Steps to Reproduce
  1. Select an animation to convert into additive
  2. Duplicate the animation
  3. In the duplicate, add a curve and set a single key within it to 1
  4. Open the original animation
  5. In the asset details, set:
    1. Additive Anim Type = Local Space
    2. Base Pose Type = Selected animation frame
      1. Set the base animation to be the duplicate sequence you created earlier
    3. Ref Frame Index = 0
  6. Create an anim bp
  7. Drop the additive animation sequence you just setup into the anim graph and connect to the output
  8. In the event graph of the anim bp, call GetCurveValue to get the curve you added to the duplicate/base animation and print the value
  9. Compile the anim bp
    1. Expected behaviour: The value printed should be 0 (curve is not found on the animation)
    2. Actual behaviour: The curve value printed is -1.  The curve was added to the additive because it existed in the base animation

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-187273 in the post.

0
Login to Vote

Won't Fix
ComponentUE - Anim - Runtime
Target Fix5.3
CreatedMay 29, 2023
ResolvedAug 1, 2023
UpdatedAug 7, 2023