HairRealistic hair can be rendered by simulating some textured patches with ClothSim: Dressed animated characters
Collision detection and avoidanceIf 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 objectA 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[0].oneOverMass=0; cloak->mass[15].oneOverMass=0;and update cloak->mass[0].pos and cloak->mass[15].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 |