Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Imported animation loop is given weird start/end handles

Discussion in 'Animation' started by UltraRobot, Mar 17, 2022.

  1. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    24
    I've imported a loop from an .fbx file with matching start and end frame. The Animation loops perfectly in blender, however in Unity it has a stutter on the loop, because of these strange handles at the start and end of the imported animation. I've double checked that it's not an export issue, these handles appear in the unity defined start/end of the clip. I've tried both generic, humanoid and legacy, and with animation compression on and off. The issue appears on all of them. Any tips on how to avoid these? Unity Version 2021.2.8f1
    upload_2022-3-17_13-54-40.png

    It's not just the one animation, seems to be common for loops, here's another example.
    upload_2022-3-17_14-11-40.png


    I also noticed in the generic version, that it had some gimbal lock issues causing curve flips.
    upload_2022-3-17_14-0-10.png
    However when playing back the animation in slow motion, these euler flip interpolations aren't visible, however the inbetweening issues caused by the start/end handles are very visible. Does unity do some live euler unrolling magic?
     
    Last edited: Mar 17, 2022
  2. havchr

    havchr

    Joined:
    Jun 18, 2009
    Posts:
    75
    How does a simple sine loop look - is it possible to see the tangent discontinuity in this case as well?
     
  3. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    24
    Some curves import fine, so it's not consistent, but it still happens on enough curves to be a problem.
    I realized I didn't have handles visible in the original post, so here's one showing how the handles point away from the "logical" direction.
    upload_2022-3-21_14-57-5.png
     
  4. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    24
    I seem to have found the issue. The source animation had keys right outside the sampled timerange that were drastically different from the keys on the start and end of the loop. These keys influenced the handles at the start and end of the loop and caused the wonky handles. If I continue the loop outside of the sampled range in the source file, the handles turn out fine.