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

What about Playable API?

Discussion in 'Animation Previews' started by Koval331, Jun 19, 2019.

  1. Koval331

    Koval331

    Joined:
    Feb 3, 2019
    Posts:
    114
    So I stumbled upon this page in the docs. All that I found about this feature is a couple of youtube videos from 2017 and a lonely blog post.
    • Is Playable API actively in development right now?
    • Is it going to replace Mecanim?
    • Can you give me some recent news about it, please?
     
    ModLunar likes this.
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi, So to answer your questions:

    There is no ongoing development on the Playable API as is, but it's actively used to promote new animation features like this one. We have made further improvements about a year ago by adding animation jobs to the Playable API on which Animation Rigging builds upon (https://blogs.unity3d.com/2018/08/27/animation-c-jobs/).

    No. Mecanim is already built on top of the Playable API, so, in a way, mecanim has already been replaced by the Playable API ;)

    We are actively working on a new animation system based on the DOTS framework, which comes with a new graph API.
     
    Ryuuguu, NotaNaN, awesomedata and 4 others like this.
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,276
    NEW GRAPH API YESSS
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,331
    Playables is a lot lower level than Mecanim, so it's not going to replace it.
    That being said, It's currently completely feasible to build a complete replacement for Mecanim using Playables. You'll have to scavenge the docs and examples to get something workable, and there's a few features that's not exposed (like animation clip mirroring), but the end result can be a lot better than what you're used to.
     
    ModLunar and florianhanke like this.
  5. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    260
    Since the Animation Rigging package is based off of playables wouldn't it be incompatible with the DOTS animation system being developed? Are there any plans for compatibly between the Animation Rigging package and the DOTS animation system?

    Thanks.
     
  6. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    While Animation Rigging is based on the PlayableAPI, all constraints are implemented using Animation C# Jobs. This will translate very well to the new graph based API implemented for DOTS animation.

    Furthermore, the PlayableGraph used to run Animation Rigging is only built at runtime and is completely distinct from the data. This should allow for an easier conversion to the new graph system once it's ready :)
     
    Ryuuguu, NotaNaN, tarepan_yk and 2 others like this.
  7. Lex

    Lex

    Joined:
    Dec 2, 2009
    Posts:
    43
    So... We just found this neat package while digging into some animation stagin packages.

    Code (CSharp):
    1. "com.unity.unode": "0.7.2-preview.animation"
    Since we're trying to develop a ActionScript like system with nodes I wonder if that's the new Graph API you're talking about.
     
  8. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    So, yes, this is indeed the new graph API that is used by DOTS animation. However, this is a fairly old snapshot that is not maintained anymore, so I would advise against using it in any development.
     
  9. Lex

    Lex

    Joined:
    Dec 2, 2009
    Posts:
    43
    Oh well, just now that I'm starting to get a good grasp of it, haha. Any idea on when we could have a public preview package for this "more recent" version?

    Edit: Do you think the core functionality like the Kernel and Simulation nodes structure would change so drastically?
     
    Last edited: Oct 3, 2019
  10. janusl

    janusl

    Unity Technologies

    Joined:
    Aug 8, 2018
    Posts:
    24
    Hi, the new version is called DataFlowGraph - mentioned briefly in the Unite keynote from Copenhagen. The experimental preview will be released shortly together with the DOTS Shooter.

    The concept of a mutating simulation side with a distinct frozen rendering side using kernels is fundamental to the system. The actual API is something we still rework a lot to accommodate what DataFlowGraph needs to do.
     
  11. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Just to add a little to what @janusl has said...

    The version of Data Flow Graph we're releasing is great for understanding where we're going and how we plan to solve this sort of problem. The specifics of the implementation should be treated with EXTREME caution (i.e., please don't build production code around this yet, as many parts of the package are subject to change).
     
    tarepan_yk, Lex and optimise like this.
  12. Lex

    Lex

    Joined:
    Dec 2, 2009
    Posts:
    43
    Just an update on that. It's already available with

    Code (CSharp):
    1. "com.unity.dataflowgraph": "0.11.6-preview"
    and I'm loving the guided tour in code.

    Will this package include any way to visualize and serialize nodes and graphs in the future? For now I'm thinking about something using ScriptableObjects and maybe a Node Based Editor like this one.
     
    elcionap likes this.
  13. janusl

    janusl

    Unity Technologies

    Joined:
    Aug 8, 2018
    Posts:
    24
    Glad it's usable :)

    There will be a tool across our teams to visualize dynamic graphs, for DSPGraph and animation etc. - something like the playable visualizer.

    There will also be authoring tools for creating/serializing graphs, like shader graph and friends.
     
    elcionap likes this.
  14. ProceduralCatMaker

    ProceduralCatMaker

    Joined:
    Mar 9, 2020
    Posts:
    108
    Wonder if you went ahead with your com.unity.dataflowgraph loving the guided tour in code experience.
    Could you share a little bit of it?
     
  15. Lex

    Lex

    Joined:
    Dec 2, 2009
    Posts:
    43
    Well, since it was just an experimental preview I didn't go much further into it even though I need this so badly.

    But about the guided tour, it was excellent in helping me understand the basic concepts behind the tool with a good explanation of concepts and well-designed examples. I really hope this becomes a standard for this kind of feature.
     
    ProceduralCatMaker likes this.
  16. ProceduralCatMaker

    ProceduralCatMaker

    Joined:
    Mar 9, 2020
    Posts:
    108
    Thanks, but I am not able to understand what Guided Tour you were referring to.
    I have been looking around and could not find any source or else about dataflowgraph documentation for DOTS/ECS.
    can you give me a hint? Did you explore the code debugging in VS or what?
    Thanks.
     
  17. Lex

    Lex

    Joined:
    Dec 2, 2009
    Posts:
    43
    Just import the "Examples" and "Guided Tour in Code" with the Package Manager. See image bellow.

    import.png


    Then everything should be imported to your Assets folder:

    assets.PNG
     
  18. ProceduralCatMaker

    ProceduralCatMaker

    Joined:
    Mar 9, 2020
    Posts:
    108
    Thanks, just updated a few days ago! Great!
    I was searching for a github repo before, and was under my eyes in Package Manager! Too easy. Shame on me!
     
    Lex likes this.
  19. KwahuNashoba

    KwahuNashoba

    Joined:
    Mar 30, 2015
    Posts:
    110
    What happened with the package in the meantime, is it removed for some reason? Can't find it in package manager, it should be somewhere here:
    upload_2020-5-8_11-24-13.png
     
  20. ProceduralCatMaker

    ProceduralCatMaker

    Joined:
    Mar 9, 2020
    Posts:
    108
    Not everything is always visible from package manager, even with Preview mode set.
    In these cases go in your Packages folder of your project and add a line to the manifest file
    like
    "com.unity.dataflowgraph": "0.11.6-preview"
    only after that it will show up in your package manager
     
    KwahuNashoba and Lex like this.