|
![](/i/fill.gif) |
Here's an example of using a BVH motion capture file to control a POVRay
amimation.
I used the Heirarchy information from the bvh file to derive the default
positions of the body parts.
I then took the Motion information and editied it so that it can be read
directly from POVRay. The editing required is:-
Remove all the text, leaving just a list of numbers
Replace all the TAB characters with commas
The data for the BVH channels are read into POV variables, and these
variables are used to position the body parts for each frame.
One subtlety is that, as in this case, the BVH can specify the rotation
channels in the order Z,X,Y you can't just perform a "rotate <X,Y,Z>" in
POV. Rotations aren't commutative. What I had to do was perform "rotate
<0,0,Z> rotate <X,Y,0>" which performs the operations in the required Z,X,Y
order. If you are converting a BVH file that has the channels in a different
order then you may need to do this differently.
Grenade.pov is the POV code
Grenade.bvh is the original BVH file
Grenade.txt is the data extracted from the BVH file which is read by POV.
final_frame = 177
Post a reply to this message
Attachments:
Download 'Bvh.zip' (97 KB)
|
![](/i/fill.gif) |