Search Unity

Howto create a NEW animation for a generic character? (newbie question)

Discussion in 'Animation' started by Napoleonite, Mar 18, 2015.

  1. Napoleonite

    Napoleonite

    Joined:
    Mar 15, 2015
    Posts:
    30
    I followed (among others) these lessons: http://unity3d.com/learn/tutorials/modules/beginner/animation

    They show how to animate a camera. But I'd like to give Ethan a new (simple) animation where he is mining. So I basically just have to rotate some of his spine & arm joints to make it work for now.
    Every time I Google or YouTube it, they only show me how to attach existing animations to the model but they never show me how to make a new (skeletal?) animation from scratch and then use that one for the player.

    I know how to create the animator controller & animation. But what do I attach them to? And what avatar? I can't duplicate Ethans Avatars (not supported by Unity) so it must be done how? And how do I do that in such a way that it will still work if I replace Ethan with the real model (same bone structure) later?
    Is there a tutorial for that or do I really have to use an external program like Blender for that? And if so, how do I ensure that this animation can also be applied to the real model later? As in, what FBX do I have to export from Unity so I can alter it in Blender and it will work with other humanoids as well.

    I also tried searching for an existing animation in the Asset Store. The asset store has no "advanced search" that I could find. Like I can't search only in the animations section and most assets are labeled like "animation pack" and you have to open each one and search manually for the animation that you're looking for. Because searching for "mining" will only display the results I don't want (like shovels, models, 2D, but no animations) :/. Am I stupid or how do I use the asset store properly :/
    But anyway, I couldn't find such animations here.
     
  2. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56
    This tutorial should help.



    No. This isn't my tut. I just know it taught me everything I know and is very helpful.
     
    lgmbits and Napoleonite like this.
  3. Napoleonite

    Napoleonite

    Joined:
    Mar 15, 2015
    Posts:
    30
    Good video. But again, it shows everything except that what I'm interest in. Namely, how to create a new animation. NOT how to use an existing animation and just attach that.

    Okay maybe I wasn't clear: I have an fbx file and no animations whatsoever. Imagine I have to tell Unity how the player should walk in his walking-animation. I must first create a new animation (Window > Animation (ctrl+6)) right?


    Example :

    http://s14.postimg.org/nyn9ogx0x/animation.png

    Here you can see that the IdleAnimation is build out of keyframes. But it only shows me the IdleAnimation (default animation) for the character. I don't know how to:
    1. Create a new animation and edit it through the animation-window. Like moving his arms.
    2. Make sure that it also works for other humanoid models with 'generic humanoid rigs'.
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    You cannot create a Humanoid animation in Unity, you need to use a authoring tool like 3ds max, blender or maya.

    You can create a Generic animation in Unity but for more complex setup like a character you will have a hard time doing it.

    Keep in mind that Unity is a game engine first, we do have some tools to help you create basic animation like a door opening, but for more complex setup like animating a Character you should use a tool build for this.
     
    theANMATOR2b, Jself and Napoleonite like this.
  5. bhgznpuu

    bhgznpuu

    Joined:
    Nov 20, 2015
    Posts:
    1
    Hi, I was looking for the answer to the same question:
    They show how to animate a camera. But I'd like to give Ethan a new (simple) animation where he is mining. So I basically just have to rotate some of his spine & arm joints to make it work for now.

    The unity dev said:
    You can create a Generic animation in Unity...

    Well, she/he is correct, but "the devil's in the details":
    1. Import your FBX model to unity like normal.
    2. Do NOT rig it as Humanoid. Instead rig it as Generic. (TOOK ME FOREVER TO FIGURE THIS OUT :( )
    3. Now, drag your model into your scene.
    4. Click on the model in the hierarchy, then go to WINDOW->ANIMATION.
    5. Now, click ADD PROPERTY and drill down to the head, arm, spine, whatever you want to animate.
    6. At this point, just follow any other tutorial on how to animate a camera flyby, a door opening, etc.
    Notes:
    Animations you create in Unity are called Generic Animations, and can only be applied to Generic-rigged models, not one's rigged as Humanoid. That's a bit confusing, because you might think that all Human looking models MUST be rigged as humanoid -- that's only true if you are importing other animations outside Unity.

    Now the Unity Dev is correct that you wouldn't want to try to do full human-like animation like walking, or jumping, --> it would take probably days to painfully set the thousands of keyframes, but for a simple hand wave, or eye wink, this would do the job.

    I want to also note that as of Unity 5.1, you can't mix Generic animations with Humanoid ones.
     
    Last edited: Nov 20, 2015