BVH definition - Model rotation

Good Morning,

my name is Giulia and I'm a PhD of the University of Bologna. We developed in Matlab our algorithm for motion tracking using IMU sensors and a specific function to export motion as a BVH file, similar to the Xsens one. The BVH file works well in third visualization software (such as Blender etc.), but, as you can see in the pictures, it loses meaning when I imported it in Anybody.


It is impossible to recognize any skeleton shape, indeed. I wonder how Anybody calculates the position of each body segment using the BVH file. In particular, what is the meaning of r0? Is the position of the segment reference frames relative to the global frame? Or is the position with respect to the previous body reference frame?
I think that the problem is the calculation of the r0 values. In fact, I tried to use those values to reconstruct the human body in Matlab, and the shape is similar to the Anybody output.

Moreover, I probably have to rotate the BVH skeleton of 90° on x-axis. How can I define this rotation?
What is the exact meaning of:

Rotation2PiFixOnOff = Off;
Rotation1PiFixOnOff = Off;  

What is the meaning of the input of Rotationscale in the BVHfileData folder?

Thank you in advance,


Hi Giulila,

r0 is the loading position of a segment in a global ref. frame. They are typically expressed through the r0 of a parent. And everything typically starts from position of pelvis in the global ref. frame. The stick figure is displayed at the select time step, meaning the r0 will be computed based on first specified frame. But i think the BVH file actually contains relative positions for each dof. Please try loading a BVH model and look at the values and corresponding BVH file in text editor - it is possible to interpret how the values are constructed.

RotationScale - used for conversion from radians to degrees and back. You can press F1 on most of the objects in AnyBody.

Once the stick-figure is created and moves nicely, AnyBody computes human joint angles from an optimization by means of a Virtual Marker Method, where stick-figure is being given virtual MoCap markers and then we optimize human motion to match it. You will have to adjust marker protocol to fit your skeleton. You do not necessary need to rotate your stick figure - you can change gravity direction. Please check tutorials and wiki.

Kind regards,

1 Like

Thank you very much for your reply.

Previously I didn't specify the RotationScale in the BVHsetting. I set it and now I can finally see the stick figure as expected.



1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.