soulhuntre opened this issue on Jun 27, 2001 ยท 6 posts
Mason posted Tue, 03 July 2001 at 12:30 PM
Usually you can use line casts for this. Itterate through all clothes ploygons and collide it with each poly in the body by casting the line segs formed by each edge of the clothes poly through the plane of each poly on the figure. If there is an intersection you can determine which vertex is behind the figure poly and move it to the surface. The only problem is recursive blow ups. Basically if you move a vertex you have to recheck the polygons attached to this vertex to see if they now intersect. This can cause problems in armpits and tight places probably requiring a recurse cap. Another method is to do a wrap algorythm. This itterates through each vertex of the clothes and casts a ray to a focal point (center of figure, center of wrap to figure, center of world etc). The ray intersects the figure mesh at some point with a simple plane to line intersect algorythm. At this point you can get a normal formed by the ray then back waya from the surface by a user set amount and place the vertex there. This method would saran wrap the clothes to the figure so it wouldn't work well with robes and capes. Havok has a soft body collision modeller that works quite well and at game framerate speeds. I've seen demos of a figure running in a chinese robe and the robe not only collides with his arm but with itself and the world so as to bounce off realistically. Since they use the vertex level as the collider the ability to collide clothes should not only be do-able but fast. They also had a demo of a large breasted woman using soft bodies for her breasts and her top. The breasts made the top stretch and expand as she bounced around.