Search Unity

The models doesn't "accept" the animation

Discussion in 'Animation' started by thiagodalbo, Sep 25, 2017.

  1. thiagodalbo

    thiagodalbo

    Joined:
    Sep 25, 2017
    Posts:
    3
    Hi. I am not the most proficient with either tools, but I am struggling to use a model I animated, rigged and modeled myself in MayaLT to export to Unity.

    I have managed to make it work before, but since then I made a few changes to my model and now it doesn't work anymore.

    I attached a few screenshots of the problem, where you can see the animation working on the Default Unity Model, on my old model, how his humanoid rig works and then how my own model only moves it's root on the animation and how his rig looks messed up (it doesn't even deforms to the T pose).

    Can anyone tell what I am doing wrong?
     

    Attached Files:

  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Simple answer - The rig is no longer conforming to the humanoid rig structure, and you are moving beyond the basics of mecanim into more advanced features that require additional knowledge about the system, and require r&d to set up your specific character how you need it to be.

    Unless you NEED the humanoid rig for retargeting, IK or mirroring I would suggest to use the generic rig set up instead. It's just easier.
    However if you NEED humanoid rig for one of the above mentioned requirements - you'll need to create proper avatars for your character and the animations you will be using, and proper avatar masks to allow for the animations of the weapon to work also. This will also require some animation layers and layer masks to get the setup you need.
    Start with those topics for research and testing. Research those topics in the animation training material, in the documentation and other sources. Since each character eventually is setup a little bit different only you will be able to solve the issues you face with the character setup you have by performing research and testing.
     
  3. thiagodalbo

    thiagodalbo

    Joined:
    Sep 25, 2017
    Posts:
    3
    Hello, theANMATOR2b!
    Thanks a lot of answearing, I apreciate it.

    It is very strange that the Generic Rig for the model and the animation won't work. While with the humanoid it would at least move it's 'Point Of Gravity', even slightly. On generic it won't do anything at all.

    I have made some tests and I believe that when I export the model to FBX, the geometry just won't come skinned to the joints, and not even the actual anymation work. I have tried exporting the model with animation to FBX and then back to Maya, and that's when I found that out.

    The first image is the model actually moving, and the other is when I exported it back to Maya and it is 'broken' and no bone moves, except for the bone I used for the gun (the pink one) that goes up and down slightly, as intended on the animation, but everything else is still.

    image1.png

    Strangely enough, I have tried exporting only the bones and the animation, so I can use put only my animation on Unity. And it works! the animations are all there on the Unity project, waiting for the model, but when I do use my model it doesn't work.

    Questions:
    Are there any requirements for exporting an FBX that I need to know of when I intent to use it on unity?
    Exporting the nurb controllers as well (not shown on the picture) doesn't matter for Unity, right?
    By the way, is it ok to use a few more bones then the Humanoid rig from Unity requires? I would like to put some bones on his hair to make it move as he walks.

    Once again, thanks for answearing.
     
  4. thiagodalbo

    thiagodalbo

    Joined:
    Sep 25, 2017
    Posts:
    3
    Hey, I managed to solve it!

    What was happening was that I didn't bake the joints in to the animation.
    After I did that, everything worked just fine.
    The Animation was there, the geometry was skinned to the joints and I still don't why the constraints are gone even though I have the export "constraint" option on.

    export options.png

    Thanks a lot.
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I was going to say - this is a Maya specific issue and I can't help because I'm a Max animator, but I'm glad you found the solution.
    Are constraints helper objects in Maya that controls the bone movement or something else - maybe pointers where the knees and elbows point towards? The only thing that is needed for the engine are the bones and the mesh exclusively - everything else is just added data to the fbx file, so you don't need it in engine.