Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question Control Track Preview On Cursor Hold Skips Frames: how to fix that?

Discussion in 'Timeline' started by Shrubokrant, Jun 3, 2020.

  1. Shrubokrant

    Shrubokrant

    Joined:
    Oct 2, 2016
    Posts:
    80
    Hi,

    I'm really struggling to use properly the Timeline when the editor framerate is low and my timeline contains a lot of control tracks:

    Whenever I move the cursor a tiny bit too fast, the state of a control track or of an animation is stuck to the last frame the cursor was on. This makes it very difficult to properly animate multiple control tracks because you are never sure if what you are watching will be the actual behaviour. Even just hitting the play button creates inconsistent behaviour.

    It gets even worse when you go back and forward multiple times: the state of the tracks if completely lost, some tracks getting stuck in a state they would have a few seconds later.

    A simple example: if you animate a full-screen black sprite to make a fade in fade out, scrolling through the clip will have you left with a half black screen until you manually scroll back to the start, and carefully and slowly try to go through the whole clip: this is not usable at all.

    Is there a way to fix that? I tried to change the playback scrolling mode, but it didn't change anything.

    Why isn't the last frame of a clip evaluated when the time is out of the clip? This would make the timeline much more usable and accurate.
     
    Last edited: Jun 3, 2020
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Unfortunately there is no fix for this right now, it is a known issue with nesting using control tracks. Animation Tracks use extrapolation to avoid this, but nested timelines don't support extrapolation for reasons of both performance and limitations in the playable system to guarantee order of evaluation.

    Timeline only ever samples the existing frame. If an object is not modified on that frame, it's state is untouched. We have looked into sampling previous points to create a more deterministic scrub, but it's not as trivial as it seems.
     
  3. Shrubokrant

    Shrubokrant

    Joined:
    Oct 2, 2016
    Posts:
    80
    That's unfortunate :( Any chance that this would change in the future?

    Would it be possible to add "lock" track clips that hold the same keyframes until another clip overrides it? Without making any extrapolation, this would be enough to make them fully usable.

    One important question then: If the frame rate of the game is low, does this mean that the state of the control track at the end of the clip is not guaranteed?
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Definitely.

    Maybe? I don't know if we would add it necessarily, but it might something that can be scripted.

    Yes. It is possible small clips never gets executed with low frame rates.
     
  5. Shrubokrant

    Shrubokrant

    Joined:
    Oct 2, 2016
    Posts:
    80
    Thanks a lot for your answers!

    So as a conclusion, I think relying more on animation tracks and using control tracks only on secondary visual elements sounds like a safer and more practical solution until this issue can be resolved.