Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Animation C# jobs in 2018.2a5

Discussion in 'Animation' started by Mecanim-Dev, Apr 4, 2018.

  1. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    86
    Timeline uses the Playable API indeed, but the Playable API is not made just for Timeline. The Playable API is a low-level API that allows to create your own data-flow graph. This data-flow can be for animation, sound, video, scripts, ...
    So you can use the Playable API and do whatever feature/tool without ever having to touch the Timeline.

    Playable API being already quite low-level, we haven't planned to go even lower. Maybe in the future, who knows? Maybe we'd need more abstraction, but for the moment, ECS and Playable API are two low-level (lowest?) Unity APIs.

    I do think you can already do very low-level work just using the Playable API (which is multi-threaded for the animations, even with an AnimationScriptPlayable). But if you want to go even lower, you could do your own animation system with your own format, using ECS ;)

    Thanks man!
    We already have some plans about how to redo some parts, but new techs (like ECS) frequently change these plans ;)
    We'll keep in touch!
     
    tinyant likes this.
  2. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    523
    That's right! -- I do remember that now! -- I haven't messed much with the PlayablesAPI yet aside from Timeline, so it seemed like a really odd thing to tie the two together with low-level Animation stuff too. Thinking on it though, since the PlayablesAPI and "streaming Animation data" deal with time-based dataflow at a pretty low-level, it makes a lot more sense now.


    That's quite exciting! -- I really need to get some time to invest in the possibilities of the new animation system! Sadly, it's difficult to skim (sparse) documentation sometimes, and it almost always requires heavy experimentation (which takes a lot of time to even just get a grasp on what's going on!) but it definitely sounds like it's worth getting to know! -- If ECS is really that powerful that I could make my own very low-level animation systems, that means it can't come fast enough!



    Speaking of low-level animation stuff -- do we have access to the skinnedmesh bone names and starting orientations etc. directly from the model's file (and at runtime) just yet? -- I find this to be very limiting when trying to mask out things (such as parts of a skeleton to ignore while transforming other parts of the model's skeleton manually).


    Sounds really awesome! -- I feel like we totally need better animation tools and I would seriously love to contribute wherever I am able to! Things like general use-case scenarios and UX for animation are things I've dreamed about since I was a kid. :)
     
    tinyant likes this.
  3. tinyant

    tinyant

    Joined:
    Aug 28, 2015
    Posts:
    97
    Can we use Job system and ECS to make Editor development? like Editor Mode Animation system play around animation data in the Editor Mode. We can define our own data structure and own animation logic so on.I want run my system not only in Play Mode but also in Editor Mode.

    Thanks.
     
  4. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    86
    I guess it's possible, but I don't know much about ECS since I haven't played with it yet. And the Animation C# Jobs uses the C# Jobs System, but this system is yet another low-level feature that is beyond the scope of this thread ;)
     
    tinyant likes this.
  5. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,083
    Can we also get an example for twistbone/adjustmentbone support and additive/corrective blendshape?
     
  6. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    86
    Reanimate_L likes this.
  7. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    58
    The sample is really nice but may I be greedy and ask for something with dynamics? Like a pony-tail or hair.
    I am guessing things like powered ragdolls are out of the question.
    Lastly in the foot IK for mecanim is it possible to specify what part of the foot we want for contact? Eg toe vs heel vs ball
     
  8. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    86
    A sample with physics is in the pipeline right now.
    Maybe we could do a CCD example as well.

    I encourage you to create new issues in the repo if you have ideas, we'll triage them as they come ;)
     
    awesomedata and Reanimate_L like this.
  9. RomainFailliot

    RomainFailliot

    Unity Technologies

    Joined:
    Nov 29, 2016
    Posts:
    86
    I encourage you even more to fork the project, try to do the sample yourself and propose a PR (if you have the time). We would gladly review it!
     
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,083
    i think what he mean is jiggle bone
     
  11. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    58
    This and more
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,083
    @RomainFailliot any news about active ragdoll and ragdoll in/out transition? i remember someone mention that an example for that is in the progress?
    Edit : oh wait sorry that was you :p, any news?
     
  13. Siwone

    Siwone

    Joined:
    Sep 12, 2013
    Posts:
    3
    Do you mean the blending between an animation and rigidbody that was mentioned earlier? I'm curious if I could use it to make swords clashing look good and also maybe ease up on the actual animation work that would go into that part. Right now it's kinda awkward having to convert the direction of the hit into a 2d space to be used in a 2d blend in the Animator for different reactionary animations.

    On another note I've wanted to dive into procedural animation since I watched
    but back then I figured that it wasn't really possible in Unity without writing an entire custom system myself. I was so excited to read about this on the 2018.2 blog update. Would you guys consider a sample on basic walking/running animation made out of a couple keyframes/poses like David Rosen showed on the presentation starting from around the 5:20 mark?
     
  14. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    58
    This was already possible since unity 3.
    I think any implementation of this sort would have to be custom code as it is heavily dependent on the game you are making and needs a lot of trial and error iteration.
    It is simply key frame animation with a custom interpolator
     
  15. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,082
    Here's a talk from Unite Berlin that uses Animation Jobs for IK, if you prefer this in video form:

     
  16. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,082
    Follow up questions from a while ago!

    The big problem with DSP is that it's timescale independent. This means that setting Time.timeScale to 0 to pause the game doesn't do anything, the graph still plays like normal. This is unlike the Animator, which does respect the timescale.

    I think DirectorUpdateMode.GameTime is a more sensible default value for playable graphs - yes, people mixing together audio and animations will have to figure out that they have to change the time mode, but that's probably better than that everyone else needs to figure out that they have to change the time mode.

    DSP clock is a special case for fixing a special case issue, no?
     
  17. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    717
    Can anyone explain the differences between a TransformStreamHandle and a TransformSceneHandle?

    Mostly wondering...
    - performance difference of setting position/rotation of each of these
    - what makes a particular transform able to be "resolved" as a TransformStreamHandle? Does it need to be part of the Avatar?
    - is it possible to access transforms created at runtime via a TransformStreamHandle?
     
  18. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    717
    Another question:

    What is the correct approach if we want to use raycasting to position our IK targets since we cannot do a raycast from inside our IAnimationJob? Seems like the targets would have to be positioned separately and would always be one frame behind the animation when the IAnimationJob executes