I'm not sure if this is a right place to post this new topic, but... Anyway, my problem is raw data to BVH conversion. Please, help!!! I'm stuck with this boring problem for weeks now
Here is what my problem is and what I've tried so far...
I have raw data that has 320 values in each frame (there are ~50,000 frames, but when I make one work, the rest will follow ^__^). These 320 are actually 20x16 (=320) values, so each body joint (20 of them) has 16 values to it (joint_ID, global_pos_X, global_pos_Y, global_pos_Z, angle_X, angle_Y, angle_Z, rotation_mat00, rotation_mat01, rotation_mat02, rotation_mat10, rotation_mat11, rotation_mat12, rotation_mat20, rotation_mat21, rotation_mat22). So, there are global position in X, Y, and Z axes, three angles, and nine values for rotation matrix... for each of the 20 joints.
Now, those three angles had not been recorded correctly (during the recording), so they are useless, but that shouldn't be a problem, because I have position and rotation matrix for each joint in each frame. But as you probably know, for BVH I need to calculate some stupid Zrotation, Xrotation, Yrotation values, which are Euler angles.
During that rotation matrix ---> Euler angles conversion, something goes horribly wrong and when I copy those values to my empty BVH and run it with BVHacker or BVHViewer, it's very very bad. The skeleton is connected right (I know that because when I apply "0" for all rotations, it looks good), but it seems that those Euler angles are not correct
Can somebody please tell me what is the easiest and most straightforward way to calculate those Zrotation, Xrotation, Yrotation values in BVH? Also, why is the rotation order in BVH Z,X,Y (I mean, is ZXY used, or is that XYZ with switched values... and does it even meter?) and is it possible to change it to XYZ by manually editing a BVH file? Is it somehow possible to avoid rotations and just use global or local positions in BVH?
Anyway, I'm a bit confused, as you can see
If somebody had a similar problem with BVH, please help!
Thanks!!! ^____^
Have a nice day,
IGOR



