Search Unity

Maya skin weights different in Unity

Discussion in 'Formats & External Tools' started by blue2fox, Apr 1, 2009.

  1. blue2fox

    blue2fox

    Joined:
    Jun 8, 2008
    Posts:
    91
    Hi. I've imported my character from Maya to Unity, as a .mb file. The file contains the character's mesh, rigged, and all the character's armour rigged to the same skeleton as well. All the animation works perfectly fine, but some of the character's skin weights on it's armour aren't the same as when they are in Maya. Bellow are two images, one from Maya and the other from Unity.



    As you can see, the shoulder armour in Unity is stretched. I've already deleted all non-deformer history in Maya, but the problem remains. If you know what I did wrong, please help. Thank you.
     
  2. blue2fox

    blue2fox

    Joined:
    Jun 8, 2008
    Posts:
    91
    I'm not sure if I'm correct or not, but it seems that in Unity, the vertex will be bound to the joint with the highest skin weight value. Apparently Unity doesn't allow vertex weights to be shared between different joints. I could be wrong though.
     
  3. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    The default in Unity is 2 bones per vertex max... try increasing this to 4 in "Edit/Project Settings/Quality" by changing the Blend Weights to 4 in the Quality Settings Inspector.
     
    valdeezzee and DarkMage88 like this.
  4. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    Hey man! Not sure if it helps, but you can adjust the quality of the weighting in the Quality settings:


    Edit: *ugh*.. aNTeNNa trEE beat me! :D
     

    Attached Files:

  5. blue2fox

    blue2fox

    Joined:
    Jun 8, 2008
    Posts:
    91
    You're right, having 4 bones fixes the problem, haha. I had my game set to Fastest in Editor mode and that's why it was all weird. Thanks guys.
     
  6. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
    can make 4 bones to 8 bones with a Script and how ?
     
  7. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
    how make blend weights up 4 bones unity 3d
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    4 bones work automatically through using the right quality level or changing the quality settings as shown above.
    More than 4 weights is not possible
     
  9. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
    Thank you for answer





    with 4 bones
     

    Attached Files:

    Last edited: Dec 19, 2011
  10. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Random question : do you clean history in maya before to do an export?
     
  11. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
  12. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
    In the new version of the unity I hope to solve this problem and make the bones more than 4

    Because I do not want to leave unity
     
  13. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    4 bones per vertex is a lot. A lot of engines get away with only 2, a lot of great games were made with 1 (rigid). Out of curiosity, why would you need more than 4?

    What would be nice to see in Unity is the ability drop/add bones and redistribute weights (by proper percentage) based on an LOD system -- distance from camera, etc. Even with that, I see no reason to go above 4 bones per vertex.
     
  14. love

    love

    Joined:
    Dec 14, 2011
    Posts:
    16
    Yes you're right

    I have researched and tried to do that, but I could not

    how make if hold button ("h"))

    I do something is
    I have researched and tried to do that, but I could not

    I need that
     
  15. MarceloCosta_GamesBR

    MarceloCosta_GamesBR

    Joined:
    Jul 29, 2014
    Posts:
    7
    you saved me thanks
     
  16. yakuphan

    yakuphan

    Joined:
    Sep 17, 2017
    Posts:
    3
    Unbelievable. This post from 13 years ago saved my project lol
     
    Last edited: Sep 28, 2022
    sama-van likes this.