Jump to content
  • Advertisement
Sign in to follow this  
ajimenez

Self-collision in cloth simulation

This topic is 5414 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I have some pretty fast cloth simulation code, and I would like to update it adding collision detection and, if possible, self-collision. Does anyone know of a fast method for self-collision detection and avoidance in cloth? Thanks in advance. Cheers, Angel

Share this post


Link to post
Share on other sites
Advertisement
I am mildly interested in this, as a feature to be implemented, so I'll try to keep the discussion going.

I think the method is gonna be inherently slow, whatever it is :)

you might find this interesting though.

http://ligwww.epfl.ch/~thalmann/papers.dir/IFIP91.skirt.pdf

Basically, hitting points of the cloth with the sweeping triangles of the cloth.

I particularly like this equation

P + V.t = V0 + V1.t + ((P1-P0) + (V1-V0).t).u + ((P2-P0) + (V2-V0).t).v

left is the path of the particle, right is the volume defined by the triangle.

there is an intersection if t is in the time range [0, tmax] and u > 0, v > 0 and u+v <= 1.

It does not look easy to solve. I would probably try to simplify the equation by using an approximation of the general triangle velocity, thus simplifying the volume to a sweeping triangle, and the test would fall down to a ray-triangle test, which is much easier.

There is also the problem of culling particles/areas of the cloth efficiently.

If I go with this, I'm intending to use the verlet particle system to model clothes. Simple, stable, fast. Self collisions would work simply by constraining the position of the particle to the triangle volumes.

There is also the possibility of further approximating the quads and areas in the cloth to AABoxes as a first pass.

You also don't have to test all the points. You can identify a few points in the cloth that needs to be tested, and you don't have to actually test all the points in the cloth to start with.

You can restrict points only at the outer edge of the cloth, or the corners of the cloth.

Share this post


Link to post
Share on other sites
What kind of cloth are you trying to do collision on? Because if it's actual clothes things can get really tricky. Mostly because animated humanoid characters often self intersect at various joints like the the back of the knee. This means doing actual physically correct self collision might not even be possible! If all you want to do is large pieces of cloth like curtains, capes and flags, it gets easier.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://citeseer.ist.psu.edu/fuhrmann03interactive.html
http://graphics.ethz.ch/~teschner/publications/collisionDetectionComparisonWSCG2004.pdf

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!