Search Unity

Standard skeleton for 3d models?

Discussion in 'General Discussion' started by enzoravo, Sep 1, 2020.

  1. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    hi, as the title shows, i'm wondering if there is any standard skeleton to rig a character for unity ?

    how i can be sure if my character will be compatible with an animation pack from the asset store ? is there any standard skeleton for unity that we need to use ? or there is another way to make characters compatibles with all the animations pack from the asset store ?

    thanks in advance for all the help.
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    The mecanim retargetting system is actually fairly flexible (within the limited realm of 2-arm, 2-leg humanoids). For your rig to be compatible, you just need to have the necessary set of bones.
    See the diagram here:
    https://docs.unity3d.com/Manual/AvatarCreationandSetup.html
    Each of the big dots is one of the bones that mecanim requires. Some, like the toes and one of the back bones, are optional (you can tell because of the dashed outline) but it works better if you have them.

    See this also:
    https://docs.unity3d.com/Manual/UsingHumanoidChars.html
     
    cosmiK777, JohnnyRic and enzoravo like this.
  3. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    thank you very much for the information @kdgalla
     
  4. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    You can use the Maya HumanIK skeleton to easily rig a character and work with mecanim with no problems. That's probably the easiest method I'm aware of.
     
    enzoravo likes this.
  5. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
  6. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I've been using Blender's Rigify rig which works great with Mecanim. Although, I haven't tried using third-party animations, but I wouldn't imagine them being much of a problem.
     
  7. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    aer0ace and enzoravo like this.
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    Nope.

    However, there is standard bone topology for models that are supposed to work with mecanim.
    https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

    Mecanim-compatible rig should have two-segmented spine, one-segmented neck, head bone, leg and arm bones without twist bones, and may optionally have bones for eyes, jaw, and fingers.

    Compatbility with asset store is ensured by setting up the model for mecnaim during import in your project..
    ----------
    Unless something changed, blender's rigify doesn't work well with mecanim. It produces two-segmented bones, twist bones, and so on. And bazillion widget bones.
     
    enzoravo likes this.
  9. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    @neginfinity thank you for the explanation, very useful
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    In general, the male and female models that are free in the asset store are mecanim compatible, and thus all mecanim animations should work on them.

    So download some free models, some free animations for mecanim humanoid, and try them out.
     
  11. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I use the Rigify to Unity asset which at least cleans up the bazillion widget bones. I'm not sure if it cleans up the two-segmented bones and twist bones though. Rigify and Rigify to Unity worked great for my previous app, though I've started using Animancer for my current project.
     
  12. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    See, that's the reason why I say that rigify doesn't work well with unty. Said asset performs destructive modification of the skeleton upon import, and if you just drop FBX into the scene, there will be trouble and it won't be processed properly.

    Unfortunately, Rigify developers are a bit on a stubborn side, and could've addressed that by adding a "Gamedev skeleton" template to their project, but apparently they aren't really interested.

    Another user suggested "Auto Rig Pro" for blender instead of rigify (I think it was "GameDevCouple"? Did they change the nickname? It doesn't show up), but I haven't tried it myself.
     
    aer0ace likes this.
  13. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I suppose my rigging requirements aren't as strict as some others may have, as it's working just fine for my needs.

    I'm not too worried about the destructive process, as I store the source .blend file in source control, and my art build pipeline scripts pre-process the FBX file, and I have another Unity postprocessor doing more ancillary work for final import, all automated. Not everyone will have that set up, so yeah, it can be a hassle.

    It may be a little frustrating, but it's at least a viable solution for Blender users. When other solutions require a subscription, at least there's this solution.