Cloth on Skinned Character

by Rebecca Carlson


Project Overview

For this project, I combined character skinning with physics-based cloth simulation, both of which I had already done in previous projects. The cloth is simulated by determining with a matrix of particles which are attached with springs. The individual positions and velocities of particles are calculated with sparse matrices using gravity, collisions with other particles, and the stiffness of the springs. The character skinning is performed by recalculating the character's vertex positions every frame to correspond with the movement of identified bones. The skinned character, Big Vegas, and his animations were found on mixamo.com.

The code was written in C++ and built with Visual Studio 2019. I also used OpenGL for the animation and Maya to work with the character files.

There were two main tasks I needed to do to accomplish this:

  • Fix the cloth to set points on the skinned character
  • Create collisions between the cloth and the skinned character

Fixing Cloth Points

I wanted to fix my cloth to set points along the character's shoulders to create a cape. To do this I opened the .obj file for the character in Maya and individually identified seven vertices that I wanted to fix the cape to. If the cloth being fixed to the shoulders had more than seven columns of particles, I interpolated additional points between the specified vertices.


Character Collisions

To simulate the cloth's collisions against the character, I used spheres to approximate the character's body. I found the vertices where I wanted my spheres to approximately be located, and I found each of their respective positions in the buffer of coordinates I had for the character. Each frame, I use the new skinned coordinates to approximate the new locations of the spheres.


Final Product

Finally, I added a horizontal force in the z-direction to simulate wind, so that the cloth didn't simply get wrapped around the character every time it moved. I also made the cloth fairly heavy to compensate for this.

Here's a demo with a few different animations!


Future Work

For future work on this project, I would need to figure out a way to do self-collisons for the cloth, because right now as you can see in the gifs the cloth just goes right through itself when it overlaps. I would also find more precise approximations for the character (more spheres, or modifying existing spheres to be ellipses).