Search Unity

Resolved Looping FBX animation stutters/freezes at random positions. How to solve?

Discussion in 'Animation' started by alfredbaudisch, Sep 7, 2022.

  1. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    UPDATE: THE WHOLE UNITY EDITOR stutters for a second or so every 3-5 seconds. Even in blank projects. https://forum.unity.com/threads/loo...-positions-how-to-solve.1333218/#post-8424081

    ---

    A looping skeletal mesh animation from a FBX file freezes at random intervals and random positions in Unity. It's not even related to the animation frames, because the animation loops perfectly in Blender, UE and even in Unity, the problem are the random stutters/freezes.

    You can see even the playback in the Director freezing randomly:
    Animation.gif

    Look how it just freezes for a second then continues (this is a random position in the animation, not at the looping part):
    Animation111.gif


    Anyone has gone through something similar? Any idea of what this could be?

    It could be my computer, but it's a very beefy computer (as a comparison I run big UE5 projects in max Epic settings w/out frame drops).
     
    Last edited: Sep 8, 2022
  2. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    UPDATE: this is happening to all animations I import - Unity randomly freezes/stutters for a few frames when playing animations. I already updated the GPU drivers (using RTX 3080Ti) and I'm facing the same with 2021.3.9f1 and 2022.2.0b7.

    Anyone else?
     
  3. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    UPDATE 2: Only in the editor. For exported builds there are no stutters and the animations loop perfectly.
    It's good, but at the same time very annoying and distracting, since it makes it harder to develop and test the game, giving false impressions that there's something wrong all the time.
     
  4. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
  5. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    The editor was stuttering like crazy for everything.

    Solved by checking "Use incremental GC". :shrug:

    upload_2022-9-8_17-25-25.png
     
  6. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    EDIT: OOPS. Just read your last post... gotta learn to read the whole thread, hahaha.



    I know the feeling, here are my recommendations:
    • Open up the profiler, see what goes on when it skips.
    • Check window's task manager to see if some process monopolizing the cpu/gpu.
    • Try disabling compression when importing animations
    • Make sure you don't have some malware running that could interfere.
    • The editor can get bloated. Do you have a ton of assets and editor tools in your project? Some tools are poorly coded and can mess up the editor's performance.
    • Duplicate your project, remove EVERYTHING (assets, tools, comment out code) you don't need for that single feature and retest.
     
    alfredbaudisch likes this.