Here’s a new release of my script which build an armature upon a heap of empties (like the one we get after a bvh import).
You can download it here
How to use this script:
- Open a text editor with the script in it.
- Import a BVH file into Blender (File-> Import-> BVH)
(Here, you can adapt the empties’ rotation to fit your model. For instance, rotate shoulder empty 90 degrees so that arms are horizontal)
- Run the script (Alt-P)
- A GUI appears:
StartFrame : the first frame of your anim
EndFrame : the last frame of your anim
FrameDecimation : the number of frame to skip between two action key
Scale : use it to size your armature
- Press Create Armature
The armature is created
You can parent your model to the armature
Now, if you want to play an other BVH without losing your vertex assignment … you can apply a new bvh to the same armature by following the procedure:
- Remove all the empties created during first import
- Import a new bvh (it must have the same structure than the previous one)
- Run the script again (with the same scale parameter)
If the joint’s name are the same between both bvh … the armature should play the second bvh …
I’ve used imported motions into a game blender … it works …
It is also possible to make an armature play several BVH, one after the other, into a single anim by using strip NLA editor.
Please … send me comments, questions and remarks
thanks to D.Lomas for frame decimation idea.
thanks to LOD for Beta testing, encouraging, and being so smart.
thanks to JMS for bringing us light.
Have fun !!!
NB: the created armature is unparented … I’ve made a script that build a parented armature on a single frame. it allows the users to swap between bvh animated armature and hand made animation. Feel free to e-mail me if you’re interested in getting this script. (it doesn’t yet deserve to be posted here)