Search Unity

Animancer - Less Animator Controller, More Animator Control

Discussion in 'Assets and Asset Store' started by Kybernetik, Oct 8, 2018.

  1. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I'm not sure what you're asking. If you select an FBX and go to the Animation tab you can set up the AnimationClip (or clips) that get imported from it. Then you can use them like any other AnimationClips or load them in code with the methods I just mentioned.
     
    Duffer123 likes this.
  2. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik , I think you've answered my question there - thanks!

    One more question - could I implement Animancer Pro to work along side a third party controller - I am thinking here in particular of Ooti's (Third Person) Motion Controller (which comes with an Actor Controller)?
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    It's definitely possible, it just depends on your scripting skills compared to how strongly dependant that asset is on Animator Controllers. The Hybrid Mini Game example shows how you can use an Animator Controller within Animancer and the 3D Game Kit example shows how you can completely remake an Animator Controller based character to fully use Animancer instead.

    Either way, Animancer Lite lets you try out all the features in the Unity Editor so you can see what it can do before deciding if you want to buy it or not.
     
    Duffer123 likes this.
  4. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik - excellent - thanks for the response. Your system just looks so clean and easy. I am definitely going to buy it. I think it comes up in the sale from Tuesday so I will buy then fore sure.
     
  5. artofbeni

    artofbeni

    Joined:
    Mar 15, 2014
    Posts:
    7
    Hey! I'm trying to use the Animation Rigging package on a character that uses the Hybrid Animancer Component but I can't manage to make it work. It gives me this warning first:
    And then each frame afterwards it throws this error:
    My guess is that it is trying to get the animator from the game object but since the hybrid animancer component makes it a runtime controller, the rig builder is unable to use that to get the animated transforms of the rig.

    The setup is pretty straight forward, just following the same setup as the animation rigging guide. The object with the Animator attached contains the Rig Builder component and a child game object with the Rig component, that in turn has 2 child game objects, the first one with a Multi Parent Constraint and the second one with a Damped Transform constraint. I've tried to replicate this setup on a character that doesn't use Animancer and it worked fine. Can anyone give me a hand to set up the Animancer Hybrid Component to work with Animation Rigging toolkit please? Thanks!


    EDIT:
    I feel very foolish right now! It was my silly mistake, nothing related to Animancer. So the issue basically was that I had the hips root bone of the Animator rig under the male_lod_0 game object. Moving the rig game object under male_lod_0 so both hips and rig are at the same level in the hierarchy fixed the erros and made the Animation Rigging system work as expected. Sorry for the troubles, leaving this here in case anyone happens to make the same mistake.

     
    Last edited: Nov 15, 2020
  6. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    When I've tested the Animation Rigging package I always had the Rig Builder on a child of the Animator. I don't know if you need it down further like that if your model's root isn't a direct child. Did you try with on the same level as lod 0?
     
  7. artofbeni

    artofbeni

    Joined:
    Mar 15, 2014
    Posts:
    7
    I think the rig builder requires the animation component to be on the same game object (Animation Rigging Setup Docs), that's why I had both of them there.

    My problem was that the Rig component was on a higher level in the hierarchy (root -> rig) than the animator rig (root -> male_lod_0 -> hips), and because they weren't on the same level in the hierarchy the rig builder wasn't able to find the animator rig. So apparently having the animator rig as first child of the rig builder is not necessary, as long as the rig component and the animator rig are at the same level in the hierarchy.
     
  8. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik , hi there, sorry, another question. If I put your asset component on a player GameObject which was otherwise being controlled by say Ultimate Character Controller could I use your component to override and carry out distinct animation clips?
     
  9. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    You can only blend between a regular Animator Controller and Animancer if you meet the conditions described here.

    Otherwise, the Hybrid Basics example shows how you can play an Animator Controller within Animancer and blend it with other separate animations. That means you would need to modify the character controller to use the methods on the HybridAnimancerComponent instead of the ones on the regular Animator component.
     
    Duffer123 likes this.
  10. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik , have now bought Animancer Pro - really think just better (for my homebrew project) to use Animancer Pro to create my own controller anyway! One thing I wondered about - I own Dynamic Bone and DynaPresets and DynaPresets seems to require an Animator field when applying presets. See here
    - can I create a 'fake' Animator component on a character without knackering Animancer?
     
  11. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Dynamic Bone doesn't care what animation system you're using and Animancer requires an Animator component anyway so that would all work fine.

    I've also found a way to use Animancer alongside an Animator Controller assigned to the regular Controller field in the Animator component instead of needing to use a HybridAnimancerComponent. That should make it possible to take any other character controller system that normally uses an Animator Controller and use Animancer to play other separate animations for some things. Unfortunately, that approach only allows you to blend between Animancer and the Controller if you're using a Generic Rig (Humanoids can only instantly snap between them). I'll be including this feature in the next Animancer v6.0 Test Release which I hope to have ready tomorrow.

    But if you have reasonable proficiency with programming, I'd definitely recommend making your own character controller setup that uses Animancer without being restricted by an Animator Controller. I've been meaning to make my own sometime so I can release it as an add-on for Animancer, but haven't been able to find the time for it yet.
     
    Duffer123 likes this.
  12. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik - excellent (re Dynamic Bone etc) - I am getting there programming-wise, but even from my perspective I can see how and why Animancer Pro could be programmatically far superior.

    Also, great news re release of v6...
     
  13. unitimokccount

    unitimokccount

    Joined:
    Apr 29, 2019
    Posts:
    21
    Any chance video tutorial would be on a todo list at some time? I want to buy this but there is stuff that I cannot figure out how to do right on Lite that I'd like to get working before putting money in
     
  14. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I'd consider it if someone could convince me that there are some real merits to video tutorials which are able to outweigh the reasons I don't like them. What makes you so sure you'd find what you're looking for in a video tutorial? If it's not in the existing documentation then chances are I wouldn't think to put it in a video tutorial either so you'd be sitting through the videos for nothing (potentially hours of videos if I were to try to explain all the examples with them).

    If you just ask about anything you can't figure out then I can direct you to where it's explained and/or improve whatever parts of the documentation are missing or unclear (which would also be harder with videos).
     
  15. unitimokccount

    unitimokccount

    Joined:
    Apr 29, 2019
    Posts:
    21
    You're right on all accounts, I just personally have found to resonate more with videos but that's just my learning style.

    Also the problem I had was not a lack of knowledge with your asset as I thought it was, but Unity's Avatar Mask ( https://forum.unity.com/threads/avatar-mask-excluding-weapon-on-rig.1010044/ )

    I'll definitely be picking up your asset sometime before this sale ends.
     
  16. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    @Duffer123 Animancer v6.0 Beta 1 is now available for testing. It has support for Native Animator Controllers like I mentioned, but also the improvements to the Finite State Machine system mean that it's worth using if you're building your own character controller system. I'd actually recommend everyone use it since it's now stable. It's obviously less tested than the current version, but it also has a lot of bug fixes.
     
    Duffer123 likes this.
  17. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    78
    Question:
    Is is possible to play multiple synchronized animations the same way as additive layers work in Unity? I need to dynamically add animations to newly added bones, but runtime animation controllers can only be edited in Editor mode.

    So I want something like: I have default run animation. I add some extra bones (cape for example) that are not animated there, so I add an additive layer with animations that plays in sync with original animations. There can be multiple such animations.

    Though, there is a problem with that - I wonder if I can preview original + additive animation properly when creating new ones, so maybe I should not bother and just have all bones in character from the start.
     
  18. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Animancer doesn't have anything inbuilt for synchronising animations between layers. It would be pretty easy to implement, but If you only want to synchronise animations that have the exact same length anyway you can just tell them to play at the same time and they should stay in sync.

    Previewing separate stuff as you set it up would be a bit tricky, but it would probably be easy enough to write an editor script that takes an animation and splits it into several different ones that each control separate bones. That way you would only actually be making one animation and should be able to preview it properly.

    In terms of the performance, it would probably only be worth it if there are a lot of optional bones. Otherwise the cost of having multiple layers would probably be worse than just having a few extra unused bones.
     
    Duffer123 likes this.
  19. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    78
    I guess editor script is an option. Though, it require to always check it for changes and update split animations later. But if I make a single animation anyway - I think I should not bother with splitting them. I thought of something like "You see whole animation, but you edit only keyframes for extra bones". Oh, well.. I think I won't bother with it and just make all bones pre-defined.
     
  20. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @Kybernetik - stupid question - how do I show you're site I've purchased Animancer Pro and then download v6 beta?
     
  21. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    @GamerXP You could implement it as an editor-only Scriptable Object which has a reference to the source animation and stores the details of how you want to decompose it, then use an AssetPostprocessor to automatically detect when the source changes and regenerate the outputs. But that's a bunch of effort for something that doesn't seem to have a clear benefit, so I'd just leave everything together and pre-defined unless you actually run into a problem later.

    @Duffer123 Just email your Invoice Number to animancer@kybernetik.com.au and I'll send you the download link.
     
    Duffer123 likes this.
  22. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
  23. dyrwoolf

    dyrwoolf

    Joined:
    Oct 9, 2010
    Posts:
    18
    Have anyone tried using blendshapes together with Animancer? I tried to use the hybrid animancer component but i cant get it to work. The blendshapes works if I use a standard animator conroller or if i call them from code, so its nothing wrong with the blendshapes.
     
  24. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I've never used blend shapes before, but if you want to email your model+animation+script to animancer@kybernetik.com.au I'll be happy to take a look at it for you (or just post them here if you don't mind sharing them).
     
  25. dyrwoolf

    dyrwoolf

    Joined:
    Oct 9, 2010
    Posts:
    18
    I'll give it a try again tonite, I mail You if I dont succed :)
     
  26. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    HI there,
    Would Animancer be intertwined with the Package Burst at all? I am getting an crash in Xcode, when archiving. The error reads: "library not found for -l_burst_generated32". I am thinking it may be related to versions of Burst and Unity not synching?

    Any ideas?
    Thank you
     
  27. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    No, Animancer doesn't have anything to do with Burst.
     
  28. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    15
    Hi there,

    Does Animancer currently have specific support for UMA, or do you plan to add it?

    Thanks...
     
  29. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    It doesn't have any specific support, but does it need any? Animancer can play any animation you could normally play in an Animator Controller so I wouldn't expect anything special to be needed.
     
  30. GameFDev

    GameFDev

    Joined:
    Jul 13, 2020
    Posts:
    10
    Hello,

    Is there any documentation on how to use Animancer with characters with LOD. I couldn't find any.
     
  31. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I've never used LODs myself, but my understanding is that it's basically just swapping out renderers, meaning it doesn't have any direct contact with whatever animation system you're using.

    The SkinnedMeshRenderer.bones property can be used to have multiple renderers running on the same skeleton, so you could have the main character as normal and the LODs as just their renderers which you set to use the same bones on startup. That should synchronise everything between them.
     
    Duffer123 likes this.
  32. zrrz

    zrrz

    Joined:
    Nov 14, 2012
    Posts:
    40
  33. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    The Inspector for the Mixer State transition shows the timeline where you can set up Animancer Events just like in the footsteps example.

    Also, if you're including your Idle animation in the mixer, you wouldn't want footstep events while it's active so you could do something based on the weight of the Idle state using _Mixer.Transition.State.GetChild(0).Weight. Maybe have the event do nothing if that weight gets too high or make the volume of the footstep sound proportional to 1 - that weight.

    Unity's Animation Events can't do that effectively because they are tied to a specific animation so you would be getting separate events from the Walk and Run animations while blending between them.
     
    zrrz likes this.
  34. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    I want to join 3 animations in sequence-> Start Jump -> jump idle -> end Jump. As there are many npcs that use them, I made an scriptable object with a dictionary with the ClipState.Transitions. Each animancerComponent just plays the animations from there. Everything works as expected excepting the OnEnd. I'm using OnEnd callback to trigger the next animation, but I'm getting:

    'myObject' AnimationEvent 'InvokeEvent' on animation 'Armature_start_jumping' has no receiver! Are you missing a component?

    Any clue @Kybernetik ?
     
  35. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Your Armature_start_jumping animation has an Animation Event that's trying to call a function called "InvokeEvent" which doesn't exist. That has nothing to do with Animancer's OnEnd callback, it's one of Unity's regular Animation Events.
     
  36. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    It has no other event. For sure.
     
  37. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Open the Animation window and select that animation asset to see what Animation Events it has. There's nothing else which would cause that warning.
     
  38. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    It had no event in the animation timeline but duplicating again from the FBX and linking that one seem to work (I guess some weird Unity bug) so nvm! Thanks!
     
  39. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Go to the Animation tab in the FBX, select the animation in the list, and scroll down to the bottom. There's a section for adding Animation Events there as well. I would have expected them to show up in the Animation window, but maybe they don't.
     
  40. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Hey everyone, Animancer v6.0 Release Candidate 1 is now available.

    This will be the version I release on December 4th (when the current Asset Store sale ends) unless I get any more bug reports before then.
     
    ratking likes this.
  41. unitimokccount

    unitimokccount

    Joined:
    Apr 29, 2019
    Posts:
    21
    Is there a way to lookup events by string in code?
    I think it'd be cool to add an event in a serialized .Transition and be able to easily add them exactly where you want them in the gui and then be able to access that in code.
     
  42. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
  43. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    @Kybernetik if I have the clipState.Transition stored in a ScriptableObject (not directly in a GameObject): I select a ClipState.Transition preview icon to open the preview window and then select other ClipState.Transition, it starts to display tons of GUI errors.

    Selecting the correct model from the scene stops the error to pop so it's not a big problem. However, i can't display other transition with that model even if it was already selected.

    Please, add the possibility to change between transition previews without closing that tab-> click on the new icon-> select the model again when preview is not launched from the GameObject itself.

    E.g:
    NullReferenceException: Object reference not set to an instance of an object
    Animancer.Editor.TransitionPreviewWindow+Scene.InitialiseDefaultRoot () (at Assets/Plugins/Animancer/Internal/Editor/Transition Preview Window/TransitionPreviewWindow.Scene.cs:441)
    Animancer.Editor.TransitionPreviewWindow+Scene.OnTargetPropertyChanged () (at Assets/Plugins/Animancer/Internal/Editor/Transition Preview Window/TransitionPreviewWindow.Scene.cs:420)
     
  44. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
  45. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    Any way to get the preview package (by pm or something) instead of waiting to 4th december? It's pretty annoying :/
     
  46. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    I sent it to your PM.
     
  47. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Hey everyone, Animancer v6.0 is now available on itch.io and should be approved on the Asset Store in a few days. Anyone who requested access to the test releases can also download it from there.

    It has a lot of general improvements and fixes, but here are the main features:
     
  48. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    306
    Hello, I cannot figure out how to do the following:

    Before I had a button that was setting the speed of the Animation Controller using UnityEvents like:
    upload_2020-12-5_13-56-33.png

    How that I have a HybridAnimancerComponent I cannot find the appropriate method on it to set the speed.

    I hope you can help me.
    Thanks!
     
  49. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    306
    Even changing the speed of the state directly in the editor doesn't do anything
    upload_2020-12-5_14-43-15.png
     
  50. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570