(4.13.0) UMG auto-tangents wrong on keyframe insertion

I’m assuming this is a bug in 4.13, but when you add keyframes to make a border widget fly in and out, extra “animation” occurs, even between 2 keyframes of the exact same value. This is due to the auto-tangents not interpolating correctly. The workaround for now is to click the “Show the animation keys in a curve editor” button and make sure in the left-hand timeline window that your border widget (or whatever you’re animating) is selected. This will show you the keys and the curves between them. Then box-select your keyframes and click the “Flatten” button (or right-click on one and select “Flatten”) to flatten each tangent.

Hello AJ_Graphix,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints/widgets that may be involved with this issue?

Thanks Rudy for your reply. I’ll take a deeper look into it tomorrow and get back to you. Have a good evening.

~Adam

Hi Rudy,

I was able to reproduce the issue in a new, blank project. Here’s the steps:

  1. Create a new, “Blank” project (Desktop, Maximum quality, No starter content).

  2. Create a new Widget Blueprint.

  3. Open the blueprint and drag a new border widget into the composition. Grab the corner to scale it up a bit.

  4. Add a New Animation and select it.

  5. At 0.00 in the Timeline, left-click and drag inside Position X until the border is offscreen then set a keyframe.

  6. Move to 1.00 in the Timeline, and again left-click and drag inside Position X until the border is back onscreen and set another keyframe.

  7. Move to 2.00 in the Timeline, and set another Position X keyframe (identical value as previous keyframe).

  8. Move to 3.00 in the Timeline, and drag inside Position X until the border is again offscreen then set the final keyframe.

When you hit spacebar to play, you will notice that the border never stands still between 1.00 and 2.00, despite the fact that those 2 keyframes are identical.

  1. Open the “Show Animation Keys In A Curve Editor” button, and you will notice that instead of a straight line between 1.00 and 2.00, the curves bend down. Border select all 4 keyframes and hit the flatten tangents button to fix them. Now when you hit play, the motion of the border behaves normally.

Thanks for looking into this. I really appreciate what all of you at Epic Games have created with Unreal Engine. It’s an amazing program, and I’m really enjoying learning it.

Sincerely,
Adam Janz

Hello AJ_Graphix,

Thank you for your detailed reproduction steps. After running through them, it appears that this is working as intended. Sequencer tries to smooth out animation by default. I hope that this information helps.

Make it a great day

Thanks Rudy for your reply. I’m pretty sure the UMG timeline is NOT supposed to squish the tangents down even between 2 identical keyframes. I understand interpolation between different keyframes, but it seems the behavior of smoothing between 2 identical keyframes is a bug, as no other bezier-curve-based tool I’ve ever used has done this.

Moreover, what flagged this unusual behavior for me was an Epic Games tutorial that basically did the exact steps I replicated above, and yet did NOT exhibit inaccurate interpolation (ie. the 2 identical keyframes correctly interpolated as a straight line between them).

Here’s some additional info that proves this is a bug:

  1. Create a new Widget Blueprint.

  2. Open the blueprint and drag a new border widget into the composition. Grab the corner to scale it up a bit.

  3. Add a New Animation and select it.

  4. At 0.00 in the Timeline, set a keyframe for Position X (do not change this value).

  5. Open the “Show Animation Keys In A Curve Editor” button and click on the affected track in the timeline tab so you can see the keys and what will happen here.

  6. Move to 1.00 in the Timeline, and set another keyframe for Position X (again, do not change this value). Notice that the timeline displays a straight line, and if you hit play, the border widget is static.

  7. While keeping an eye on that straight line, move to 2.00 in the Timeline, left-click & drag inside Position X until the border is offscreen & then set a keyframe. Notice a curve is suddenly added in the straight line section, and if you hit play, suddenly you no longer have a static object between 0.00 and 1.00, where it should be static.

(If you look at this tutorial video, watch from 15:35 to 17:00, you will see it is now impossible to replicate this behavior without the flatten tangents fix I mentioned).

Thanks,
~Adam

The reason that you are seeing the behavior mentioned in this thread is because the default setting for a key’s interpolation is set to “Auto”. This means by default the setting is “Cubic interpolation - Automatic tangents”. If you would like to change the default setting for key interpolation you will need to go to the editor preferences and change it there (Editor preferences >Content Editor > UMGSequencer Settings > Key Framing > Key Interpolation ). I have provided an example below that will show you how to achieve the interpolation settings shown in the video (Linear). I hope that this information helps.

Example:

As a note, the video provided shows an older version of the engine and it appears that the default setting for the key interpolation has been changed or altered.

Make it a great day

Thanks so much, Rudy!! You’re absolutely right. My apologies for misinterpreting what was going on. I followed your instruction, and experimented with the settings. I wound up setting the default Key Interpolation to “User” which allows flat tangents by default, and now I can achieve the familiar behavior that I’m used to.

Thank you again and have a great day! :slight_smile:

~Adam