Page MenuHome

BVH Exporter mishandles non-origin root bone
Closed, ArchivedPublic


Blender seems to improperly EXPORT BVH. Attached is .zip a round trip import-export pair of files that demonstrate that Blender does not return the same file it imports.

The image shows the improper consequence of import/export round trip in Blender.

Blender Exporter seems to treat frames as absolute positions not as relative to the root. It improperly displaces the root {These references all agree that the position frame channels are translations, and not absolute positions:
Refer to equation 3.2 on page 8 and the description next to it.
"Therefore,Tx,Ty and Tz represent the summation of abone’s base position and frame translation data."
"The rot filesation data comes from the motion section. For the root object, the translation data will be the sum of the offset data and the translation data from the motion section"

OS Name Microsoft Windows 8.1 Pro
Version 6.3.9600 Build 9600
Processor Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz, 2394 Mhz, 4 Core(s), 8 Logical Processor(s)
Adapter Type GeForce GTX 780M, NVIDIA compatible
Adapter Description NVIDIA GeForce GTX 780M
Adapter RAM (1,048,576) bytes
Installed Drivers nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
Driver Version

Event Timeline

Rob Baer (rwbaer) updated the task description. (Show Details)
Rob Baer (rwbaer) raised the priority of this task from to Normal.
Rob Baer (rwbaer) set Type to Bug.

Code seems to be doing what's expected here...(re movement and all).

However, it seems to apply some kind of global rotation of armature somehow…

The example file does not seem to illustrate this issue. What happens in the example file is that it rotates the entire skeleton to convert from Z up to Y up coordinates (or the other way around).

The issue I was seeing, is that BVH export copied the offset of the root joint in the X/Y/Zposition channels of the MOTION, even if the animation track in blender had no translation on that bone, only rotations.
Now, I have only tried this with Blender 2.72b so I'm not sure whether this is fixed in the meantime (which is why I outsourced investigation of this issue), but my observations are described here:

Recreating this bug should be fairly straightforward:
Create a new armature in Blender, add one bone, place this bone's head at a different position than the origin. Apply a pose to this armature containing only rotations, no translations. Export to BVH.
When observing the BVH file, the root joint will contain translation channels, and they will be non-zero. In fact they will contain the same coordinates as the offset of the root joint. This is contradictory to the literature pointed to by Rob. It also seems to contradict a variety of existing BVH implementations, for example BVHacker.

Perhaps this image will further clarify the issue.

Jonas H (duststorm) added a comment.EditedMay 22 2015, 1:25 AM

I'm attaching two simple blend files for testing the patch.
The first contains only one bone, this is an edge case (only one bone, the root bone)

The second has two bones

The root bone doesn't have it's head at the origin, its head is at Z=0.35, its tail at Z=1.35, thus length == 1
The child bone (in the second file) has its head at Z=1.35 and its tail at Z=2, X=0.5

The things to verify are:

  • The bones have no pose transformations, so the exported BVH file is expected to have all zeros in its animation channels
  • The joint offsets in the BVH file are correct (relative to parent)
  • Importing the BVH file again, the armature or object structure should be identical to the blend file (import with Z up, face Y)

no activity, closing as archived