Realistic hair can be rendered by simulating some textured patches with ClothSim:
Dressed animated characters
Collision detection and avoidance
If you don't already use a collision detection library, try ColDet (simple and free).
A common technique consists in computing collisions with dummy bounding
ellipsoids (and eventually with planes or boxes): you can approximate
an arm or a leg with 2 or 3 ellipsoids.
You can write a BoundingEllipsoid class to encapsulate the collision detection code. Each instance of this class keeps a pointer to the cloth object which must be tested against it.
Pinning to a moving object
A cloth can easily be pinned to a moving object. Suppose you want to simulate a cloak with 16x16 nodes; if you want to fix the nodes 0 and 15 to the shoulders of your knight, simply set:
cloak->mass.oneOverMass=0; cloak->mass.oneOverMass=0;and update cloak->mass.pos and cloak->mass.pos whenever you move your knight. During the following calls to cloak->Integrate(t), the nodes 0 and 15 will stay where you put them, and the other nodes will follow accordingly.
Another example: when a projectile hits a cloth, simply move ahead of a certain amount the nearest node, and the rest will follow spontaneously in the following frames.
|N i n j a||K i l l e r|