0
$\begingroup$

I'm having trouble with getting my mesh deformation to work how I'd like it to for clothing. I would assume that this works fine; since it's effectively the same mesh + same weights, but unfortunately it seems to deform differently from the body where the vertices of the sock & body don't exactly line up. (Even after Data Transfer!)

The issue is that I'm trying to make every part of my clothing modular since it's for a game; however I'm struggling to grasp how I'd do that when it comes to two intersecting pieces of clothing. As an example; wearing the sock in my picture with pants on. My first thought when doing this is to just simply remove the mesh underneath, but then I realize that if I do that; I'd need to remove the sock too since that would have the same deformation issue. Meaning I'd need to make a mesh of every single combination of clothing; which sounds like that's probably the wrong way to approach this.

If anyone has dealt with this issue before; I'd really appreciate some advice on where to go from where I currently am. Thank you!

enter image description here

$\endgroup$
1

1 Answer 1

0
$\begingroup$

It seems like identical weights would be right-- but unfortunately, they're not, because how a bone deforms a mesh isn't just a function of the weights, but of the distance from the bone to each vertex as well. And your sock is more distant from the bone than your leg. That requires weights that are more diffuse the more distant the mesh is.

There are a couple of ways to get those more diffuse weights. If you weighted your leg via autoweights, the slightly more diffuse weights you want can also be gotten via autoweights, just via autoweights on a slightly larger model. Duplicate your model, alt s shrink/fatten until it's about the same size as your sock, and then reparent it to your mesh with autoweights. Take a second to compare weights-- notice how the bigger mesh has different weights than the smaller mesh? Weights that are smoother, more spread out. You can use this mesh as the target of a data transfer for your sock to transfer the more diffuse weights onto the sock.

If you weren't using autoweights, you can use a smooth operation in weight paint mode to make your sock's existing weights more diffuse. Set it to affect all groups and give it a positive expand/contract value, then tune the other parameters to eye.

However, the truth is that you're best off hiding mesh rather than fiddling too hard with weights. That's especially true when you're talking about a game engine, where you probably have a limited number of weights per vertex. In that case, think about breaking your sock (and leg) into multiple pieces: those that might be hidden by pants, and those that won't be hidden by pants. It's still modular, it just requires fiddling with a few more parts and combinations. Or, consider giving the meshes shapekeys that shrink parts of the mesh, to be used only in certain combinations of clothing.

In Blender, there are other techniques you can use as well, like post-armature displacement or shrinkwrap.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .