09-02-2025, 04:22 AM
We have a system where a virtual garment is procedurally generated, consisting of multiple fabric shapes stitched and stretched around the character model. I’ve noticed an issue where the fabric vibrates and sometimes clips through the model, and I think this is because of the fabric being stretched too tight.
I tried loosening the stretch scale and stretch compliance (they’re normally at 1 and 0 respectively), but any value loose enough to stop the vibrating also resulted in the fabric drooping and losing its shape (more than it already does). I compensated by increasing the particle inverse mass (to try and decrease the mass and make the fabric less likely to droop down), but this makes it start vibrating again.
Another solution I thought of was to directly modify the mesh before generating. The cloth has two halves, front and back, which are initially flat meshes. I made some code that uses raycast checks to manually modify each vertex, to make the mesh wrap more closely around the body. This reduces some of the vibration, but still has some jittering and causes the fabric to droop (albeit in a slightly more crinkly and polygonal way).
I've been thinking about making a system to have most of the garment non-simulated. so it conforms to the model and doesn't move about in ways it doesn't need to, but since the garment is procedurally generated I'm not sure yet how to differentiate between the bits that need to simulate realistically and the bits that can stay in place.
What other methods could I try to reduce jittering?
Thanks!
I tried loosening the stretch scale and stretch compliance (they’re normally at 1 and 0 respectively), but any value loose enough to stop the vibrating also resulted in the fabric drooping and losing its shape (more than it already does). I compensated by increasing the particle inverse mass (to try and decrease the mass and make the fabric less likely to droop down), but this makes it start vibrating again.
Another solution I thought of was to directly modify the mesh before generating. The cloth has two halves, front and back, which are initially flat meshes. I made some code that uses raycast checks to manually modify each vertex, to make the mesh wrap more closely around the body. This reduces some of the vibration, but still has some jittering and causes the fabric to droop (albeit in a slightly more crinkly and polygonal way).
I've been thinking about making a system to have most of the garment non-simulated. so it conforms to the model and doesn't move about in ways it doesn't need to, but since the garment is procedurally generated I'm not sure yet how to differentiate between the bits that need to simulate realistically and the bits that can stay in place.
What other methods could I try to reduce jittering?
Thanks!