I'm having a little trouble using maya joint orientations with my skinning code.
I am presently doing the following:
Like the code in the additve blending demo, I am using the world pose and multiplying it by the skin binding to get a matrix for each bone, and then passing the array of bone matrices to the shader to deform the vertices based on the bone index and bone weight per vertex.
This works great for models where the joint transforms and joint orinetations are frozen. (This way the joint orinetations are zeroed out and the axiis on the joint are the same as world space axiis)
However, this set up makes it harder for our artists to animate, so they've suggested using maya's joint orientations. I've looked at the havok_girl model and it appears to be using maya's joint orientations.
When I export the model where the transforms are frozen (no joint orientations) the rotations on the skin bindings are all zero. When I export the model with joint orientations the skin bindings do have rotations. This seems correct.
However, when I run the joint-oriented model in my program, the model is badly deformed once it starts using the skin bindings.
I have tried various things and verified that the data being rendered is the data that is in the exported file, so my question is am I missing something somewhere? Do I need to account for these rotations somewhere? I couldn't find anything in the demo code to indicate that it is neccessary to do so.
If you need any more information from me, please ask. Any help would be appreciated. Thanks.
Also, is there anyway I could see the code (or have it explained) how the demo hkg code is deforming the vertices. I thought maybe there might be something in that code that I am missing.