Search Unity

Man In a Suit Humanoid basic Animation Not working

Discussion in 'Animation' started by unitygamer9, Mar 28, 2017.

  1. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Hello,

    I would like to animate a Humanoid Character(Man in a Suit found in Unity Asset Store). But whenever I try to Create an animation clip, the model (3D Humanoid) is changing its pose and position in the scene view.
    I am trying to animate the hands of the Humanoid. I am pretty new to animation. Please help me guys. Thanks in advance.

    First Image: pose changes automatically after creating an animation clip on this object
    Second Image: Initial image when this 3D model Humanoid is added to the hierarchy afteranim.PNG Initialpose.PNG
     
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    520
    The pose in the first screenshot is the relaxed pose (the pose when all humanoid muscles are at 0). If you're not animating anything but the hands, this is the result you'll get.
     
    unitygamer9 likes this.
  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,962
    If the current clip is empty, it will always revert to the relaxed pose (first image). If you're using layers/layer masks, this will be the case for any unanimated bones.
     
    unitygamer9 likes this.
  4. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    520
    You need to mask out what you don't want to write.

    ...and you need some kind of base animation for your character.

    If you have your hands on a second layer, you need to mask out the rest of the character on the layer.
     
    Last edited: Mar 28, 2017
    unitygamer9 likes this.
  5. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thanks so much for ur reply, I'm really sorry if this is a too basic question. I'm not aware of that layers you are talking about. and the animation clip is empty, I have just created an animation clip in the animation window, Can you please walk me through how I can create a basic hand animation, may be like making a hand movement for salute action. It would be of great help to me.
     
  6. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thanks for the reply. No I haven't done any animations, on that Humanoid, Is it possible to make some hand movements. Could you please walk me through a basic hand animation.
     
  7. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,962
    Add an Animator component, assign an Animation Controller, then put your animation in the default state of the Animator.

    There is a lot of information on the Learn page.
     
    unitygamer9 likes this.
  8. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    520
    There's not really a workflow to animate in humanoid in the Editor (yet).

    Normally, when working with humanoids, users will import animations from a dedicated tool (Blender, Motion Builder, Maya, 3DS Max, etc..), usually in the form of an FBX file.

    The result you are getting is normal. The base pose for humanoids in Unity is the relaxed pose.
    When your clip is empty, it's the same as writing 0 to every human bone, which will give you the relaxed pose.

    If you want to animate your character, and use humanoid animations, I suggest you start by animating your character in Blender (or any of the previously mentioned tools, but Blender is free), because Unity doesn't have most of the advanced features that make animating characters reasonably easy.

    As for animating a hand, a quick google search (https://www.google.ca/webhp?sourcei...ie=UTF-8#q=how+to+animate+a+hand+in+blender&*) seems to have quite a few tutorials to get you going.
     
    theANMATOR2b and unitygamer9 like this.
  9. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thanks for the swift reply LaneFox. I just want the hand movements as in sign language for deaf. Is it possible to do in Unity animation? or should I use some third party animation tools?
     
  10. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,962
    You could, but you would be using the wrong tool. As David points out above you'll want to use a third party tool to do it properly, especially so if you're doing ASL you'll want clear and accurate animation for the entire body.
     
    unitygamer9 likes this.
  11. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thanks for the quick reply David. Is it possible to do some sign language type of actions in Unity animation or that blender tool you have mentioned, is there any other tool with which I can do those sign language sort of hand animations in a short span of time?
     
  12. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    T
    Thank you so much, can I import the animations done in other tools into Unity so that I can build my application using unity?
     
  13. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Can I Use unity animation if I Just want to move the arms of that humanoid, without detailed hand movement?
     
  14. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    196
    As @DavidGeoffroy mentioned earlier, there isn't a straightforward workflow for animating a humanoid rig in the Unity editor. This is primarily because you can't directly animate bones of a humanoid rig, instead it relies on a the concept of muscle clips.

    You could potentially change the import settings for the rig to generic, but that would prevent retargeting of other animations to your rig. Even though it would allow for bone animation.

    I have used this tool in the past: https://www.assetstore.unity3d.com/en/#!/content/32233
    If you are willing to invest a small bit of money and the time to learn about how muscle clips work, it is well worth it.

    There isn't really a quick way to learn about animation. Sometimes the things that sound simple, like moving a finger, require knowlege of much more.

    Cheers,

    TrickyHandz
     
    theANMATOR2b and unitygamer9 like this.
  15. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    If anybody wants to see a YouTube video of how layering works, check this out:
    .
    Now I've got a model I can animate the eyes, mouth, hands, etc all within Mechanim.

    Btw, the good stuff starts around 5:40
     
    theANMATOR2b and unitygamer9 like this.
  16. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thanks DreamHammer, Could you please share a video or enlighten me on how to animate hands in Unity Mecanim
     
  17. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    Did you even watch the video I posted?
     
  18. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Yes, I have watched it earlier, but I couldn't understand it, I am really new to animation, I need animations for fingerspelling. I'm not sure how to do that. Could you please help me with it.
     
  19. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    Yes I'll help. Aside from your model, what else do you have? Do you have any animations yet such as an idle animation?
     
    unitygamer9 likes this.
  20. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    No I have no animations
     
  21. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    Ok, I have just a few more questions before I write the guide up. How much of the body are you wanting to animate? How do you plan on triggering each animation? Do you know what a mask (not the kind that goes on your face) is? Do you know about keyframes?

    This isn't going to be 'quick' if you're doing (I'm assuming) each of the 26 letters and whatever other gestures and probably won't be easy since I'm basically repeating mostly the same information from that video just tailored to your question more or less.
     
    unitygamer9 likes this.
  22. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    I do know what a keyframe is, I just want to animate the hands/arm of the body. All I know about mask is, we use it to state which parts of the body we want to animate, but not how we mask.
    Edit: I want to trigger the animation based on some letter
     
  23. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    Here goes:


    --- Make all your hand/arm animation clips. It's ok that your person is in relaxed pose.
    --- Now make an idle pose animation clip(or use the Standard Assets one), otherwise you'll be starting in a T-pose.
    --- After you have your animations, select the model in the hierarchy and click "Revert" in the Inspector panel to bring him back to a T-pose.
    --- Next, right click in the Assets folder and go to Create > Avatar Mask. Name it 'RightArmMask'.
    - Click the Avatar Mask and you should see it open in the Inspector panel. Drop the arrow next to humanoid and de-select(make red) every bodypart and IK node you DIDN'T want your animation to affect. So in this example, we de-select everything EXCEPT the right arm.
    --- So now if you want to isolate bodyparts, make a seperate mask.

    --- Make a new Animator Controller called "MainControl" and attach it to the model.
    --- Drag your Idle animation into the MainControl and set it to the default state. This is your "Base Layer"
    --- Make sure the Layers tab is selected, click the +. Name the new layer "RightArm"
    --- Click the cog icon next to the layer name, set the weight to 1(or whatever makes sense), select the 'RightArmMask' Avatar Mask from earlier
    --- Set the Blending to 'Additive'
    --- Now with your RightArm Layer, drag in an animation clip of the right arm moving
    --- If everything went well, you should have the idle pose in the base layer and the rightArm animation playing together.
     
    theANMATOR2b and unitygamer9 like this.
  24. unitygamer9

    unitygamer9

    Joined:
    Mar 28, 2017
    Posts:
    16
    Thank you so much for taking your time for writing this. I'll definitely try this.
     
  25. Dreamhammer

    Dreamhammer

    Joined:
    Apr 1, 2017
    Posts:
    8
    You're welcome. I hope it helps you.
     
unityunity