0
$\begingroup$

I want to extract coordinates in x y z format from a BVH file.

I read about the rotational and transational matrices used in a BVH file but cannot make any sense out of it.

At last i want to make python script to extract these coordinates and them feed them to another python script which uses BPY for animation of a character in Blender.

Any kind of references in this context would help too.

$\endgroup$
  • $\begingroup$ Surely the importer / exporter as pointed out in answer below does this? IMO explaining the bvh file format is bordering on off-topic. $\endgroup$ – batFINGER Jul 18 at 12:40
1
$\begingroup$

You can find a lot of helpful information by taking a look at Blender's import and export scripts for BVH located in /your/install/dir/2.80/scripts/addons/io_anim_bvh or if you have cloned the repository /your/git/repo/blender-git/blender/release/scripts/addons/io_anim_bvh or online in diffusion.

As you can see in the importer (line 173), the file contains so called channels which contain the x,y,z-coordinates. Since I'm not familiar with the format I can't tell you exactly how the matrix transformations work, but given that the importer script is rather short you may be able to figure this out on your own.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.