Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Clothes deforming badly when moving bones in pose mode

Discussion in 'Formats & External Tools' started by Paulprog16, Nov 25, 2016.

  1. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Hello guys,

    I have looked everywhere for a solution to this and I could barely find any information on it.

    I have a Makehuman mesh with some native MH clothing on it. As the shorts are too short, I had to make them longer. The problem is, after doing that, moving the legs totally deforms the shorts. I tried parenting with automatic weights, but it doesn't work.

    Any ideas on how to approach this issue? o_O
     
  2. mariusz

    mariusz

    Joined:
    Nov 5, 2010
    Posts:
    72
    I don't know how it looks, but if you moved/edited cloth mesh, maybe you should repaint weights for bones affecting them...
     
  3. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Thanks for your reply mariusz.

    Yes, I've done that. I'm even trying right now with the "empty weights" option, moving weights around manually, but I can't get it too work. I mean, if I add weight on a part of the shorts, it gets torn off somewhere else and viceversa...
     
  4. _GimbalLock_

    _GimbalLock_

    Joined:
    Feb 26, 2013
    Posts:
    137
    What tool are you doing weighting in, Blender? Been awhile since I weight painted in there. I think by default the Wright brush doesn't normalize. So even if you set the full Wright value to 1, old influences still affect deformation. Check to see under the toll properties that's its set to normalize.
     
  5. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    I would like to see how you "lengthened" the shorts. Did you just grab the bottom edge loop and extrude, or did you as some smooth geometry? If you don't have smooth geometry, that would also be the problem. Armature/Bone animation can't bend polys, because it only moves verts around, so anywhere you want a bend due to bones, like the elbow and shoulder, and wherever shorts bend, needs to have a few extra loops to account for that. I don't know if that is your problem but it is a novice mistake so I wanted to throw it out there.
     
  6. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Hey guys.

    @_GimbalLock_ Yes, I'm using Blender.

    @kburkhart84 I have been using Blender for less than a year, so I must be making many novice mistakes. In this case, what I did to lengthen was just alt select the last ring of each "cuff" and just moved it down with G (so I think I didn't even extrude).

    Do you think adding edge loops in between should be enough to fix this?
     
  7. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    I would say it for sure would help your problem. On the other hand, depending on the location of the bones, you may still need to do some weighting even after you make the proper loops.
     
  8. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Thanks for your reply.

    Unfortunately, it barely made any difference, if at all. Should I use automatic weights or should I try some other technique?
     
  9. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    For this one, I would just directly do the weight painting. Automatically doing things can come in handy when things are more complex, but since you are only adding some more verts to some of the bones, you may be better off just painting them directly. I would suggest you find a quick tutorial on the subject.
     
  10. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Alright, just in case someone is having the same or a similar problem, I was able to partially fix it by hiding the part of the mesh underneath the clothes by means of the mask modifier. After doing this, I can move the bones around in pose mode and no holes appear at all.

    Now, I say partially because I still have one issue to solve, which is the t-shirt getting torn off by the shorts whenever I move the leg bones. So I need to find a way so that the shorts and t-shirt don't bother each other.

    Any solution for this one? o_O
     
  11. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Yeah, about the first issue, I would just delete the verts under the clothes, they shouldn't be seen anyway. Also, I'm not sure if the mask modifier will get exported properly. Some modifiers apply and work fine, but others don't work so well, so make sure you test that in Unity before you count on it as a solution.

    The other issue...The shirt and shorts have to be two separate pieces of geometry. And they can't be attached/weighted to the same bone. So moving the leg bone shouldn't move the shirt because the shirt should be weighted to bones in the spine area, while the shorts should be weighted to the leg bones.
     
  12. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Thanks for your reply.

    I'll take the mask modifier thing into account.

    About the second issue, unfortunately, that doesn't really help, because if the t-shirt doesn't move when the leg and shorts move, then the shorts take up the space of the shirt, "tearing it off", so to speak. In real life, when you move your leg, your t-shirt "accompanies" the shorts' movement, it doesn't just remain still.
     
  13. mariusz

    mariusz

    Joined:
    Nov 5, 2010
    Posts:
    72
    It's hard to imagine - can you maybe post some screenshots or blend scene ? will be easier to help.
     
    _GimbalLock_ likes this.
  14. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Well, for the most part, if you move the legs(not the hips/pelvis) the top of the shorts don't move. If they are moving, then they are not likely very well weighted. Take a look at yourself when you walk...does the top of your shorts move? There should be a bone in the midsection representing the midsection itself, the part that doesn't rotate with the legs or arms, but maybe it sways a little in the hips when walking. Then attached to that bone you could split off into the legs. The top section of the shorts would be attached to the hip bone, and the bottom would be attached to the leg/knee bones.
     
  15. Paulprog16

    Paulprog16

    Joined:
    Apr 20, 2016
    Posts:
    54
    Hey guys, thanks for your replies.

    I finally fixed it by just pulling up the t-shirt a little bit. That way, when I move or rotate the legs, they have no influence on the t-shirt anymore. The other thing I did was remove all the mesh body parts that are under the clothes, just like kburk suggested.

    I hope I've done the right thing. So far, so good.