Search Unity

Scaling key-positions in animation window results in unexpected curves

Discussion in '5.5 Beta' started by tealm, Oct 3, 2016.

  1. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    102
    So I like the improvements you are doing to Unity's animation editor, however the new Scale feature for scaling key positions is not useable at all as it is.

    This is how my curves look before scaling the keys:
    https://www.dropbox.com/s/kttyqfsccisdjwx/Screenshot 2016-10-03 11.24.56.png?dl=0

    When scaling the keys my curves now look like this:
    https://www.dropbox.com/s/9t6yt7ps6sgzd8e/Screenshot 2016-10-03 11.25.28.png?dl=0

    What's causing this is that I've adjusted the tangents of my Y axis on each side, when unity scales the keys they keep the same tangents - which gives an unexpected result as seen on the screenshot. What it should do is recalculate the tangents in accordance to the scaling just done.

    The example above is a simple case, I've also experienced tangent types getting set to clamped auto when scaling larger and more animations - so in short as it is now I have to go in and fix most tangents and tangent types after scaling, which makes this new feature kinda useless for animators.
     
  2. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    102
    So to clarify what I (and most animators) would expect when scaling - just have a look at how the curves / tangents behave in Maya.

    This is my original curves before scaling key positions (F00 -> F30):
    https://www.dropbox.com/s/t7y38gp25lu8lf8/Screenshot 2016-10-03 11.42.55.png?dl=0

    Then after scaling the keys to F60 it will still look the same:
    https://www.dropbox.com/s/d2xsizo098x17vt/Screenshot 2016-10-03 11.43.34.png?dl=0

    I hope the Unity devs will look at Maya's graph editor for future additions, these new features are great - and it will actually make me consider animating in Unity (once the issues explained above gets fixed).
     
  3. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    264
    Hey there!

    As I understand it, you're losing the shape of your 'bell' curve because the tangents lengths in Unity do not scale when using the Box Tool. We've mentioned this before in other threads, but there are no short term plans to modify the AnimationCurve in Unity to allow weighted tangents. Weighted tangents would increase the memory usage needed for each key frame in the AnimationCurve and would require additional processing in the animation engine. Unity being a game engine first and foremost, we have to favour performance and low memory consumption.

    I'm not sure I understand that last bit. We added the Clamped-Auto tangent mode in an effort to prevent overshooting in the AnimationCurve. As such, you should be able to use the Box Tool scaling with Clamped-Auto keys and retain the shape of your curve.

    However, you're saying your curve tangents are being set to Clamped-Auto? Scaling keys with the Box Tool should not change the tangent mode in any way. If you think you have encountered a weird behaviour, please feel very welcome to report a bug to us and we'll look at it :)
     
unityunity