Read BVH file


I need to apply some changes to a model using a BVH file but I am well lost.

I have seen the and I know, based on previous trades in this forum, that I need to set the values read into a list of float variables but I haven’t got a clue how to do it!!

Anyone out there would have a code example that I could use on how to read a BVH file and allocate the values read inside a list of float variables?

Many many thanks for your help

Are you sure this question doesn’t belong over on the Blender forums? It doesn’t seem to have much to do with Panda.


Hi David,

I am not using Blender at all.

I have created my model in 3ds max and exported into Panda3d and I am aware that Panda3d/python can read the BVH file through cgkit.bvhreader and allocate the value into a list of float variables - I read it in another topic in this same forum index (scripting). I just don’t know how to do it!! So an example of the code which handle it would be great!!

But thanks for your reply anyway!!

I don’t have any experience with cgkit or BVHReader. Panda can’t read it directly. The fact that you can walk through the data in Python using cgkit doesn’t seem to be very helpful to me, since it’s not Python that actually controls the animation, but Panda, which is written in C++. It might be possible to integrate with Panda’s animation system this way, but it would be difficult, error-prone, and inefficient.

I suspect you might be much better off by importing your bvh animation into 3DSMax and exporting it from there as an egg file.


Hi David,

The problem is that I am using a gesture recognition suit which “communicate” through BVH file and the aim is to use Panda3D to animate the live feed created by the gesture recognition suit… so it would be OK to go through the 3DS Max and load the BVH pre-recorded examples but this would not work on live feed with immediate interaction.

Please have a look at this link: … highlight=

As you can see you were, actually, the one that helped jakeslack27 in a very similar situation!!


Ah, I see. Right, for dynamic information, you will have no choice but to hook up the animation joint-for-joint within Python.

Perhaps you can contact jakeslack27 via PM or email, and ask if he has some specific code samples for you to examine?


Hi David,

I have contacted Jake but no lucky so far!!

Unfortunately this seems to be quite specific and unusual but still, if anyone out there has any experience on loading BVH file into Panda3D, please send me some example code!! It would be great!!

Thanks for your help anyway!!

What’s holding your back ?
All you need to know is BVH data format, then you’d be able to solve it yourself with python. … f/BVH.html … cation.htm

Search for “bvh format” for more.