Search Unity

Blending between timeline and animation controller

Discussion in 'Timeline' started by matthewhxq, Apr 18, 2020.

  1. matthewhxq

    matthewhxq

    Joined:
    Jul 6, 2015
    Posts:
    21
    Hello,
    I'm using Animator with animation controller for basic locomotion animations and timeline assets for special skills/attacks. Everything works fine, except the avatar mask in animation track.
    In the example below, mask is set to bottom part of an avatar (legs & ik).
    So the part that is not masked is looking good, however the part that is masked curls up strangely.
    I thought that masked part would be played by animator and his animation controller, but it looks like it's not played by either timeline or animator.
    Can I somehow achieve that or maybe my setup is just wrong?

     

    Attached Files:

    stefan-velnita likes this.
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Unfortunately masking between timeline and animator controllers doesn't always produce the results like layers in an animator controller or timeline override tracks. Several cases, in particular with root motion and humanoid, will inject default values instead of inheriting the values.

    One possible workaround is to add a layer inside the animator controller that plays the required masked animation clips, and use timeline signals to enable/disable that layer.
     
  3. matthewhxq

    matthewhxq

    Joined:
    Jul 6, 2015
    Posts:
    21
    Oh that's a shame, as the current workflow for skills in timeline is pretty fast and simple.
    One more thing, I have two timeline assets and one PlayableDirector on a player. Is it possible to blend timeline from asset1 to asset2, while the first one is playing? (asset1 and asset2 are set by code). Right now, I have to wait for the end of current timeline animation to swap the assets, otherwise, you can see a jump in the animation.
     
    Last edited: Apr 20, 2020
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Not on a single playable director. You can use a playable director per timeline (they need to be on different gameObjects), and you can set the first clip on a timeline to ease in (and the last to ease out). That will make it blend with whatever is currently playing. But masking between two timelines will still have the same issues as masking between a timeline and animator controller.

    There are some custom user solutions that allow for fully controllable blending between animation tracks on different playing timelines, but it is a somewhat complicated setup.
     
    KeigoTakamura likes this.
  5. matthewhxq

    matthewhxq

    Joined:
    Jul 6, 2015
    Posts:
    21
    Ok, thanks!
     
  6. Warrior4Swords

    Warrior4Swords

    Joined:
    Mar 24, 2015
    Posts:
    2
    Any chance this feature will be implemented in the future? It's really a shame it's not a thing yet, it would be extremely convenient to be able to blend animator controllers and timelines with animation tracks.