Hi,
I’m currently implementing a COLLADA loader in Java, and having a bit of an issue regarding the skinning.
First, I have successfully loaded the mesh that will be the skin, as well as the bone heirarchy. (I’m able to render both the mesh and bones (via simple boxes), and it looks correct, although not tied together.
So, my next goal is to bind the skin to the skeleton, but when doing so I’m getting strange results (my character looks like he got caught in some sort of horrible transporter experiment).
My current framework is a scenegraph, with the bones as a Node heirarchy, and the skin just part of the main model node (i.e. not directly tied to the bone).
My question is: What order do I apply the bind_shape_matrix and how are the INV_BIND_MATRIXs used?
Currently, the bind_shape_matrix is applied to the skin mesh one time during initialization, then the offset to the bone and skin mesh vertices are calculated based on the bind_shape_matrix and the INV_BIND_MATRIX for each bone. Which apparently isn’t correct. I’m obviously missing a fundamental concept here, and would love any help to work through it.
Thanks,
Mark