www.xbdev.net
xbdev - software development
Sunday December 22, 2024
Home | Contact | Support | 3D File Formats The bits and bytes... | BVH Format Internals Structure, Tags, Examples,...
     
 

BVH Format Internals

Structure, Tags, Examples,...

 

Let's explore the BVH Format (inner structure) - including some examples.

BVH files are text files - they're human readable - so you can open them in any text-based editor like notepad or visual studio.

When you open your file, there are two main parts:

1. Hierarchy (Skeleton) Section: This defines the structure of the skeleton, including its joints and their parent-child relationships.
2. Motion Data Section: This contains the keyframe animation data that defines the transformations (translations and rotations) of each joint over time.

BVH File Structure


A BVH file is structured as follows:

1. Hierarchy Section


This part defines the skeleton’s joints and how they are connected in a hierarchy. The syntax typically looks like this:


- ROOT: This defines the root joint of the skeleton (typically the "Hips" for a biped).
- OFFSET: This specifies the offset of a joint relative to its parent joint in 3D space.
- CHANNELS: Defines the degrees of freedom (DOF) for that joint. Typically, the root joint has 6 channels (3 for position and 3 for rotation), and other joints usually have 3 channels (rotations).
- The channels can be a combination of position (`Xposition`, `Yposition`, `Zposition`) and rotation (`Xrotation`, `Yrotation`, `Zrotation`).
- JOINT: Defines a child joint of the current joint, creating a hierarchy.
- End Site: This marks the end of a joint's segment. For example, in a human biped, an "End Site" could represent the tips of fingers or toes.

2. Motion Data Section


This part defines the keyframe data for all joints in the skeleton. Each keyframe specifies the position and orientation (rotation) of each joint in a particular frame.

The motion section starts with:


- Frames: Specifies the number of frames of motion capture data.
- Frame Time: Specifies the time duration of each frame, typically in seconds (e.g., 1/30 seconds for 30 FPS animation).

After this header, the actual motion data for each frame follows:


Each row represents a single frame, with the values of all the channels for the joints specified in the hierarchy. The first row corresponds to the first frame, and so on.

- For the root joint, you will typically see position and rotation values (e.g., `Xposition Yposition Zposition` followed by the rotation values `Zrotation Xrotation Yrotation`).
- For other joints, only the rotation values (`Zrotation Xrotation Yrotation`) will be listed.

Minimal Working Example


Here is a small sample to illustrate both sections:



Look Inside BVH File


Look at a real world .bvh file - with all the extra bells an whistles :)


Things to Remember when Working with .BVH Files


Key format tags:
- OFFSET: The relative position of a joint.
- CHANNELS: The number and type of DOF (degrees of freedom) the joint has (rotation and/or translation).
- ROOT: The topmost joint in the hierarchy.
- JOINT: Defines the joints in the skeleton and how they are parented to each other.
- End Site: Marks the end of a bone, used to represent terminal nodes like fingertips.
- MOTION: Section that contains all the frames of animation for the skeleton.
























 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.