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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unity Animation Interpolation

Discussion in 'Animation' started by IuriMonteiro, Jan 31, 2017.

  1. IuriMonteiro

    IuriMonteiro

    Joined:
    May 14, 2014
    Posts:
    3
    What Unity does to the curves when I import a character animation


    https://snag.gy/JYkMlN.jpg
    Unity automatically uses "free smooth" on curves but how can i make him use "clamped auto" instead?


    https://snag.gy/YcMuF4.jpg
    The solution that I use now is to duplicate the clip select all the curves and change to clamped auto is there other way?

    All of this because I down know why he doesn't read flat curves and that from imports.
     
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Those bumps are the normal result for resampled curves. They happen in every software when you resample your curves.

    Unity resamples curves by default, because it cannot guarantee that your animations will interpolate the same way between keyframes as your authoring software. The tradeoff is you lose your crisp stepped curves.

    If you are using Generic and are using Unity 5.3 or more recent, you can uncheck Resample Curves in the importer, and it will generate the correct stepped curves.

    Humanoid always resamples, because it needs to reinterpret the data.
    And Legacy has limitations in the evaluation pipeline that prevents non-resampled curves from being imported, so curves are always Resampled in Legacy too.

    Also, some features of some authoring software often generates curves that are not compatible with Unity's internal representation. When this happens, we have no choice to Resample the curves, so even with Resample curves off, you might still get issues.

    Without seeing your file, I can't say which is the problem.
     
    theANMATOR2b likes this.
  3. tibbitts

    tibbitts

    Joined:
    Jul 1, 2014
    Posts:
    2
    This is not true btw. Unity does not import stepped curves correctly regardless of whether or not you set "resample curves".
     
  4. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Do you care to elaborate?
     
  5. unity_D39F288F954E8879F44F

    unity_D39F288F954E8879F44F

    Joined:
    Apr 5, 2021
    Posts:
    4
    I have a similar issue where I import an fbx with an animation of waving a hand. When I set it to generic and turn off the resample it is fine, but with the resample on it breaks. Then when I make it humanoid it breaks and there is no option to turn off resample. Any clue what I can do to fix it?
     
unityunity