Separate Animation Blending Time for Root Motion from the actual animation

@**iLef **Hey, I forked the Unreal source for 4.17.1 and merged your Pull Request into my source. I setup my Anim Graph to use a custom blend, where the Source Pose has No Root Motion and the Destination Pose has Full Root Motion, but it still seems to be blending the root motion normally. Could this be because I am using 4.17.1?

CanadianGuy43 Hey, sorry didn’t notice your message:( I tried this Pull Request with 4.16.1 and 14.18, everything works just fine. In attachments you can see my custom blend. Do you have the same?

Hey iLef, thanks for the reply!

So we have done a lot of digging around. The reason it isn’t working for us is because we are using blend-spaces.
It works perfectly, except when the Source and/or the Destination contain a blend-space. Under these conditions, the Root Motion blend mode is ignored.

Do you have any ideas on how to fix this? Thank you :slight_smile:

Oh, i completely forgot about blend spaces:) But looks like i can easily fix this problem.

I have updated Pull Request and now blend-spaces should work.

Unfortunately looks like Epic forgot about my pull request :frowning:

Hello there!

I recently ran into this problem myself and found this thread. I appreciate iLef’s pull request, but it didn’t really do what I wanted it to do, so I made my own pull request which works more like @**CanadianGuy43 **'s suggestion as this was closer to what I was imagining as well. I considered adding a full duplicate of the controls as well, but decided against it when I had a look at the code. There are a lot of moving parts in the code that handles the blend crossfade duration and this crossfade itself drives their state machine objects, so adding a second duration would require heavily modifying the state machine itself or even duplicating it, which would be very bug prone.

I instead opted to only add another optional blend curve for root motion:

This “Custom Root Motion Blend” will use the transition alpha as input and output the root motion pose scale. So if you make a curve that goes from (0, 1) to (1, 1); the root motion from the next pose will be used throughout the entire transition. A curve of (0, 0) to (1, 0) would use the root motion from the previous pose throughout the transition etc.

This approach should still be able to solve the situation where you want different blend lengths for the animation part and the root motion part by specifying the duration of the transition to be max(rootblendtime, animationblendtime) and using custom blend curves for both the animation and root motion. You would simply reach target blend faster for the curve that you want to finish earlier.

Anyhow, this works for my purposes in 4.21, so anyone who is interested is welcome to use my changeset, whuch can be found on this branch:
https://github.com/Temaran/UnrealEngine/tree/4.21-BlendRootAnimationSeparately

Best regards,
Temaran

1 Like