Search Unity

Unity PlayableGraph Visualizer package (in preview)

Discussion in 'Animation' started by RomainFailliot, Dec 21, 2018.

  1. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    Hi all!

    I took some time during my holidays to make a package out of the graph-visualizer GitHub repository (it was something I wanted to do for a long time! ;) ).

    For those who don't know yet what this project is, it is a tool that allow to visualize the Playable graphs that are running in the current scene. And you get something like that:

    PlayableGraph Visualizer - screenshot 03.png

    To install the package:
    • Open the Package Manager window: Window > Package Manager
    • Show preview packages: Advanced > Show preview packages
    • Search for "playable"
    • Select the "PlayableGraph Visualizer" package
    • Click on the "Install" button
    Thank you!

    _________________

    Edit:
    • 2019-01-30: New release v0.2.0-preview.2
    • 2019-01-03: Package has been whitelisted; it is now available in Package Manager
     
    Last edited: Jan 30, 2019
    AndrewKaninchen likes this.
  2. florianhanke

    florianhanke

    Joined:
    Jun 8, 2018
    Posts:
    28
    Hi Romain,

    It works very well, thanks! If you have specific questions, please let us know.

    One thing I was wondering about was whether the Window menu option should be in the Analysis submenu so it does not clutter up the top-level Window menu.

    Cheers!
     
  3. sunrisebacon

    sunrisebacon

    Joined:
    Jul 15, 2017
    Posts:
    11
    I'm very new to the Playables API but as far as I can tell it works.

    I've only used it with the Animator and I have a very hard time translating (in my head) the Animator graph to what the visualizer is displaying. It seems very abstract and doesn't really match the flow of animations. At least not in an obvious way.
    The only concrete information I can see is the name of the clip that is currently playing and only if I click the active Animation Clip.

    Otherwise, I second Florian's point about putting the visualizer it in the Analytics submenu.
     
  4. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    Hello!

    Thanks for the feedbacks ;)
    I'll change the namespace, but I'll need to bump the major version (since it breaks the API)

    I agree for the menu, I'll find another place to put it (probably Analysis as you said, but I'll need to check with our UX team).

    As for the graph representation, the clips (on the right) are played and blended through the mix nodes going toward the root (on the left).
     
  5. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    The package preview has been whitelisted, so now it's available directly from the Package Manager UI (if "Advanced > Show preview packages" is checked).
    upload_2019-1-3_17-52-20.png
    This is a first preview with exactly the same content as before (no API changes, and no Menu changes as discussed above).
     
    Lars-Steenhoff likes this.
  6. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    I'll give it a spin.

    I've had the visualizer in our project since it launched, and it's been pretty useful, so being able to delete it and have it as a package would be useful. Looking at the repo, I realize that I'm miles behind, and it's got a bunch of improvements semi-recently, so I'm very happy about this.

    Do you know if there's any progress on plans for having packages include #defines? I've got some animation plugins that I've included the visualizer in. I'd like to remove the visualizer from them, and instead wrap the visualizer integration in #if PlayableGraphVisualizer, but afaik that's not possible right now?
     
  7. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    @Baste A feature that looks like what you want landed in 2019.1. I've asked the devs for more information, I'll get back to you.
     
    Baste likes this.
  8. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    @Baste I'll need to do some test, but it seems to be doable (might break the API though, since this feature appeared in 2019.1).
     
    Baste and Lars-Steenhoff like this.
  9. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    New v0.2.0-preview.2 !

    Changes are:
    • Moved from MIT to UCL license (it's a legal prerequisite for a package made by Unity)
    • Moved menu entry under "Window > Analysis" (as @florianhanke proposed)
     
    florianhanke likes this.
  10. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    It actually goes both ways, so there is no best direction to represent the graph.

    When preparing the graph, information (such as time) is propagated from the root, on the left, to the leaves, on the right.
    But when processing the graph, nodes (such as AnimationClipPlayable) get executed from the leaves, on the right, to the root, on the left.
     
  11. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    All the Playable nodes have a prepare and a process pass. You can see the Animation C# Job for more information: https://blogs.unity3d.com/2018/08/27/animation-c-jobs/

    But there is no right or wrong way of showing the graph, it could have been top-down as well. I understand it might feel strange to you (maybe you're used to shader graphs?), but in the end it's just a matter of getting used to it.

    About your issue, I'm not sure I understand it well. It should be possible to animate material properties, but some properties can't be animated, try to animate them in the AnimationWindow and see which properties can be animated and which can't.

    When you say "it seems like there's no way to make AnimationClips for Playables", I don't understand. Especially the "make" part. Playable is not meant to make anything, but to process data. The AnimationClipPlayable is the node that allows to play an AnimationClip.

    Timeline uses the Playable as a back-end, and basically brings scheduling to the Playable API; Timeline allows to schedule clips/events over time.
     
  12. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    The Playables system plays exactly the same animation clips as the Animation component and the Animator with an AnimatorController It's just a different (more flexible, more complex) way of playing them.

    To round-trip, you need to provide the animation clips to the animation window using the IAnimationClipSource. The SimpleAnimation component does this.


    Timeline is a system for movies and uninteractive cutscenes that's driven by Playables, and is somewhat unrelated to animating single characters or objects. I mean, you can animate a single object in a timeline, but that's probably way overkill.
     
    RomainFailliot likes this.
  13. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    That's it, Playable is merely a back-end for Timeline. But it can do more than being a back-end just for Timeline, it is used for instance by SimpleAnimation, and the Runtime Rigging package.

    And instead of making it a blackbox, we exposed the API for those who would like to yolo it ;)
     
    Last edited: Mar 7, 2019
    jrumps likes this.
  14. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    507
    I just gave it a go and found that the graph selection dropdown only ever shows one "[Unnamed]" graph, even if there are multiple graphs without a name.
     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,368
    @RomainFailliot is the Runtime Rigging a new stuff? i never heard about it, how come it never being announced? for me personally those stuff are very powerfull for extending animation.
     
  16. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    @SilentSin: I'll have a look at it. I don't think it's supposed to happen, but you can still name your graphs, that's the best way to fix your problem (otherwise you would just have a bunch of [Unnamed] graphs, I'm pretty sure that won't be more useful ;) )

    @Reanimate_L: It has just been presented at GDC 2019, it's a fairly new feature and still experimental. Though it's already pretty powerful!
     
    Reanimate_L likes this.
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,368
    I see well that is a good news, as some one who always using controller and constraint for rigging this will help a lot. I notice the constraint are still limited ,i understand it's still new feature which i hope more constraint will be added in the future. Also is there a plan to create a programmable constraint in the future (with the new visual script editor maybe)? this way we can setup/create/combine constraint as we want. That would give us more flexibility and power?
    And is this runtime rigging are part of the C# job animation system? i mean like we starting to get multiple animation system any plan to merge them to centralize the API?
     
  18. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    110
    Hehe, yes to all that actually!
    Animation rigging is based on the new C# animation job and thanks to that, you can already create your own constraints, it's been designed with that in mind. And we'll provide a library of constraints starting with IK, offset, and a few other..
     
    Reanimate_L likes this.
  19. epmsimard

    epmsimard

    Joined:
    Apr 17, 2019
    Posts:
    1
    Hi @RomainFailliot,

    I'm testing the visualizer for the first time trying to see how it would translate if I wanted to provide building blocks to my animators and let them create a graph but it seems to be oriented only toward showing the data flow and not letting you create one of your own (outside of Animator). Any plans there?

    Interestingly it's showing me the following when I create a new animator graph with only an animation clip in it and double click on the clip.
    upload_2019-4-17_13-15-28.png

    It's hard to find the link between each node and what we see in Animator when the nodes show the node type but don't have the node name. I understand what the first few nodes refer to but I'm puzzled to the second set of Animation Mixer, Animation Clip and the presence of Animation Pose at each levels.
     
  20. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    507
    The visualiser really doesn't seem to help understand what the AnimatorController does internally. As far as I can tell, it only connects the playables of the current state and the one being transitioned towards at any given time because that's all the visualiser shows. So it's most likely keeping the playables for all the other states disconnected until needed.

    It's also a bit strange if you watch what happens when you have the active state (the top clip) selected when it fades out. It moves your selection down to the other clip and the inspector shows the clip as "none". So I'm not sure if that's just a minor bug in the way the visualiser keeps track of the selected node or the controller is actually changing the playable's clip (which isn't possible with the API we have access to as far as I know).

    I have no idea what the AnimationPose nodes are either. They just show up as Playable for me (in Unity 2018.1).

    I also tried to fiddle around with the graph a bit using scripts but found that everything is protected from tampering (gives an error if you try) except for the final output, but swapping that to something else does nothing because it just gets set straight back. I'd actually like to be able to do the same to protect my own graphs in Animancer Lite, but that doesn't seem to be exposed by the API either (there are methods for CanChangeInputs, CanDestroy, and CanSetWeights, but they are undocumented and I haven't found a way to set those flags).
     
  21. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    84
    Are there any updates planned for this tool? It's completely unusable on graphs of a non-trivial size. At the very least having zoom and pan is necessary.