Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Timeline / Animation Bugs / weird and undocumented behaviour

Discussion in '2018.1 Beta' started by fherbst, Apr 12, 2018.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Throughout all of 2018 betas, animating and using the timeline was super buggy in a number of ways.
    It's hard to make bug reports for these since they are UI-related or just plain weird and not properly reproducible.
    I tried finding other posts that mention these, but didn't find them.

    I'll try to list some that I can think of here that came up while using timeline actively on projects in the last weeks:
    1. Weird / undocumented behaviour between embedded clips / animation clips
      • creating an animation clip in an animator, then using that in the timeline, it's not possible to change the animation clip from double-clicking in the timeline.
      • creating an animation by recording into an infinite clip, then converting that to a anim clip, it is possible to change the clip.
      • creating an infinite clip, convert to anim clip, move around, convert back to infinite - works
      • creating an infinite clip, convert to anim clip, split, convert to infinite does not work / option not shown
      • (that would be the main use case - time stretching of specific parts of an infinite clip)
      • embedded animation clips can be used in animators, but clips created in animators can't be recorded into in timeline
    2. Rotations just jump around, animating rotations is basically not possible
      • create two keyframes that have pos + rotations
      • move timeline marker inbetween them
      • rotate object slightly
      • play the animation and note that everything is going crazy
      • curve view shows that angles are all messed up (+- 360° etc.)
    3. Animating position/rotation properties sometimes seems to get locales mixed up and change e.g. 33.5 to 33500000 - happens randomly, once it happens it always happens with that specific property
      (on german locale here if that helps)

    4. Using the timeline sometimes changes settings in the scene that are then persistent (unless using Animator and Animation clips - changes never stick around in the scene, as it should be)

    5. Pausing a timeline doesn't keep it's state, instead does the same as stopping it (is that intended - if yes it's weird)

    6. Seems its not possible to have a Timeline run and keep the "final state" once the Timeline has ended (or is there? couldn't find it)

    7. Seems it's not possible to use a Timeline inside a Timeline, but would be super useful for putting complex stuff together

    8. Duplicating a Playable Director makes all Bindings disappear

    9. When trying to copy from one timeline to another:
      • selecting the clips, copying, going to another timeline and pasting : clips are pasted into the timeline they were copied from, not into the one that is open
      • selecting all in the binding list (left of the clip view), copying, going to another timeline and pasting : same as above
      • selecting all in the binding list, copying, going to another timeline, clicking into the binding list and pasting : clips appear in the right timeline, but not at the time marker, instead they are put to the beginning
    10. Moving a clip to another Animator Track makes that clip move in time as far left as it can (it completely ignores where you drop it on the Track)

    11. Animating in clips whose timing has been scaled/changed:
      (I understand this is a complicated one, just want to point out some weird behaviours)
    • start with an infinite track, turn into animation clip, stretch in time.
    • move timeline marker to where you want to change sth
    • double click to edit
    • move object around (change some property that is animated) -- animation looks correct, but keyframe sits at a totally different position in the clip view (with no respect to current time stretching), UI basically shows nothing about the stretched time, impossible to go back to keyframes and edit them
    12. Clip Offsets randomly get set / unset by clicking on specific parts of the timeline. Sometimes right-clicking "reset" solves objects jumping around randomly, sometimes "set to previous clip", sometimes just nothing but reloading the scene fixes it. Values seem to change out of nothing by just clicking into the previous / next clip (without doing anything with it). ​

    Sorry if thas has been documented before, I just hope it gets better / more clear. So much weird stuff makes it really hard to use the timeline. When it "works", it's great though - enabling a ton of workflows and creative processes that were a lot harder before.
     
    jesiebieszczu and TheHeftyCoder like this.
  2. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Oh wow, thanks for your feedback, it is big and thorough post, I'll try to cover as much as I can.
    1 - it's true that it might be sometime confusing, I'll forward this to our designer and see what we can do about it

    2 - could you send us a small repro project? or a gif of this happening? I've tried to repro without success, I must be missing something

    3 - does this also happen in the animation window or is it only when recording in timeline?

    4 - do you have an example of changes that became persistent?

    5 - in what sense, is it when you manually pause it? or through code? we had an issue that was fixed recently on the manual part.

    6 - Wrap mode set to hold should keep the timeline at the end, you can find that option on the playable director

    7 - It's kinda possible to do it with 18.1 but hard to visualize. we just pushed the Breadcrumbs system in 18.2 . But in the meantime it's possible to have sub-timelines using Control Tracks. You just need to specify the GO you want to control and that GO can have it's own timeline.

    8 - How do you duplicate it? it shouldn't be allowed technically. Duplicating the GO will add the new object it's attached to it and keep the old ones

    9 - Copy stuff from one timeline to another was always a bit tricky, we fixed some issues fairly recently and you should see the new copied clips under the right timeline.

    10 - can you send me a small repro for that one too? what clip edit mode were you set on? (mix-ripple-replace)

    11 - From what I understand is that you would like to have the stretched clip represented the same way in the animation window. The problem with that is what happen when you have duplicated clips all around your timeline and you start editing the stretched one? they still are linked together and that's why the original one is shown. I'll try to discuss internally if we can have like an Fake instance of that clip or something that would represent what you are in better.

    12 - that's definitely a weird one, I'll keep an eye open to see if it happen on my side. Were you mostly animating objects or humanoid?

    thanks again for all that feedback!
     
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Hi and thanks for taking the time to reply! I'm honestly very surprised that no-one else reported any of this. These issues are real deal breakers for us. We have a whole studio here constantly both praising the Timeline for the new workflows it enables and cursing it for all the weird bugs and usage details.

    Here are more details, and also some more bugs I encountered while trying to reproduce the old bugs:

    1 - I would just like to add that there's more weirdness – actual recording in Animation Clips that are embedded in timeline is forbidden (little red exclamation mark triangle thing says so), but moving keyframes around, changing keyframe values, even adding/removing keyframes is possible. Also, when trying to record it does change the Transform, but then scrubbing in the timeline resets it.
    To add to that, I think it should be up to users whether they want to edit any Animation Clip through the timeline or not – clearly editing is possible technically (as can be seen when moving keyframes around after double-clicking), so better leave it up to the users. See also my remarks in (11) below.

    2 - Here you go (this is on beta13 btw, but the behaviour has been the same for all of 2018):
    Video:

    keyframes_before.png keyframes_after.png
    Keyframes before | Keyframes after that slight rotation seen in the video

    3 - I'd say only in the Animation Window. Note that we usually only use the "Timeline Animation" view for setting one or two initial keyframes - all actual animation happens after double-clicking on that Infinite Track (the tools in the Animation Window are just much more mature).
    It happens sometimes, but is not really reproducible unfortunately. Basically you move an object while recording (all looks right) and then you scrub and you see the value jumping and the object exploding into the distance.

    4 - I just noticed these changes on Transform positions, rotations and scale. I do believe it has something to do with another visual glitch:
    when you select a timeline, it goes to Preview mode
    then you click record on a track you want to change
    then you select that object you want to record to --- keyframed Transform position UI becomes red
    you go into that track, change something
    now you disable "Preview" on that track--- keyframed Transform position UI becomes blue
    when you now click somewhere entirely else, the object stays in the last animated position, it's only when you do another action (create an object, go back to the timeline, ....) that it resets.
    My guess from a programming perspective: something remembers the last state of the object before entering timeline/recording mode and resets it afterwards, but somehow under some conditions remembers a state when the timeline is already previewing.
    Oh, and now that I think of it, I think I only saw the issue on/inside animated Prefabs - but that might have been by incident.

    5 - both. And it seems the issue only happens when that animated object also happens to have its own Animator Controller animating those properties. I get that it is kinda ambiguous whether I would want the Animator Controller to take over when pausing or when stopping the timeline. Right now it seems to take over when pausing though, and I think it should only take over when actually stopping the timeline. Otherwise there is no real way to "pause" in the sense of "keep state and let me continue later". Especially given that "Wrap Mode - Hold" (which I consider the same as "pause at the end") actually doesn't let the Animator Controller take over.

    6 - tested, works, thanks

    7 - will look into Control Tracks. I couldn't get them to work before because it is not possible to drop a GameObject onto a Control Track (I would assume that should create a Control Clip). I now found the rightclick context menu to create a Control Clip and'll take a look.

    8 - Duplicating the GO was causing all bindings to disappear. Now that I've tried it again it seems to work, so it might have been in beta10 and already fixed in beta13.

    9 - looking forward to trying that out!

    10 - again, trying to reproduce, might have been in beta10 and fixed already.

    11 - Yes, I do believe it is a representation issue. As a UI designer, I think you'd need to show some hint about it and try to display those keyframes in the scale the clip is that the user just double-clicked on (it's locked to that one anyways, as seen through the lock icon on the left).
    As per the general issue of editing shared assets: that's already happening all over the place in Unity (Materials, instanced Meshes, Animation Clips used in different Animators, Animation Controllers used on different objects, ...). I don't think the Timeline should differ from that in artificially limiting users to only edit not-shared assets. That also relates to bullet point (1) above.

    12 - always objects. Honestly in our projects we rarely have humans to animate, it's always UI / objects like cars / sometimes animals / environment settings / often public fields on custom scripts.

    Some new stuff that I didn't think about last time or found while writing this post:

    13 - clicking on an object name into the Animation Window when the Animation Window has been opened from the timeline does not select the clicked object in the scene. Imagine that Octopus in the video from (2) and me trying to figure out which arm is which.

    14 - Animating an object in the Animation View (after starting with an Infinite Track) doesn't show the keyframes, they are only shown after the next Editor Window Repaint or so. Also, Undo is possible but also not shown visually until the next repaint. Video:


    15 - found another bug: when dragging a ControlClip onto an empty area quickly, the console gets spammed with exceptions. This doesn't happen on every drag/drop, just like every 5th time or so.
    upload_2018-4-16_17-50-58.png

    16 - and another bug! dragging an Animation Clip in the timeline onto an Audio Track duplicates the clip onto the audio track, with a little yellow exclamation mark telling me that "this clip does not contain a valid playable asset". Oh, and this cannot be undone.
    upload_2018-4-16_17-55-34.png

    17 - when dropping an Animation Clip with only one keyframe into the timeline it looks like this:
    upload_2018-4-16_18-0-32.png
    The duration is listed as "4.94065645841247E-324", so I guess that a "1-frame-animation" (from 1 to 1) is incorrectly calculated as having a 0-frame duration. To do anything with that clip, I have to manually change the duration to something greater 0. Note that even changing it to 1/60 of a second makes it appear correctly.
     
    OfficialHermie and MechEthan like this.
  4. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Allrighty!

    1 - I'll let UI/UX answer for that one it seem we need to tackle a little bit more the interaction between Animation window and Timeline Editor

    2 - This one is definitely a weird one, I see what is happening but it might be related to some setting in you project, can you please open a bug with a project attached and paste the bug ID here so we can track it down and make it move faster in pour bug process it would be really appreciated

    3 - We think this could be because the first and last keys are recorded in timeline and then worked on in the animation window. this might causes some issues. Best practice until we nail it down better would be to create the animation from scratch in the animation window. We will look into that.

    4 - I noticed some issues in that area pretty recently but disabling preview should remove the color (i just tested on 18.1.0f1). I noticed tho that disabling preview during recording and re-enabling it will keep the ui red instead of blue and refresh issues like that. Not that disabling preview really change stuff in the scene but when preview is disabling nothing is saved there.

    5 - I'll bring that one to devs attention.

    7 - exactly, but in 18.2 you have more control on them. in the meantime its really adding a clip and then changing the clip binding to the other timeline

    11 - I'll let UI/UX answer that one too

    12 - Can you tell me what curves get recorded? is it position/rotation or something else?

    13 - I'll let Anim team know (opened bug ID: #1027289)

    14 - this is definitely a bug, I'm opening an issue for that (ID: #1027234 for future references)

    15 - I wasn't able to repro in latest version of 18.1, I'm pretty sure we fixed it recently

    16 - This is also a known issue, and it's fixed. It hasn't landed yet in the hand of our users unfortunately it should be in upcoming weeks builds.

    17 - Another good find! (ID: #1027240)
     
    Last edited: Apr 17, 2018
  5. Kirsche

    Kirsche

    Joined:
    Apr 14, 2015
    Posts:
    121
    Hi, this bug report shows how to reproduce 2): https://forum.unity.com/threads/swi...-x-equivalent-breaks-animation-editor.526872/
     
  6. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    1 - would really love to hear what they are thinking about this. I still believe there shouldn't be a handling difference in clips that I created in the timeline and clips that I created in the Animator.

    2 - thanks @Kirsche

    3 - see above. Creating the animation from scratch with context in the timeline isn't possible since an animation clip that is not created as embedded is not editable within a Timeline ;)
    Use case for that Octopus thing: I have a submersible vehicle that reaches a specific spot in the level on a specific time. The octopus is also at a specific spot at that time. I want to animate, using the Timeline, a cutscene that has the Octopus attack the submersible at that point in time in that specific position. Without timeline context, I have neither the right Octopus position nor the right submersible position to animate the behaviour between them. Right now I need to use an embedded clip for that - since I actually first created that clip as a proper animation clip from Animator, I copied the keyframes over.

    4 - I think what I experienced might be that bug, recently fixed for 2018.2beta, just for non-humanoids:
    Animation: Fixed an issue where the Animation Window Preview would changed the default Humanoid pose in Scene (972321)

    11 - Again from the 2018.2beta release notes:
    Timeline: Control-clip navigation: It is now possible to navigate to timelines associated with control clips through double-click or context-click. This features allows previewing and editing a sub-timelines in the context of its parent.

    This whole concept of "display animatable things in the context of its parent if I reached it from that parent" would also apply to the time stretching of animation clips.

    Would be great if someone from UX team can chime in, and I can tell what I think ;)

    12 - might be these:
    Animation: Fixed an issue where Objects can be affected by Root Motion even though it's supposed to be handled by curves (936020)
    Animation: Fixed an issue where root motion would be incorrect in Animator Controller Transition Preview (998773)
     
  7. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @thierry_unity

    Just was able to record No. 3 – values jumping around like crazy.
    Unfortunately when exporting all the relevant parts as a unitypackage and putting that into a new project the bug does not happen anymore, neither in 1beta10 nor 1beta13. (in the original project it does happen in both though).

    I made sure not to have any scripts on the animated object's hierarchy though, bug still happens, so not sure what's going on.


    even better visible here:


    Also note that the same issue (90.03 turns into 9003.00) happens multiple times - when I change that new value again by a bit (9003.25 turns into 900325).
    Another thing to note that while there is a timeline in the scene, I didn't use it at all for animating these properties, all done in Animator.

    Btw, I tested a bit, and it seems it happens on rotations only, on every object in that hierarchy.
     
    Last edited: Apr 23, 2018
  8. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    .... and more bugs!
    I think this one might actually be related to that "values are permanently saved to the scene when animating".

    Some of my objects where hidden (scaled to 0), so I checked and found that while I had animated that property to be zero in one clip, the other clip used the same value from the first clip and somehow persistently saved that "0 scale" into the scene. After resetting it to 1 it worked again. This is what I described earlier with values getting stuck permanently. Maybe it is related to the objects being named the same? They are in different hierarchies though. As far as I know, same name is fine as long as the full path to the objects differs.



    Note that the behaviour seen in the video only happens when that Animation Clip is synced to the timeline, neither the highlighting nor the wrong first/last keyframe values happen without the timeline context.