Montage sections with no next section will play frames from adjacent section when they end

We’ve been seeing odd pops at the end of some of our montages that have multiple sections that we branch to. It turns out that if you have a montage section that has no next section but isn’t the last section in the montage, and also have a very short or no blend out, when the montage finishes it will play a portion of the section next to it. It’s more obvious in lower frame rate situations, but it is noticeable even at 60.

For example:

When this montage finishes the character will play a few frames of the Loop section, with the severity depending on framerate. We have some montages with branch point notifies set to fire at the start of the section which also get triggered when these end sections. We have found a way to protect against those firing by adding a section to the very end of the montage with no anim data beyond it, and setting all of our end sections to use that as their next. That prevents any section-start notifies from being hit, but it doesn’t stop the anim popping

We’re running 4.12 but this occurs in 4.13 and 4.14 as well. In each of these cases the blend out time has been set between 0.0 and 0.05 seconds for the pops to show up, but even at 0.1 you can occasionally get the extra notify hits and pops.

Hey TheNooonicorn,

I was able to reproduce this in 4.14 and 4.15. I’ve entered UE-41426. Thanks for reporting this!

I’ve spend many houres trying to debug this behavior thinking it was my own fault.

Thank you for posting this ! hope it get fixed quickly !

This was marked as “won’t fix” because “there aren’t any cases where putting the final section doesn’t solve it”. Except there are plenty of cases where you can’t have the final section be at the end because there are two or more final sections. Take a gun firing anim, for example. The hammer goes down, slide goes back, and if there’s ammo left the slide goes forward again. Or if there’s no ammo left the slide stays back. Both of these are valid exit states that lead to two very different poses. The two options available are either play wholly separate montages for this, which can increase the complexity of the code responsible for determining what montage to play, and how to transmit that in a multiplayer environment, or to add a buffer section at the end of every section that should be treated as an exit like so:

We’re going with the latter as it allows us to minimize the number of network related issues we have to deal with, but it’s absolutely a hacky workaround. Even the tutorials (for 4.8, granted) on the official Unreal Engine YouTube channel have example content with montages with multiple ending sections that don’t end as the final segment in a montage (BP 3rd Person Game: Skeleton Retargeting & Montage Setup | 17 | v4.8 Tutorial Series | Unreal Engine - YouTube)