Skip to main content

This repository provides Python3 scripts for manipulating and converting BVH motion capture files.

Latest version on PyPI Test Python package

Installation

  • To install from PyPi:
    pip install bvhtoolbox
  • To install from github using development mode:
    pip install -e git+https://github.com/OlafHaag/bvh-toolbox.git@master#egg=bvhtoolbox
  • To install latest development version using regular mode (building the package):
    pip install https://github.com/OlafHaag/bvh-toolbox/archive/master.zip
  • The installation creates some console scripts you can use.

Console scripts

Manipulate BVH files

Rename joints in bvh files

  • Command: bvhrenamejoints

Remove frames from BVH files

  • Command: bvhremoveframes

Offset joint angles in BVH files

  • Command: bvhoffsetjointangles
  • Can be used to additively offset joint angles in the BVH by supplying a csv table containing the mapping of joint names to euler angles.
    • The angles must be in the same order as the joint's channels in the BVH hierarchy.

Convert from or to BVH files

BVH to Cal3D XSF & XAF

  • Command: bvh2xsf
  • Command: bvh2xaf
  • Converts BVH files to the Cal3D XML skeleton (XSF) and animation (XAF) file formats.
  • The XAF files rely on the respective skeleton file.
  • XAF files have been tested to work with skeletons that were exported from 3DS Max and Blender.
  • I use the resulting xaf files in Worldviz' Vizard, so it's only been tested in this context.

BVH to Panda3D Egg animation file

  • Command: bvh2egg
  • Converts BVH files to the Panda3D animation file egg format.

BVH to CSV tables

  • Command: bvh2csv
  • Converts BVH to comma separated values tables.
  • Ouputs one file for hierarchy, one for joint rotations, and one for joint world positions.
  • Use --hierarchy to export the respective CSV file.
  • Using only the --rotation or the --position flag you can output only one of the transform tables.
  • The --out parameter only takes a directory path as an argument.
  • With the --ends flag the End Sites are included in the *_pos.csv file.

CSV tables to BVH

  • Command: csv2bvh
  • Takes 3 CSV files (hierarchy, rotation, position) previously exported using bvh2csv or created otherwise and builds a bvh file from them.

All converters have a --scale parameter taking a float as an argument. You can use it to convert between units for the position and offset values.

How to run the console batch scripts

  • Open terminal.
  • If you've installed the bvhtoolbox into a conda/virtual environment, you have to activate it first.
  • type <script_name> -h (substitute <script_name> by one of the commands above) to get more information on the usage.

Notes

This package includes 20tabs' bvh module due to a lack of updates for this module on pypi.org.

Metadata

Release files for bvhtoolbox 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bvhtoolbox 0.1.3
File Size Uploaded
bvhtoolbox-0.1.3.tar.gz 112.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bvhtoolbox 0.1.3
File Interpreter ABI Platform
bvhtoolbox-0.1.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 164.1 kB

Release files / bvhtoolbox-0.1.3.tar.gz

Download URL bvhtoolbox-0.1.3.tar.gz
Size 112.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2d9dcae87cd6bfa28c89463450de84497e612682ca0697ea088fc7f2ef0f937f
BLAKE2b-256 checksum
How to use checksums
12f3aa1b966444d940dcf9288096ade111b17902a9b9df6409ee5af781fbdff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.4

Release files / bvhtoolbox-0.1.3-py2.py3-none-any.whl

Download URL bvhtoolbox-0.1.3-py2.py3-none-any.whl
Size 51.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a9e61dcb45c62ac36d08c93a63add2dbef0c74a8644420f619f6471b825f1829
BLAKE2b-256 checksum
How to use checksums
1dce1319ba7a998d991f36320dddf6c8a4d82ddd0dafc4b1c896951c1c44c6dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page