Sequencer transforms are applied twice to actors when using root motion with 'swap root bone actor'

Hello, we are encountering some issues due to the way sequencer performs its transformation updates. In our case we have a sequence that has a character with a keyed transform and then we have a SkeletalAnimationTrack with a root motion applied to the character’s skeletal mesh, this track is set to use ‘swap root bone actor’.

In the above case we notice that the keyed transform is first applied independently through the component transform track. More specifically it is applied in FIntermediate3DTransform::ApplyTransformTo(USceneComponent* SceneComponent, const FIntermediate3DTransform& Transform)

Then the root motion transform update from the MovieSceneSkeletalAnimationSystem doesn’t happen until the associated SkeletalMeshComponent’s OnBoneTransformsFinalizedMC is broadcast, triggering FBoneTransformFinalizeData::BoneTransformFinalized().

The above results in the character technically moving twice per frame, every frame. This can lead to some edge cases such as passing through and triggering volumes each frame, especially when the root motion animation takes the character far from their keyed transform. It’s also not a ‘cheap’ operation to move the character multiple times.

Is there any plan to add some sort of transform accumulation to the moviescene system in order to only apply a final transform once? I have looked at doing it myself, but it’s a bit of a challenge due to the the root motion transform waiting on OnBoneTransformsFinalizedMC to be broadcast (which occurs outside of the bounds of the MovieScene ECS system) before applying its updates. Hoping you have an idea if something like this is planned or any other suggestions to address the issue.

Steps to Reproduce

  • Create a level sequence
  • Add a character with a skeletal mesh to the sequence
  • Add a skeletal animation track with a root motion animation to the character’s skeletal mesh
  • Set the skeletal animation track’s SwapRootBone to SwapRootBone_Actor
  • Key a transform on the transform track at frame 0
  • Notice that the transform track update occurs first and independently of the root motion transform update

Hi,

We are overhauling root motion, and animation evaluation in general in Sequencer with the experimental Anim Mixer plugin. The foundation of these changes will be in 5.6, including CL 42115811, which fixes the double update problem by adding a tag that the setter tasks for transforms filters against.

Instead we will apply both the transforms from the transform track and root motion in the new root motion system.

Thanks!

Thanks for the reply, Austin. I’m sure it is difficult to say, but do you have a rough idea of when the Sequencer Anim Mixer & related plug-ins will be out of an experimental phase?

We don’t have a timeline yet, and any timeline is subject to change, but we expect it will at least be sometime after 5.8. Anim Mixer relies on UAF, which is also experimental, so some of this will be determined on that timeline. We don’t rely on too much of it, so it may be possible for those parts of UAF to be solid enough for the mixer to come out of experimental before the whole of UAF is, but that’s still to be determined.