Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to collide the cloth with the character?
#1
I want to have a loose skirt hanging from the waist of a character, and I want the animation of the character, especially the legs, to move the skirt from the inside.

It is not necessary for this to work in real time, as I will export the resulting animation for later playback in real time.

So I tried Option 1, which is to put an Obi Cloth in the skirt mesh, which locks the triangles in the waist very well, but I can't seem to correctly remove the bone influences so the rest of the cloth can move completely independent of the bones.

Then I tried Option 2, which is to have a non skinned mesh of just the skirt, as a child of the character pelvis. I then pin the vertices in the waist, and this gives a relatively good result, before collisions.

So now to add collisions, I first tried approximating the shape of the legs with capsule colliders, but either they're too thin, and the cloth intersects with the leg mesh, or they're too fat and the cloth bulges incorrectly.

Then I tried instead of capsule colliders, create an editor script that creates a small sphere collider at the center of each triangle in the leg mesh (remember I don't need this in real time), with a script that relocates the collider each frame to the skinned position of each triangle, but for some reason the cloth seems to completely ignore the colliders.

For most accuracy, I also tried creating mesh colliders, one for each triangle (as a prism to ensure the resulting mesh is convex), and updating them to relocate the resulting mesh each frame. Again, the cloth seems to ignore the colliders.

What would be a good way to achieve my goal of having the cloth pushed by the legs in the inside?
Reply


Messages In This Thread
How to collide the cloth with the character? - by panda_pajama - 20-01-2018, 06:46 PM