Motion Matching. FPS instability causes jittering when using the root offset node

When activating the debug of the offset root node we can see it has a hard time stabilizing while at steady fps it is very smooth.

See attached video

[Attachment Removed]

Steps to Reproduce
I have reproduced this in the animation sample project in vanilla 5.7.3

I’ve added this to the character simulate an unstable fps.

So this happens even if the FPS is always above 30, moving around between 30 and 60.

This aims to reproduce issues we see when the game becomes a bit unstable or features like VSync cause the update delta time to be variable from one frame to the next.

[Image Removed]

[Attachment Removed]

Hey there,

There could be a couple of reasons this is happening. But most likely this is due to the accumulation method being very frame-dependent (most implementations of this are). Variable framerate will also affect it, as will the fact that debug draw is done on the main thread.

I’m going to treat this as a bug, but I don’t think we would provide a solution or bug fix; instead, we’d most likely offer an alternative method and recommend using a spring. This is mostly because the team is focused on future animation systems.

If this is something you want to tackle, you could look into how we plan to implement the approach in the UAF version of the Root Offset Node. This would be in OffsetRootTrait.cpp FAnimNextOffsetRootBoneTask::Execute. This version of the function uses a spring method exclusively and tends to be more stable at variable frame rates.

https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Plugins/Experimental/UAF/UAFWarping/Source/UAFWarping/Private/OffsetRootBoneTrait.cpp

You would need to add this style of method to the animblueprint version of the node.

Dustin

[Attachment Removed]

Understood, with offset method are you using and what is your tuning for it at the moment?

Dustin

[Attachment Removed]

Alright, thanks for the info. As I mentioned, I’ve logged an issue that you can follow here: https://issues.unrealengine.com/issue/UE-367301. But given that the node’s methodology is framerate-dependent, it may not be something we address for a while.

Dustin

[Attachment Removed]

Thanks I’ll look into it

As for the debug draw, its an issue we initially say without the debug draw, I added it because It does help to visualize it. Our camera is a bit closer and we could feel the stutter a bit more than in the animation sample.

[Attachment Removed]

We are very much following the animation sample still.

Using the interpolate mode while moving around then release when idle or doing non MM stuff. We will be starting to play with the values for translation half life, but for now they are also the same as the sample.

So Halflife is 0.3, we are using the root motion from the graph.

One possible source might be the play rate from MM if the playrate changes to try and make the speed match, the algo on that side might not love the variable playrate.

One thing I have tried that does stabilize is to allow offset only when that offset is over the clamping velocity. So on starts and stops I have it, but during turns and general movement I end up with virtually no offsets.

[Attachment Removed]

So the node also uses a spring method, although a different one. To be sure I did use the spring of the OffsetRootTrait, but the results are similar.

[Attachment Removed]