BVH 2 ARMATURE new release !!

Hi everybody,

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.

Jean-Baptiste PERIN

Have fun !!!
:wink:

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)

Hi

Do you know this script?
https://blenderartists.org/forum/viewtopic.php?t=40203

maybe you mod it to your needs?
feel free.

Yes I know this script … I haven’t tested it so far …

Alas, I couldn’t use it to make my script because when I made the first version of my script (in October 2004),

https://blenderartists.org/forum/viewtopic.php?t=32458&highlight=bvh

this script hasn’t been released … :wink:

Thanks for your comments

JeanBaptiste …

feel free

A new release for Blender 2.4x is available here

compared to 2.37 BVH2ARM script … this one may appear to be a big regression … because armature’s bones no longer follow bvh animated empties.

Due the a major rewriting of Python Armature API, I can’t find a way to animate bones … so this script only build a parented armature at rest pos…
and make this armature follow the hip bone empty created bu the BVH import script

Fortunatly … thanks to Blender new IKSolver … user can easily get the created armature moving by :

  • putting proper IKSolver constraint on end effector bones (such as hands and feet)
  • putting rotation limit on bones.

I’m currently making a more comprehensive tutorial on that topic …
It will soon be available in the archive of BVH2ARM

Currently, the html doc included into the archive is just a too short tutorial.

Remark: BVH2ARM is now released under GPL Licence

Jean-Baptiste