Search Unity

Additive tracks in the timeline

Discussion in 'Timeline' started by emotiontales, May 27, 2017.

  1. emotiontales

    emotiontales

    Joined:
    Jan 23, 2016
    Posts:
    3
    Hello!
    Timeline is amazing! Thank you!
    But is it possible to use additive blending in the timeline for applying multiple animations for one character at the same time (like layers in Animator window)? Or now it is possible to create only Owerride tracks and blending two animations for one character is impossible in timelines?
     
    dev_34Disorder likes this.
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Not yet, right now it's only possible to override animations. Additive blends aren't supported yet.
     
  3. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    will it be considered in the future? could be a good tool for lipsync/visemes tool
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    For sure - it's on our backlog of features. We don't have immediate plans to implement it, but plans can change depending on the feedback we receive.
     
    DREAMARTGAMES and Reanimate_L like this.
  5. AndrewKaninchen

    AndrewKaninchen

    Joined:
    Oct 30, 2016
    Posts:
    149
    *feedbacks in favor of feature*
     
    NIOS, FGPArthurVII and ModLunar like this.
  6. Matthew_Religios

    Matthew_Religios

    Joined:
    Nov 6, 2017
    Posts:
    1
    I too would love to see this feature implemented. :)
     
  7. DriesVienne

    DriesVienne

    Joined:
    Jun 22, 2013
    Posts:
    27
    Our team would benefit from this feature as well
     
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  9. DREAMARTGAMES

    DREAMARTGAMES

    Joined:
    Nov 30, 2016
    Posts:
    3
    We really need this!
     
  10. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Sorry, no good update on this. It's not explicitly on the near term items we are working on, but some related work by the animation team could make this feasible sooner.
     
  11. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    Yeah I dunno. Without more complicated animation blending I dont know how you'd make a movie using Unity, which is kinda what timeline/cinemachine is all about. I've been thinking that there must be a way to grab control of an animation controller via timeline and do it that way. Otherwise, I can see a Unity Store product waiting for someone to code it.
     
    Nomadoso likes this.
  12. g6k

    g6k

    Joined:
    Aug 17, 2017
    Posts:
    1
    Definitely need.
     
  13. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    This would be amazing to have! I'm trying to blend a timeline on top of my Animator and it definitely has been very difficult
     
  14. TSC_Lindy

    TSC_Lindy

    Joined:
    Mar 6, 2017
    Posts:
    6
    We absolutely need this :)
     
  15. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    108
    Yeah we def. need this! I think it's odd that Unity releases Timeline without supporting core features that you'd expect to be supported. (Like animation layer blending, Audio track playback in Editor, Access to PlayableBehaviour LateUpdate/FixedUpdate etc.).

    With these missing "core" features it's not really feasible to use in production in the current state of Timeline.
     
    halley likes this.
  16. Andrey-Zhukov

    Andrey-Zhukov

    Joined:
    Oct 28, 2016
    Posts:
    1
    Hi! I also vote for this feature :)
     
  17. SmorgasOfBorg

    SmorgasOfBorg

    Joined:
    Mar 1, 2015
    Posts:
    5
    On a similar note, I was hoping to be able to do something similar to the Layering functionality available within the Animator Controller. Via my Timeline cut scene, I wanted to play a "Kneel from Standing" clip, followed by a looping "Working on Something" clip, then a "Stand From Kneeling" clip. Outside of Timeline, in my Animator Controller, I have the "Working on Something" on a layer masked for just the upper body, so he can be "Working on Something" from either a standing or kneeling pose. I cannot see a way to make this happen via Timeline. I don't even think its feasible to switch to having 2 animations ("Kneel and Work on Something" and "Stand and Work on Something"), because the time spent "Working" (which is a looped clip on its own right now) is up for grabs. It's not a set amount of time every time. I can manage that with a variable and transitions in the Animator Controller, but if I wanted to control that loop via Timeline, I don't see a way.
     
    Nomadoso likes this.
  18. grossimatte

    grossimatte

    Joined:
    Mar 15, 2013
    Posts:
    43
    Agree, really needed here too.
    How to vote for this feature?
     
    Nomadoso and ModLunar like this.
  19. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    I'm also throwing my hat in the ring... this would be a welcome feature! especially for smaller subtle animations!
     
  20. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    Definitely could really use
     
  21. tarahugger

    tarahugger

    Joined:
    Jul 18, 2014
    Posts:
    129
    Ran into this blocking issue today, would be nice to be able to just shove a quick root transform nudge into the timeline with an additive track rather than editing the animation directly.
     
  22. rabishan-maharjan

    rabishan-maharjan

    Joined:
    Jul 3, 2016
    Posts:
    18
  23. Bropoc

    Bropoc

    Joined:
    Sep 30, 2014
    Posts:
    8
    Yes, definitely! It would save a lot of headaches for me.
     
  24. Cleverlie

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    219
    totally needed!
     
  25. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    Know what? I'd be happy with some way to record joystick/keyboard input and just 'act' the part, then switch the script to listen to the recording rather than the real inputs. That way I could have the animation controller doing its full, additive, scripted, responsive thing without having to tediously go in and tweak every little thing manually. I cant find any such 'joystick recorder' on the asset store. Someone-- Make this and every cut-scene creator will buy it!
     
    ModLunar likes this.
  26. Nomadoso

    Nomadoso

    Joined:
    Mar 4, 2019
    Posts:
    8
    definitely need those features. Guys we need it
     
  27. AndrewKaninchen

    AndrewKaninchen

    Joined:
    Oct 30, 2016
    Posts:
    149
    If we had Child Tracks support I suspect it would not be very hard at all to implement a custom animation track without help from Unity, for all I know about how Timeline works and remember about how playing animations directly from playables works. Give us child tracks please
     
    halley likes this.
  28. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    Can't stress enough how important this feature is, especially for anyone using motion capture.
     
    dursteric likes this.
  29. SkippyV

    SkippyV

    Joined:
    Dec 13, 2012
    Posts:
    34
    *poke*

    Very important feature.
     
  30. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    will confirm this is still badly needed by all
     
  31. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Any chance we can have a better understanding of what has priority, and what doesn't? This sounds very ... contradictory ... on the one hand its for sure, its on the back log ... on the other, there's no immediate plans ... which probably translates to vapor ware or potentially Unity 2025, which means it might as well be vaporware.

    Unity has a lot of upgrades going on right now all over the place ... which is nice ... it would just be great to know when any one bit of Unity is going to become "fully functional". Right now it feels a bit like "great things are coming, so stick around!" ... without knowing how close or far off those things are from being polished, user friendly features.

    I'm not complaining about Timeline ... great job ... just about not having any idea if UT is planning on stringing its development along over 10 years, or wrapping it up over the next two in a polished, feature complete workflow. And yeah ... this is something that we should really have some information about. Even though I know its more of a marketing area than something developers are probably allowed to discuss, or even privy to ...
     
    Last edited: Jul 15, 2019
  32. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Completely fair question.

    I can only speak for Timeline, but what has priority is usually what we assess to have the biggest impact for users. There's also a balance between bug fixing, which is as least 1/3 of development time, and adapting to where the rest of Unity is going - this includes packages, ECS, etc...

    The roadmap for 2019.2 and .3 has mainly consisted of UI/UX workflow issues, and making Timeline more customizable so we can have solutions better tailored to different workflows. Also, we are making Timeline a completely independent package, which will let us get solutions into users hands faster. AnimationTracks has taken a bit of a backseat in development recently, but not because it's not important. In fact, we have been putting effort into making Timeline integrate better with the Rigging package recently released.

    So, with regard to Additive animation, I've done some preliminary exploratory work on it - mainly because of this thread - and it's not a difficult feature to add. The animation playables support it, but the autokey framing feature on the AnimationTrack presents a bunch of challenges that we haven't solved yet. We are looking into what the best solution going forward, and don't have a definitive plan yet.
     
  33. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
  34. PJY

    PJY

    Joined:
    Jun 4, 2015
    Posts:
    5
    Has it been implemented? (additive blending)
     
  35. Miyed

    Miyed

    Joined:
    Sep 24, 2014
    Posts:
    1
    I want to know too please, I'm struggling with this in my game at the moment.
    I just posted a question here.
     
  36. FGPArthurVII

    FGPArthurVII

    Joined:
    Jan 5, 2015
    Posts:
    106
    I too wanna know about the Additive Layering! I really need that feature for the Timeline. I do not know If It's already on the engine but If It is I can't seem to find anything about It not in the engine nor online! Please Unity If It's not on the engine please do It! Please
     
  37. SillyBilly

    SillyBilly

    Joined:
    Jul 5, 2011
    Posts:
    63
    Closing in on four years since the original post, time to resurrect this thread, lol.

    We've been trying to use timeline with lipsync animation but it isn't going smoothly. Basically, we've setup our own playable track that triggers the facial animation on an animator layer that's set to additive, while using an animation track to time out the full body motion.

    Obviously, this doesn't work, I assume the animation track hard overrides everything on the animator, when the animation track is muted the facial animation plays as expected. Is there a way to, I donno, specify what layer the animation track should use on an animator or something?

    Being able to add an additive track, similar to how you can just right click and add an override track would be a welcome feature.
     
  38. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    108
    @SillyBilly I did the exact same thing, and created my own custom playable track for overlaying automatic lipsync when toggled on. We did not have any issues, the Timeline is always updated between Update() and LateUpdate() and after coroutines. So it should work.

    You could also try to update your facial animation in LateUpdate to see if that helps.
     
  39. Goatogrammetry

    Goatogrammetry

    Joined:
    Apr 27, 2017
    Posts:
    197
    You know what I ended up doing? Scripting my characters to run around via joystick input and then changing the script to instead have some public variables instead of joystick-driven variables. I could hook into those variables via the animation dopesheet. Now I can use the full power of the animation system. So by fiddling with the variables there, I could make the characters do what I want and also react to the environment correctly... This means that timeline is more or less useless to me and I just use animation tracks with the variables and it works and has less complexity.
     
  40. dev_34Disorder

    dev_34Disorder

    Joined:
    Aug 7, 2018
    Posts:
    47
    bump
    What worked for me was making an override track and masking out everything except the parts moving in that override track. There really should be an easier way to do this.
     
    Last edited: Apr 13, 2021
  41. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    For those looking at this look up override tracks in timeline. Does what you need to do
     
  42. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    813
    Nope, this thread is about additive tracks, not override tracks.

    Was this ever added in the end? I see it's been discussed for a few years. We'd need it in our project as well.
     
    NIOS and ModLunar like this.
  43. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    813
    Can you describe your approach further? Not necessarily code examples but the rough outline.
     
    GeniusKoala likes this.
  44. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Hey, does timeline support additive layers now? It would be really helpful to fix motion capture animation clips directly inside Unity. It would allow very lightweight pipeline for realtime motion capture. As far as I know there is just override animation track. Any hint on how to implement an additive animation track for the timeine?
     
  45. Squeazer

    Squeazer

    Joined:
    Aug 4, 2015
    Posts:
    14
    We had this same problem, this is actually doable with a custom track and the
    AnimationLayerMixerPlayable
    class. Takes a bit of figuring out that it's possible though.

    Here is a POC:
    Code (CSharp):
    1. using System;
    2. using UnityEngine;
    3. using UnityEngine.Animations;
    4. using UnityEngine.Playables;
    5. using UnityEngine.Timeline;
    6.  
    7. [Serializable]
    8. [TrackClipType(typeof(AnimationPlayableAsset), false)]
    9. [TrackBindingType(typeof(Animator))]
    10. public class AdditiveAnimationTrack : TrackAsset, ILayerable {
    11.  
    12.     public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) {
    13.         return AnimationMixerPlayable.Create(graph, inputCount);
    14.     }
    15.  
    16.     public Playable CreateLayerMixer(PlayableGraph graph, GameObject go, int inputCount) {
    17.         // This mixes the the first layer as override ("base" track) with all the other layers as additive.
    18.         AnimationLayerMixerPlayable layerMixer = AnimationLayerMixerPlayable.Create(graph, inputCount);
    19.         layerMixer.SetLayerAdditive(0, false);
    20.         layerMixer.SetInputWeight(0, 1f);
    21.         for (uint i = 1; i < inputCount; i++) {
    22.             layerMixer.SetLayerAdditive(i, true);
    23.             layerMixer.SetInputWeight((int) i, 1f);
    24.         }
    25.  
    26.         // Create an output to the Animator
    27.         PlayableDirector director = go.GetComponent<PlayableDirector>();
    28.         Animator controller = director.GetGenericBinding(this) as Animator;
    29.         AnimationPlayableOutput playableOutput = AnimationPlayableOutput.Create(graph, "LayerMixer", controller);
    30.         playableOutput.SetSourcePlayable(layerMixer);
    31.  
    32.         return layerMixer;
    33.     }
    34.  
    35. }
    With this you can add animations to your track, and if you want additive animations create a layer (right click -> add layer) and add the additive animations there.

    There may be a better way to do this, but at least this is a starting point.

    EDIT: Also tried extending an
    AnimationTrack
    directly instead of
    TrackAsset
    , but with that, the
    CreateLayerMixer
    method doesn't work properly, "something" resets
    SetLayerAdditive
    to false for all layers.
     
    Last edited: May 20, 2021
  46. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Thanks for sharing that should be a great help! I just can't make it work in my projet. I can't add any animation clip neither on the principal AdditiveAnimationTrack nor on the layers. I'm on Unity 2021.1.7f1 and Timeline 1.5.5 what about you? I'm looking for finding where the problem is.

    . upload_2021-5-19_14-4-32.png

    EDIT : I can add an AnimationClip if I change the class heritage to AnimationTrack like this

    Code (CSharp):
    1. public class AdditiveAnimationTrack : AnimationTrack
    But layers can't add key, they can only import AnimationClip so far like the main layer... I need to add keys to fix the AnimationClip in the main Layer. Any ideas of why the key don't write? Fields that I change are maked red as recordable but when I change values it does not write the key.
     
    Last edited: May 19, 2021
  47. Squeazer

    Squeazer

    Joined:
    Aug 4, 2015
    Posts:
    14
    Hmm, I'm on Unity 2019.4.18f1 and Timeline 1.2.17. Try to change the
    false
    in the
    TrackClipType
    attribute to
    true
    . Doesn't change anything for me but maybe it was a bug in my version of timeline (plus I'm creating the clips from code so for me it doesn't matter).

    Changing it to AnimationTrack won't work, since it won't use Additive but Override for the layers. Unless that was also "fixed. As for keyframing / recording, you got me there, I only used it to add clips, not modify them.
     
    GeniusKoala likes this.
  48. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Uh you're right it becomes "override" instead of "additive". Changing to "true" does not change anything too bad... if only we had additive animation layers in Unity we would not use Maya at all to fix motion capture and to do round-trips everytime :(

    It must be possible and I'll find how! Thanks your hint it was still helping :)

    EDIT :

    Changing
    Code (CSharp):
    1. [TrackClipType(typeof(AnimationClipPlayable), false)]
    Into
    Code (CSharp):
    1. [TrackClipType(typeof(AnimationPlayableAsset), false)]
    Allow me to add clips in an additive mode. Now I just can't record anything of these tracks, with keyframing neither on the main layer or children layers (There is no red button). I'll look for that and tell you if I find :)
     
    Last edited: May 19, 2021
    Squeazer likes this.
  49. Squeazer

    Squeazer

    Joined:
    Aug 4, 2015
    Posts:
    14
    Ah cool, I edited my answer if anyone comes across it, nice find.
    I'm also confused why Unity doesn't already support this in it's animation track. With this layer mixer it should be straight forward, and they could just add a dropdown / checkbox on the track to switch between "Override" and "Additive" mode (since now it always forces Override).
     
    GeniusKoala likes this.
  50. kafedrax

    kafedrax

    Joined:
    Jun 7, 2021
    Posts:
    3
    I confirm importance of this feature for the world of non stantart applicaton of Unity!

    i make dmx512 light control sequencor on Unity - and this feature a last mile for me . It's not possible to use timeline in ergonomic way, when you have to place given channel on fixed track - and as the lower animation track with clip on it turn off the control from the same anination clip asset from upper track

    POC above work as proof of concept but it is still a bit glitchy for me, when i start move play cursor fast from one position of timline to other in preview mode (and this is key moment to create precise light sequence), values from are holded in nonzero value when timeline cursor leave animation clip, even if it zero at the end of the curve.

    i very , very need for this feature.
     
    GeniusKoala likes this.