Using BVH animations

Hi, all
During the development of the last flash game (http://www.stargamm.com/?
p=34), I used animated models for my characters. I want to share the solution to the problem of how to use the imported BVH data to the existing project.

Blender has the perfect script, which allows to import data from BVH files as an animated armature. *Also there are many free libraries with BVH data, and in your project, you may want to use these animations for the movement of your characters. You find the suitable file, import it and oops!

It would seem - you just need to copy the pose of the imported skeleton, but there is a problem - the initial state of skeletons varies and simply copying leads to different results.

When I encountered this problem, my model was already an armature(containing the*artificial bones for use in the code), I spent a lot of time on setting vertex groups for this armature, and I had no desire to repeat it all again. In addition, the animation, which I planned to use contained in the files from different sources and these skeletons were different initial postures.

This decision *I used in my case.

  1. I imported a short BVH file from the found collection in the blend. file with my model. For convenience, I placed the imported armature in a separate layer.

http://www.stargamm.com/wp-content/uploads/2010/08/bhv_armature.jpg

2.For each bone, the movement which I planned to use, I created an empty and named it the same way as bone. All empties I also put in a separate layer.

http://www.stargamm.com/wp-content/uploads/2010/08/create_empty.jpg

  1. For each created empty I make parent - the corresponding bone in imported skeleton.

http://www.stargamm.com/wp-content/uploads/2010/08/make_parent.jpg

  1. For each of the bones of my model in the* «Pose mode» I applied constaint «track to», pointing out as a target corresponding* empty. Enable the «align» in constaint, I got more control over the correctness of «track to» constaint.

http://www.stargamm.com/wp-content/uploads/2010/08/track_to.jpg

After that I could use the imported animations to animate a skeleton of my character.

http://www.stargamm.com/wp-content/uploads/2010/08/done.jpg

My version of Blender - 2.48a, version of BVH import script - 1.90 06/08/01

… makes me think of how bones from a bvh file are assigned to model bones in MotionBuilder:
http://www.spafi.org/index.php?option=com_content&task=view&id=454&Itemid=26&lang=iso-8859-1
http://www.spafi.org/index.php?option=com_content&task=view&id=456&Itemid=26&lang=iso-8859-1

I guess that the bvh importer scipt could be extended to be able to assign the movements of imported bones the bones of the model? And maybe work from naming templates too.