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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

What is a "fixed time manual transition"?

Discussion in 'Animation' started by DiligentGear, Jun 12, 2015.

  1. DiligentGear

    DiligentGear

    Joined:
    Dec 25, 2013
    Posts:
    28
    I'm reading Unity 5.1 release notes, and I'm confused with some new functionalities.
    • Animation: Added Animator.CrossFadeInFixedTime and Animator.PlayInFixedTime to support fixed time manual transitions.
    • Animation: Transitions now have a fixed duration by default. Before Transition duration was in normalized time.
    So what does "fixed time" do? How is it different from the old one? When and why should I use "fixed time"?
     
  2. HJISTC

    HJISTC

    Joined:
    Oct 6, 2013
    Posts:
    2
    Was confused by this too.
    There is also a new option "Fixed Duration" on AnimatorTransition settings. By default, "Fixed Duration" is on.
    Anyone can give an example when I should change this?
     
  3. DiligentGear

    DiligentGear

    Joined:
    Dec 25, 2013
    Posts:
    28
    Well, after reading documentation I figured the first one out. These are just new interfaces for dynamic transitions. The old interface only allows normalized time as parameters. I thought "fixed time manual transition" is referring something other than Animator.CrossFade and Animator.Play.

    But I still don't know what the "Fixed Duration" does.

    When I turn this on, it does not change the Transition Duration, but it changes the graph.

    I'm expecting Transition duration to be in seconds (since PlayInFixedTime is in seconds), but this does not look like 0.2 seconds to me.
     
  4. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Before 5.1 transition duration was always in normalize time, this is great in some case but when you want precise control over the transition timing it can become a problem.
    With Fixed Duration On : Transition duration is in second
    With Fixed Duration Off: Transition duration is in % (normalizedTime)

    Time line scale is 30 fps, and the number on the time are second:frame number. So 0.2 second is 1/5 second which is exactly what you see on the time line. So it look good to me.
     
    theANMATOR2b likes this.
  5. jctz

    jctz

    Joined:
    Aug 14, 2013
    Posts:
    47
    Could you guys not have made it default to 'Off' to match old behaviour? We have a SM with 300+ transitions, which we now have to go through to turn off on everything.
     
  6. Teapote

    Teapote

    Joined:
    Oct 8, 2015
    Posts:
    1
    Would it be possible to add the unit in the animation and animation transition inspectors?
    Indeed, as they aren't unified, it gets confusing for newbies (such as me) :)
    For example, the unit could be specified in the time line "(s:f)" and in the field names. Also, it could update dynamically. Like if fixed duration is checked, add "(ratio)" after duration, and if not, add "(s)"...
     
  7. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I'm playing with a design for this right now, but I am wondering if there is a way to make this function set an animation to "overshoot" its target pose? -- I am trying to make the pose "bounce-back" to a single-framed pose.

    @Mecanim-Dev , do you know what functions I would need to accomplish the "overshooting" of a pose? -- Everything I keep finding does stuff in normalized time (except the Legacy system) and it's looking to me like I'll have to go that route even though it isn't supported because it sets bone-transforms manually.

    I would also like to do something with "Optimize Transforms" too and use the humanoid bone system (as sort of a hybrid approach), and still be able to manually set any extra bone positions/poses myself (such as hair/ponytails/etc. for "secondary motions") after optimizing the main humanoid transforms -- Any ideas on how to accomplish this while also "overshooting" a pose somehow? -- Even just the latter part of "overshooting" would be hugely helpful!!
     
  8. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    @awesomedata I'm not sure I understand, what you do mean by overshooting a pose?
     
  9. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Let's say I have three static poses (without "animations" -- just single static "frames"). Each pose represents idle, punch, and kick. Each pose is stored in separate frames (or separate animation clips consisting of a single frame, whichever is more performant). Each pose pings back and forth between one another instantly depending on the most-recently pressed button.

    Clearly this is not animation, but actually an interpolation curve is what "animates" these poses.

    So, for example, if I do a direct blend between the two (say, from idle to punch), linear interpolation (or even an "ease-in/ease-out" interpolation) by default is terrible. However, if I generate my own specialized "curve" to the blending /between/ the two poses (where the punch pose (from idle) actually extends /past/ the target pose (punch) momentarily by simply making the blend exceed 1 momentarily for a "recoil" effect), my own custom curve causes the "animation" to sort of "overshoot" the final pose momentarily to give a sort of "spring" backwards to the punch pose. In animation terms, this "recoil" is created by the blending alone -- and, essentially, I've seen that it can actually be accomplished in a fast way (here) using an animation curve against a (very) limited number of individual poses, allowing me to author many animations (that take up very little space) very quickly using bicubic interpolation of custom-tailored curves. The "authoring" part is the major benefit to this type of animation, as it takes full advantage of 3D as a "fast" animation medium.
     
  10. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    79
    @awesomedata - Did you ever figure out how to overshoot poses? I'm looking to do the exact same thing.
     
  11. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419