Blender X BVHHacker why the parsed rotation values are so different ?

Hi folks !

Im working on a custom Java parser for BVH Files, and in my tests i imported a same file in bvhhacker and blender to compare the data i got with my own parser … the strange thing is that the rotation values that i obtain from my parser and bvhhacker for a determined joint are the same , but they are completely different from the values i got from blender … the case is that the blender values seems more correct to my purposes. Now im trying to know what kind of transformations blender apply to the joint before the rotations are exibited. Someone can help please?

Here is an example:
In the file oi.bvh fon the frame 13 my script and bvhHacker show this data for the xyz rotations in the “UpArm_R” joint :

-42.34, -78.55, -11.20

The same file open in blender gives me these rotation values :
-82.824, 20.743, -7.781

Thanks guys !

Attachments

oi.bvh.zip (22 KB)

The best way to figure it out would be to read the code but…

I’m gonna guess and say that it’s because the blender importer translates the vectors to use a different up axis, Y vs. Z.

Uncle Entity, wouldn’t that just cause the blender rotation values to be exactly the same with two of them swapped??

Hi Uncle Entity ! I did as you suggested but im stuck in a part of the script…

Im math terms what the method matrix_local do ??? even in the root bone ( 0 rotation on all axis and all frames ) i got some values in the rotation part of the matrix … In my example : BONE_REST_MATRIX <Matrix 4x4 (1.0000, -0.0000, -0.0000, 0.0000)
(0.0000, -0.0700, -0.9975, 0.0000)
(0.0000, 0.9975, -0.0700, 0.0000)
(0.0000, 0.0000, 0.0000, 1.0000)>
Im confused !!! where blender got these values !??!?!?!?