Monday, June 1, 2009

stretching skin with bones...yet another attempt

I'm looking at this problem in more of a physically based manner, where there's only 1 timestep (boneBefore and boneAfter) to deform the skin. So basically what I'm doing is seeing where the vector ( defined by a vertice on the bone before and after deformation ) intersects a face on the skin. When it finds this face, it adds it to all other vectors that have intersected the face, eventually coming up with an average directional vector. Because vertices of several parts of the bone will intersect the skin, not just the one that would theoretically push it out first (given the single timestep) it is necessary to set the magnitude of this average directional vector to the magnitude of the bone vertex that is the least distance from the skin face. There still appear to be some kinks in setting this magnitude, as can be seen in the circled area in the image below.

This method will be done before the standard method for moving the rest of the skin, allowing skin areas that do not come into contact with the bone to deform as well. However, this will ensure that the bone does not interpenetrate the skin after this operation has been performed. On the down side, checking every bone vertex against every skin face is computationally expensive and adds quite a bit of time to the deformation process.