A bit of background:
I am working on a M.A.Sc. Biomdedical Engineering degree and part of my thesis makes use of motion capture data. One of the main pieces of information I need out of that data is the center of mass of the human I am capturing the motion of. As the motion capture software can’t calculate this on its own I have slowly made my way towards attempting to use Blender to help with this. I can get my data into C3D format and am looking at the c3d_import.py script that comes with Blender.
What I am hoping to do with Blender, through extending the c3d import python script, is get the geometric center of each bone in the armature that is created by the import script and use that to calculate out center of mass.
I suppose, if I were to summarize, that I have two main issues as far as understanding the API enough to get this done. The first, is that I am assuming this import script is creating a pose for each frame of capture date, but I haven’t figured out how to verify that. The second is that I can’t seem to find a clear enough explanation of the API to understand how I would get about getting the geometric center of the bone (I am using octohedrons) through from whithin my Python code.
My best guesses are that I should loop through each frame, get the pose for that frame, get the bones for that pose and then use the quaternion of the bone plus the matrix of the bone in the rest position to calculate the geometric center? I am just hoping there may be someone with much more expertise and experience who can help guide me through this.
Hopefully I’ve managed to explain things clearly enough and haven’t misused any Blender terminologies.
Thanks for any help you can provide.