Search Unity

Blender to Unity5, bones move without mesh

Discussion in 'Asset Importing & Exporting' started by AkiLap, Jun 21, 2016.

  1. AkiLap

    AkiLap

    Joined:
    Sep 14, 2014
    Posts:
    24
    I tried following the tutorial based on this video:

    In video he uses Max but I made the model in Blender.


    In Blender, I used automatic weights for bones and tested that when I move a bone the mesh moves with it.
    Now in Unity5, I added Rigidbody, collider and Hingejoint to all bones, connected childs to their direct parents.

    This is how the bones are separated from mesh:
    https://gfycat.com/SplendidColdBlackfly

    How to solve this so the mesh follows the movement of bones?

    EDIT: Worth noting I didn't add any animations in Blender, and when I imported in Unity I disabled animations and want to only use the physics directly.
     
    Last edited: Jun 21, 2016
  2. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Blender's FBX exporter (which is also used behind the scenes by Unity if you import .blend directly) is a bit moody. As far as I know it needs:
    • The Armature
    • At least one mesh with a vertex group matching a bone name
    • At least one animation clip involving one or more of your Armature's bones.
    Or it won't export a working skinned mesh.

    Also, it's possible that Unity's importer has is similarly picky. Maybe start with both 'Rig' and 'Animation' enabled, too, check that it works, then selectively disable things until it breaks :)
     
  3. AkiLap

    AkiLap

    Joined:
    Sep 14, 2014
    Posts:
    24
    Thanks! It was indeed the rig I had disabled in Unity, setting it to Generic solved the problem. So simple and I thought I had checked it couple of times, oh well :)