Search Unity

Official PlayableGraph Visualizer package (in preview)

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

  1. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    108
    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:
    11
    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:
    108
    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:
    108
    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:
    3,695
    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:
    108
    @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:
    108
    @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:
    108
    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:
    108
    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:
    108
    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:
    3,695
    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:
    108
    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. SilentSin

    SilentSin

    Joined:
    Jan 3, 2013
    Posts:
    225
    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.