animationnation mission statementunited we brandanimationnation facebook
  • If you can dream it, you can do it. -Walt Disney

  • Quality is a great business plan. -John Lasseter

  • Let's make some funny pictures. -Tex Avery

  • I never considered a difference of opinion in politics, in religion, in philosophy, as cause for withdrawing from a friend. -Howard Zinn

  • When critics sit in judgment it is hard to tell where justice leaves off and vengeance begins. -Chuck Jones

  • And what do you benefit if you gain the whole world but lose your own soul? -Jesus

  • A man should never neglect his family for business. -Walt Disney

  • What's most important in animation is the emotions and the ideas being portrayed. -Ralph Bakshi

  • Once you have heard a strange audience burst into laughter at a film you directed, you realize what the word joy is all about. -Chuck Jones

  • Before enlightenment: chop wood, carry water. After enlightenment: chop wood, carry water. -Buddhist Proverb

raw data ---> BVH

Share your views on the state of the Animation Industry.

raw data ---> BVH

Postby bizmutolog » Thu Feb 14, 2013 1:45 am

Hi all,

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 :-P
If somebody had a similar problem with BVH, please help!

Thanks!!! ^____^
Have a nice day,
IGOR
bizmutolog
 
Posts: 2
Joined: Wed Feb 13, 2013 2:07 am

Re: raw data ---> BVH

Postby bizmutolog » Thu Feb 14, 2013 1:50 am

... so, just to make my self clear, it's kind of a motion capture problem. What I have is bunch of .txt files (320 values per frame) and I need to calculate those BVH fields/values via MATLAB. But, my problem is not in MATLAB, rather in calculating Euler angles from rotation matrix, global to local coordinates conversion, changing XYZ to ZXY orientation etc. So, if anyone have ever had a similar BVH problem, please help :-) Thanks...
bizmutolog
 
Posts: 2
Joined: Wed Feb 13, 2013 2:07 am


Return to General Discussion

cron