Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

3d model character shifts but does not animate (mecanim)

Discussion in 'Animation' started by dshillady, Apr 6, 2014.

  1. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    I'm having trouble getting a 3d model character to animate correctly with mecanim.

    I've searched the forums, the answers archives, and the Unity documentation for a solution, but I can't find any.

    Here's what's going on:

    When using animations from other mecanim-compatible characters (it has none of its own), this character shifts around according to the changing of location of the animations (such as moving forward for a walk-animation), but it remains in its default stance the entire time, e.g. it remains in its A-pose throughout, no matter what the animation.

    The character is indeed rigged, and it's in FBX format.

    The rig fits the mecanim avatar requirements perfectly, or so it seems--the avatar's bone mappings are all green, and looking at the rig during the avatar setup it appears to make complete sense.

    I can't successfully enforce a T-pose in the avatar setup, however, if this information helps.

    I'm using Unity 4.3 free-version on a PC.

    Am I doing something incorrectly? Is there a problem or inconsistency with the rig? Is the character not skinned properly? Or is there some other issue?

    I can give more information, if requested.

    If it's a simple problem, then helping me would be a simple matter, no? And if there's a complicated problem, then could you at least just give me a link to learn more or somehow else point me in the right direction?

    Please help me.

    -Doug
     
    Last edited: Apr 7, 2014
  2. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Can anyone help me?

    Is this something I should be able to figure out on my own? If so, just give me a link to where I can find help.

    Please?
     
  3. TheCCJ

    TheCCJ

    Joined:
    May 2, 2013
    Posts:
    70
    Without seeing everything up close and personal, it sounds like your rigs don't match, as far as joint names go, except for the pelvis/hips/root/whatever is making the character shift. This would theoretically cause that one bone to use the animation information from the matching bone, and all the others would ignore it because the names don't match, and it doesn't know what to do with the info, so it just ignores it. Result: no animation on the unmatched nodes.

    Again, this is a wild guess as to what's going on without having the different FBXs to look at, but having seen similar stuff before, it's a place to start.
     
  4. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Thank you sooooo much for your response, TheCCJ. I was afraid this thread would be ignored.

    The rigs might be different, as you said. However, I was under the impression that the Avatar setup/mapping in Mecanim was general enough that the rigs wouldn't have to match exactly. Isn't that one of the points and features that's attractive about Mecanim? (Although, being a newcomer to Unity, I could be very wrong.)

    Would this prevent the T-pose from working properly, too?

    So do Mecanim animations only work cross-character if the rigs are identical? Does that mean if I were to buy online 3d model characters and/or animations, there would be no guarantee that they would be compatible with other assets?

    Bummer. :(

    But thank you again, TheCCJ, for your help. I'll look more into the situation.
     
  5. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Here is some more information:

    I was originally using the provided .fbx file, but I took the .3ds file version of this model (I downloaded it from TurboSquid--they provide multiple file formats), and opened it in Blender 2.7. (Alas, I don't have 3ds Max, or else I would have worked directly with the .max file.)

    This removed the bones and their structure, leaving only the mesh and materials, etc.

    I then used Blender's Rigify and rigged the model, from scratch, to the best of my ability. Using tutorials on the web and hours of tedious tries/retries, I got the rig to look not-too-shabby-- maybe not professional, but acceptable.

    When I imported it into Unity, the animations played on the model.

    Disappointingly, however, the quality was lousy. There were multiple "gaps" between body parts where light shined through, and the legs moved like big, rectangular bricks.

    I don't have enough knowledge to figure out if this low-quality behavior was due to my rigging or whether it was just not a good model to start with.

    And I have no way to try the original .max file submitted by the artist to see how it performs.

    So I am left to hope that there is some simple "setting" or something that can be changed to allow the use of the .fbx file with its original rigging, to find out. (And the original .fbx file won't import into Blender because the version numbers don't match.)

    Does anyone have any advice? I would very much appreciate it.

    Thanks again.
     
  6. OllyNicholson

    OllyNicholson

    Unity Technologies

    Joined:
    Jun 17, 2011
    Posts:
    142
    Rigging, Skinning and Animating a model (especially in free packages) can be somewhat of a black art, that's to say that many iteration loops (and learning loops) must be gone through to achieve the desired quality standard when creating everything from scratch. The main issue it sounds like you are having seems to be skinning, which can be the most arduous and unforgiving of processes to get right, suffice to say you either have to become a skin weight painting guru in blender/your 3D package of choice or use some of the advanced autodesk built in tools.

    There are a bunch of other tools out there to help externally also. For rigging and skinning Mixamo Autorigger does a pretty good job, there can be an upfront cost but the results are very fast and pretty good. For the Unity Mecanim setup look no further than the superb sample assets in order to have your humanoid rig set up, There's a Character to player tutorial to be posted on the Unity Blog soon, but in the mean time download these :

    https://www.assetstore.unity3d.com/#/content/14474

    And check out how the character is set up, and you can even replace the child node Ethan with your own to create a player character real quick. Also have a look at the other docs here:

    http://docs.unity3d.com/Documentation/Manual/Preparingacharacterfromscratch.html

    Good luck and have fun!
     
  7. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Thank you very, very, very much, OllyNicholson.

    So the poor performance of the model with my rig might be due to a skinning problem?

    That makes some sense, because I skipped the custom skinning step with Blender and just rigged the model with default "weightings."

    (I didn't understand the "skinning" concept until now.)

    I wonder, could the original problem of the character shifting without animating be caused by a problem with its skinning?

    According to the description on the sales webpage, it was originally created in 3ds Max 2010. Maybe the skinning didn't port over well (or at all) to the exported .fbx file?

    Would a rigged model animate if it had no skinning at all?

    Maybe I'll never know for sure, but at least it's a somewhat sensible theory, and now I have something I can wrap my mind around.

    Anyways, even though you might think that you only provided a little bit of information, you actually helped me out a lot!

    I will look into "auto-skinners", online tutorials, Mixamo, and some of your other suggestions, and see what I can learn.

    Many thanks again!
     
  8. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    OllyNicholson, or anyone else who can/wants to help, where can I learn how to do this? Is it really that easy?

    Thanks as always!
     
  9. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Skinned models should work pretty fast in Unity. There are certainly exceptions. E.g. if you see constantly new messages being added to the console, they will heavily slow down the performance. If your model has a huge amount of vertices, it may also have a negative impact. And there are certainly many more factors that can have negative performance impacts.

    Yes.

    No, at least there wouldn't be bending and the like.
     
  10. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Thank you too, very, very much, Dantus.

    When I used the term "performance" in my above post, I was referring to the quality of the animation, not necessarily the speed.

    But you did in fact finally answer my original question about what caused the 3d model to shift but not animate--there was an issue with the way the skinning ported over from the artist's original file format.

    Thank you sooooooooo much!!

    Now I can move on, try out some more things, and continue to learn.

    Thank you all very much, again!
     
  11. OllyNicholson

    OllyNicholson

    Unity Technologies

    Joined:
    Jun 17, 2011
    Posts:
    142
  12. dshillady

    dshillady

    Joined:
    Mar 28, 2014
    Posts:
    19
    Thank you!!