how Play "montage" via level sequencer without restore state

Hello!

Before diverging and building our own settings, I wanted to ask how playing an anim sequence (which converts to a dynamic montage) is expected to work.

Current issues:

  • Restore State: The sequencer track initializes and reinitializes the anim instance, which has unintended consequences and can be expensive. We’d like to simply play the sequence as if it were a montage on the existing grahps.
  • Keep State: FAnimMontageInstance::SetSequencerMontagePosition sets the montage to not blend out, so characters get stuck with that montage after animation ends.

This seems like a very common scenario, so I wanted to reach out before modifying the code. Is there an option I’m missing, or is there a “correct” way to just play an animation as a montage where it blends out as usual without affecting the anim graph?

Thanks!

Cheers.

Hey there,

The sequencer track initializes and reinitializes the anim instance, which has unintended consequences and can be expensive. We’d like to simply play the sequence as if it were a montage on the existing graphs.

When you play a sequence on an actor, you can specify what AnimationMode is set for that actor. This might default to CustomMode sometimes**,** but you can force it by being keyed, and you’ll want to make sure you are in UseAnimationBlueprint. This should prevent initialization from occurring in the animblueprint. UE::MovieScene::SetSkeletalMeshAnimationMode for reference.

From there, if you right-click an animation section you can change which slot it plays in via Properties->Animation->Playback->Slot-Name

Keep State: FAnimMontageInstance::SetSequencerMontagePosition sets the montage to not blend out, so characters get stuck with that montage after animation ends.

Yeah, this is a bit odd, as you typically wouldn’t want to keep state on an anim sequence for a character; it basically freezes the anim sequence on the last frame. Depending on the use case, the typical approach is to blend out the anim sequence in the animation section. (There’s a little yellow handle where you can define your blend time). And then blend to a restored state. If you are playing through the animblueprint that is on the actor, this means they’ll blend to whatever animation state they are in.

The main thing is that yes, we play skeletal animation through montages, but they don’t go through the typical montage gameplay system as they update. It’s a way for us to play a pose through dynamic injection, into the animgraph while still having sequencer have full control.

Dustin

Thanks for the recommendation!

It looks like if we drag the sequence so there is a blend out time it will actually stop the montage with keepstate. It is only if you don’t specify a blend time.