Search Unity

Character Animations in Unity

Discussion in 'Scripting' started by Velketor, Oct 26, 2007.

  1. Velketor

    Velketor

    Joined:
    Sep 15, 2007
    Posts:
    110
    Hello,

    So I have a character that I built in Maya, fully rigged and keyframed to do a walk cycle. I looked at the "Third Person Player" example project on the Unity website and it looks like it should be easy to add the animation to Unity...my question is:

    Do I need to import the .obj file of my character into Unity and then add the .mb (Maya file) to the assets folder so that it updates my .obj with the keyframed animation?...or am I going in the completely wrong direction?

    Any information would help more than you believe =)

    Thank you!

    --Velk
     
  2. Omar Rojo

    Omar Rojo

    Joined:
    Jan 4, 2007
    Posts:
    494
    Just add to the assets your maya file with the animation and then to tweak it, right click on it the the project view inside unity and choose Import Settings.

    .ORG
     
  3. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    I dont think the .obj format supports animation, so keep things in the .ma or .mb format...
    HTH
    AC
     
  4. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    I've been curious about this workflow myself (don't mean to hijack the thread - I think this is really relevant, I promise)....

    So, if you plan to have your character say, walk, run, and jump; and you plan to do this in a 3rd person game, do you create all of these cycles in separate .mb files? Or do you put them all in the same file. If they are all in the same file, how do you let Unity know where one ends and the next one begins.
     
  5. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    You can have then all in one file and break them up in the import settings.

    The downside is if one thing breaks, the whole thing wont work I found turning off a mesh renderer stopped all animations from working, and in that case it was more efficent to import each animation seperately. So while it seems more efficent, thats not always the case. I will break things into seperate files to avoid this in the future.

    AC
     
  6. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    Cool. As always, thanks for the advice.
     
  7. Velketor

    Velketor

    Joined:
    Sep 15, 2007
    Posts:
    110
    Thanks for the information everyone...I'll try that out tonight. =)

    --Velk