Attaching clothes to a rigged body

Posted on April 29, 2018, 2:33 p.m. by pharah-best-girl • Last updated on Dec. 26, 2022, 7 p.m.

A Blender tutorial on how to attach clothes to a rigged body

Here’s the method I use to attach clothes to a rigged model. The result might not be as polished as I would normally want, but it will be enough to illustrate the point.

There are 2 parts to this process:

  • Fitting the clothes over the body
  • Rigging the clothes

For the sake of the example I will use this Cassie outfit from LordAardvark and my Pharah model. This is a good example of an outfit as it includes both loose fitting and tight fitting items (the jacket and pants respectively) which you might need to approach differently.

Part 1: Fitting the clothes over the body

1.1 Import the clothes

You can use this tutorial to import models from Source FilmMaker.

1.2 Drag the clothes over the body

You’ll most likely get some clipping (like the pants in this case) or poor fitting (like the jacket)

Next, you’ll need to make the clothes fit nicely over the body

1.3 For loose fitting items, edit the mesh and make them fit nicely around the body.

Use the proportional editing mode to make things easier. You should obviously leave a bit of room between the mesh of the jacket and the body, in this case.

1.4 You should end up with a nice fit such as this

This was the easy part, now comes the hard one: attaching a tight fitting piece of clothing. You can obviously do the same as above and manually edit the vertices, but that would be too time consuming, What you should now is use the Shrinkwrap modifier

1.5 Select the pants and create a new Vertex groups

and give it a name, I will call it “fitting” in this example. You’ll need to use this in conjunction with the Shrinkwrap modifier

1.6 With the pants selected add a Shrinkwrap modifier and use the following parameters

  • Target: select the mesh of the body
  • Offset: 0.004 (4 mm basically)
  • Vertex group: the group you created at the previous step (“fitting” in this case)
  • Enable “Keep above surface”

With these options selected it would look like nothing has changed. That’s ok :)

1.7 With the “fitting” vertex group selected, go into Weight paint mode

and start painting around the areas where the pants don’t fit the body

1.8 The end result might not be perfect, but it should be pretty close. That’s okay

You might be tempted to paint the whole mesh red but I would advise against it. Meshes might have details such as small creases or indentations that you would lose (would get flattened) when painted over. That’s why you should paint over as little as possible.

1.9 Add a subdivision surface modifier and place it above the Shrinkwrap one

This should eliminate the last of the overlapping parts.

1.10 The end result should be something like this

When everything looks good you should Apply the Shrinkwrap modifier, otherwise you might run into problems when posing.

Now that your clothes fit nicely over the body, it’s time to rig them.

Part 2: Rigging the clothes

2.1 Select the rig and put it in Object mode

2.2 Select the jacket, and Shift + click the rig.

Then press Ctrl + P to set the rig as parent to the jacket. In the dropdown menu select “Armature Deform (with Empty groups)

2.3 If the Jacket’s position or scale changed, scale and re-position it

Now the jacket is connected to the rig, but it has no vertex (deformation) info.

2.4 Add a DataTransfer modifier to the jacket, with the following options

  • Source object: select the body mesh
  • Check the “Vertex data” option and then
  • Select the Vertex Group(s) button
  • Leave all the other options as they are

Then press the “Generate Data Layers” button. This will copy all the vertex groups from the body. At this point you might as well press the Apply button on the DataTransfer modifier

Now your jacket should be rigged.

2.5 Repeat the steps 2.1 - 2.4 for the pants and the whole outfit should be rigged.

Congratulations. you now have a fully rigged outfit. Give yourself a cookie.

As you might notice the end result is not perfect. This solution is meant to take you like 95% of the way, and the rest 5% will be polishing which you can do by editing the meshes some more, changing the weight painting and so on.

The method above might increase your file size a bit since it adds a lot of unneeded vertex groups on the cloths (such as vertex groups copied from the face). To remove them you can use this script.

Have fun rigging ;)