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

Character studio and Mechanim

Discussion in 'Animation' started by lloyd22, Oct 5, 2013.

  1. lloyd22

    lloyd22

    Joined:
    Oct 27, 2010
    Posts:
    117
    Hello,
    I haven't used Mechanim before, but I was wondering if I have a character studio biped with the run, walk and jump etc animations made without forward motion, is it possible to use the Mechanim setup in Unity? Any advice how to convert my loop animations would be very useful, thanks in advance.

    Lloyd
     
  2. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
  3. lloyd22

    lloyd22

    Joined:
    Oct 27, 2010
    Posts:
    117
    Ok, I'll have a look thanks.
     
  4. lloyd22

    lloyd22

    Joined:
    Oct 27, 2010
    Posts:
    117
    So no one has made a max biped to mechanim tutorial? It's not that clear to me how to make it work from that video which uses the mechanim biped setup.
     
  5. lloyd22

    lloyd22

    Joined:
    Oct 27, 2010
    Posts:
    117
    Perhaps someone who has done this could pass on the workflow, or the basic steps for importing the max biped and the coding involved?
     
  6. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    ok.. sorry I was feeling ill yesterday and stayed on the couch all day watching stupid movies and passing out.
    The whole thing with mecanim is the ability to use animations from one character to another. They can be part of the character file or they can be just the animation files. I have taken characters from different people and sources and have applied the same animations to them. I have taken a max, blender, Mixamo character and have taken the animations done from the Unity tutorial video and applied to these all.
    I am not sure what you are doing. You need to import the character to Unity as a fbx. With the imported FBX file loaded, you select the Rig tab. Set it to Animation Type: Humanoid.
    $Unity-Mecanim 1.png

    You need to create a Avatar from this model.
    $ConfigureModel-1.png

    Should have all the bones correctly configured and GREEN dots are good. I usually just do for Mapping - AutoMap and for Pose - Enforce T-Pose. Click Apply and click Done.

    That is it for a model with no animations in the fbx file. From this point on I can drag the model into my scene. Make sure it has a Animator component on it. Write a Animator Controller and go.

    If you can't take your model and import it into Unity's tutorial, then something is wrong. You should understand from that video how to take a character fbx, get it into Unity configured correctly and write a simple controller. Heck you can even just have the controller be as simple to start off as just having the idle in there and run it and see. Then build up from there.

    As far as a tutorial explaining this step by step. You have it already and watched it. There are no videos hand holding how to do this process from a specific application to Unity. Unless you find one on YouTube, there are none that I know of.

    If you need some more help, PM me and I'll see about helping you out as much as I can.
     
  7. Jax_Cavalera

    Jax_Cavalera

    Joined:
    Jul 22, 2013
    Posts:
    44
    There is an animation kit that I have released which lets you work between Blender and Unity. It comes with a detailed video guide that step by step shows you how to not only create animations but also how to export them and it even covers a quick run-down of re-targeting the animation created in Blender to another Mecanim compatible character.

    http://forum.unity3d.com/threads/203298-Mecanim-Humanoid-Animation-Kit

    If you prefer working in Max, there may also be other tutorials on youtube that cover a workflow for you with that software, though as Archania says, and I would currently agree, I haven't come across anything that goes into great detail on how to achieve this, not to say that there is definitely nothing out there.. I'm just not yet aware of it. Anyways, Just thought I'd mention this in case the Kit I've produced is of use to you.
     
  8. lloyd22

    lloyd22

    Joined:
    Oct 27, 2010
    Posts:
    117
    Thanks, I'll see if I can get the animated character I have imported. The main problem was I animated it in place and the coder needed the forward movement, and the approach I used wouldn't loop correctly.
     
  9. Jax_Cavalera

    Jax_Cavalera

    Joined:
    Jul 22, 2013
    Posts:
    44
    Hmm, you should be able to code in forward movement along a specific vector. The only downside to that would be the animation and movement speed need to be synchronized to look right. Then again, it may not be too much extra work if you have the facilities to do so, to bring it back into Max and add a keyframe for start and end that translates the entire rig's position an appropriate distance to the speed so it's part of the animation.

    I'm finding it more difficult currently working with animations that translate along either X or Z axis but I guess everyone has a different approach which is what produces so many unique games.

    Normally unless there is a large miss-match in the sequence, you can get the animation to loop up.. unless it's a problem with the arms not looping in the same positions or the wrong foot being in the wrong place, Hopefully in the future you will be able to mask specific bones and mirror selected bones or parent and child linked bones.

    Will help a lot to fix up minor problems, well that and the ability to reverse an animation sequence.