Sunday, May 06, 2012

Bone Hierarchy

I always wanted to work on Animation System used in games or any graphical applications. But after reading a lot about them, i came to the realization that the basics of Animation System, skeletal animation to be precise, lies in knowing more about Bone Hierarchy. 

It was always the basics about the bones, the way transformations are handled & the data that gets transferred from one bone to the other that drives the bone system.  Just for the simplicity sake, I totally removed Inverse Kinematics from the option as it would have diverted my attention from the getting to know basics of Bone System.

To begin with, Basic data structure for the bone node was the key. My Bone data structure had, Position, angle, mesh data & of course, transformation matrices holding data required to go into Parent space as well as World space. 


After getting done with the Bone numbering,  it was about setting parent for each bone. Zero being the root node for entire hand, if zero moves, entire hand moves. Relations were set in order to simulate human hand behavior. Positioning of each bone was done in trial and error method.  


AS you can see in the video, I was able to simulate ( not completely ) human palm behavior with playing around little math for the angular transformation of each bone. Here is another video attached to get a complete 360 degrees view of human palm in action.


Obviously, there is much more that can be done in order to further improve the human palm. But for the basics sake, i feel this gave me fair bit of idea about bone transformations & how parent-child linkup happens. 

Cheers. 

No comments: