Members - Reputation: 101
Posted 01 October 2012 - 06:12 AM
In the deforming stage I take this information and calculate the inverse matrices for the binding skeleton and apply this to the mesh. This deforms the mesh to skeleton unity. I then multiply the unity mesh by the current user skeleton matrices for who ever is in front of the kinect. The idea is that the mesh should bind to the user skeleton and we should have a mesh that is deformable by the user.
However I cant seem to get it right. There appears to be stretching of the mesh and rotation instability as I move the joints (causing sharp jumps).
So I have three basic methods BindBones, GenerateInverseBindingSkeletonTransformedMesh and DeformMesh. The first determines the weighting of the mesh and what vertices are connected to which bones, the second transforms the mesh we have by the inverse of the binding skeleton matrices and the third takes that mesh and transforms it using the current user skeleton.
I've attached a screenshot exhibiting the behaviour, the binding and deforming skeleton are exactly the same thanks to the dummy but the mesh clearly isnt the same. With smooth skinning switched on it goes nuts, with smooth skinning off(only one bone deforming) it looks nearly right. Has anyone got any idea of what this behaviour might be caused by? I can provide more detail if required.