Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I got a humanoid character in assetstore, but I can't add extra animations

Discussion in 'Animation' started by zundfolge, Nov 6, 2014.

  1. zundfolge

    zundfolge

    Joined:
    Oct 7, 2014
    Posts:
    10
    Hi,

    I got a humanoid character, it comes with 5 standard animations.

    I need to add my own animations, editing the animator controller and adding states with my own animations.

    How can I get that?

    Thanks in advance, I have attached an image with the issue.
     
    Sep200 likes this.
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    You can create a new animation clip in your project, then simply drag and drop it in your controller.

    Note: Keyframing a Humanoid avatar is not possible right now, and keyframing a generic avatar is not an easy task, I would strongly suggest you to use an authoring tools like 3ds max, maya, blender, etc ..
     
    konsnos and theANMATOR2b like this.
  3. zundfolge

    zundfolge

    Joined:
    Oct 7, 2014
    Posts:
    10
    Thanks for the response.

    The fact is that I can't create that "animation clip", because there is no "add clip" option in the menu (look at the image I've attached, in the Animation tab).

    How can I do?
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Effectively there is a bug that prevent to add new clip if the current clip is not editable, this is fixed for 5.0.

    For 4.x as a workaround, you can create a clip by script and drag and drop it on your controller.
    Afterwards the trick is to select a not ready only clip to make the menu item appear,

    To help you, create a directory Editor in your project and drop the attached script, that should create a new menu Mecanim/CreateClip, select your GO and click on this menu to add a new clip to your controller
     

    Attached Files:

    theANMATOR2b likes this.
  5. zundfolge

    zundfolge

    Joined:
    Oct 7, 2014
    Posts:
    10
    Hi, I got this error on that script:

    Assets/Hospital/Editor/CreateClip.cs(19,29): error CS0234: The type or namespace name `Animations' does not exist in the namespace `UnityEditor'. Are you missing an assembly reference?

    I tried to get Animations from UnityEditor with another method, but I didn't find anything. Also I didn't find how to get Animations from UnityEditor in the documentation.

    How can I fix that?
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    You probably don't have the same version than I have, Which version of Unity are you using?
     
  7. zundfolge

    zundfolge

    Joined:
    Oct 7, 2014
    Posts:
    10
    I'm not at home right now, but I think I'm using v4.8.5.

    Which version are you using? In order to compile the script you attached.

    The line that doesn't compile is:

    UnityEditor.Animations.AnimatorController controller = animator.runtimeAnimatorController as UnityEditor.Animations.AnimatorController;

    since "Animations" doesn't is a member of UnityEditor class. I have verified on:

    http://docs.unity3d.com/ScriptReference/

    and there are the same "members" of UnityEditor that I have on my Unity version.
     
  8. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    v4.8.5! You live in the future my friend, 4.6 is not yet released.

    In 4.x AnimatorController was not in UnityEditor.Animations but in UnityEditorInternal namespace.
    Try this one instead
    Best regards
     

    Attached Files:

    theANMATOR2b likes this.
  9. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I need help Mecanim.Dev I'm from the future!!
    :) Sorry, that was funny.
     
  10. zundfolge

    zundfolge

    Joined:
    Oct 7, 2014
    Posts:
    10

    Finally my version is 4.5.3f3 :).

    The script you attached allowed me to generate new animation clip, but I can't add curves to my model.

    In fact, I have purchased a character pack on assetstore. Characters just came with Idle animation, I need to add much more animations. Maybe I'm doing it in the wrong way.

    What do I have to do in this case?

    Do I have to add curves over model in a new clip, or I have to generate animations separatelly and then attach to the character controller?

    I will appreciate any help in this way.

    Thanks
     
  11. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790


    Please follow mecanim.dev's advice for the best result and easiest path toward your goal. he suggested "keyframing a generic avatar is not an easy task, I would strongly suggest you to use an authoring tools like 3ds max, maya, blender, etc"
    The path you are trying to follow is troublesome and fraught with heartache. If you can't afford a proper authoring tool your best bet is blender which is sturdy in it's own right and has a huge user community that can help you proceed past your current point of contention.
     
  12. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi Zundfolge,

    Creating new animation for a character is not easy if you never did it before, there is a lot of tools and concept to learn.
    There is many tutorial on you tube to help you if you follow this path.

    If your goal is to create a game and not learn how to keyframe I would suggest you to start with existing animation, look on the asset store there is a plenty of free project and animation. One of the main feature of mecanim is that you can retarget any motion on your avatar if you are using an humanoid rig.
    Start your project with those animations, and later if you want you could replace them with you own animation.

    These three project contain some basic animation like: walk, run, idle, turn, strafe, jump, etc ...
    https://www.assetstore.unity3d.com/en/#!/content/5328
    https://www.assetstore.unity3d.com/en/#!/content/5330
    https://www.assetstore.unity3d.com/en/#!/content/9896

    Best regards,
     
  13. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    also check out mixamo, they have a library of animations...
     
  14. Sep200

    Sep200

    Joined:
    Jul 29, 2013
    Posts:
    13
    All mixamo animations are paid they dont have any free ones
     
  15. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    you sure? pretty sure right now they are giving everything out for free (they were acquired by adobe). I was just on their site yesterday I think, it said all characters and animations are currently free. (I didn't download anything, maybe there is a limit or something, but that's what I thought it said)
     
  16. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    absolutely free, I was an animating fool yesterday. Plus creating your own new characters with FUSE is as easy as customizing your character in a mmo, just tons more options.
    Step1 Install Fuse
    Step 2 Build a Character
    Step 3 Still in Fuse, upload back to mixamo by clicking on the animate button in Fuse
    Step 4 At mixamo web site click Store --> My Assests and select the character you just uploaded.
    Step 5 click on "Find Animations" Get all your animation, tweak them with the sliders and addd them to your assests (your still at Mixamo's web site).
    Step 6 Click on you character you uploaded and queu him for downloand. Select Animation + skin
    Step 7 Click on my animations and queue for download all your animations except select animation only (no skin)
    Step 8 Bring in to your project.

    Step 9... I'm stuck on how to get these animation to work in the animator since they are in separate files.

    Here is a video of my first character, I called him "Gorgo". The animations he is doing are not the ones I created at Mixamo's web site. he is borrowing Ethan's animations.


     
    Last edited: Nov 1, 2015
  17. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    you have to set up the animations in unity. Typically you want to configure the animation import settings, then implement the animations in your animator controller (if using mechanim).

    start here http://docs.unity3d.com/Manual/AnimationsImport.html

    you need to configure your animations with a specific rig or avatar. You want to use the humanoid one, so mechanim can retarget the animations from those files you downloaded onto any other model that uses your same avatar/rig.

    and then move onto the Animatior controller section http://docs.unity3d.com/Manual/AnimatorControllers.html
     
  18. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    My models are rigged properly. They inherit Ethan's animations though, not the ones I imported from Mixamo. I read thoes doc links several times yesterday.
     
  19. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    196
    When you import the files you created on Mixamo, you will be able to assign those animations to the animation states in the mecanim animator controller. Alternatively, you can create an animator override controller and derive from the original controller and assign the Mixamo animations to it. I hope that makes sense. If you need I can try to dig up a video on it.
     
  20. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    I'm quite certain those links are exactly what you have to do.

    You need to configure the FBX files (or whatever you exported the animations as) inside the unity editor. There is a tab for "rig" and "animations", configure the avatar on the "rig" tab (make sure it's set to humanoid, then use the same avatar that Ethan is using), and then configure the animations tab (configure each animation clip name and length, configure looping, etc).

    Then you have to configure the Animator Controller (it configures state machines for switching between animations), in your case I guess you are probably going to edit whatever animation controller ethan uses. But generally speaking you just drag the animation into the Animator Controller, then wire it up within your statemachine, and then depending on how to configure the animator controller you may need to set a trigger etc on the Animator in order to play the animation.
     
  21. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    82
    Hey Tricky and Phil, thanks for the help. It's all clearer to me now. I bought an Kindle book called unity animation essentials by Alan thorn. Now what you told me makes total sense. Tonight I'll open up the grounded blend state and swap in my animations.