ASTP retargets AnimationRelative / AnimationScaled bones against the skeleton reference pose instead of the sequence's retarget source

FAnimSequenceTransformProvider::BuildRetargetingTables derives the per-bone retargeting basis from AnimSkeleton->GetRefLocalPoses() — the skeleton’s default reference pose. The engine’s own retargeting path uses the sequence’s retarget transforms, UAnimSequence::GetRetargetTransforms(), as the “authored on” basis.

For any sequence carrying a RetargetSource (or a RetargetSourceAsset) those two poses differ, so ASTP subtracts the wrong basis. Every bone whose translation retargeting mode is AnimationRelative comes out wrong in both translation and rotation, and the scale factor for AnimationScaled is wrong too.

In the ordinary authoring setup — where the retarget source is the character the clip was authored on, so the retarget source pose equals the mesh reference pose — the error is exactly one extra copy of the mesh-versus-skeleton ref pose delta. The bone lands on 2*meshRef - skelRef instead of meshRef. The visible result is a character that is noticeably shorter and narrower under ASTP playback than the same clip played on a USkeletalMeshComponent.

This matters to us because our crowd characters are moving from prebaked VATs onto ISKM + ASTP, and our locomotion clips carry retarget sources as a matter of course. We would prefer this fixed upstream rather than carried as a local engine patch, since ASTP is otherwise vanilla for us and this sits in code you are actively changing.

[Image Removed]

[Image Removed]

[Image Removed]

Scope

  1. Only sequences with a RetargetSource or a RetargetSourceAsset are affected. With neither set, GetRetargetTransforms() returns GetRefLocalPoses(NAME_None), which is the same array ASTP already uses, so those clips are correct today.
  2. Only bones whose translation retargeting mode is AnimationRelative or AnimationScaled are affected. Animation mode does not consult the basis, and Skeleton mode overwrites the translation from the mesh ref pose.
  3. Baked additive sequences are unaffected in the engine path (the delta cancels, per the comment at AnimationRuntime.cpp:3006). ASTP’s table does not make that distinction, which may be worth a separate look.
  4. The error is static per (sequence, mesh, LOD), not time-varying, it is a fixed pose offset, not jitter.
    [Attachment Removed]

Steps to Reproduce

  1. Author or pick an AnimSequence whose RetargetSource is set to a mesh whose reference pose differs from the skeleton’s default ref pose, with at least one bone in AnimationRelative translation mode. (Any rig where the shared skeleton ref pose is not the character’s own proportions will do.)
  2. Play it on a USkeletalMeshComponent: Correct
  3. Play the same sequence through an ASTP provider on a UInstancedSkinnedMeshComponent — the character is shorter and narrower, with the affected bones displaced by the ref pose delta.
  4. Clear RetargetSource on the sequence and re-run — both paths now agree, confirming the basis as the variable.
    [Attachment Removed]

Fixed in UE5/Main: 58169258

[Attachment Removed]