![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/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) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks for this Mike.
Andy Cocker
"Mike Williams" <eco### [at] econym demon co uk> wrote in message
news:3cb7397c@news.povray.org...
> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mike,
I tried rendering this anim, and in my opinion, I think something is amiss.
Either the .bvh file had strange motion and your translation of it is fine,
or the .bvh file was fine, and something has gone wrong with your
translation (does that make sense?).
There seems to be a lot of strange rotations and movements going on there.
I'll try and suss it out later when I have more time, but for the moment I
think I will just create my motion using a IK skeleton in the Lightwave
demo, and by placing a null at each joint, for each frame place the vectors
in an array and animate that.
Dunno if that makes sense.. it's late and I need Z's.
All the best,
Andy Cocker
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I was very impressed by this idea, it's beautiful. I had to agree with Andy
though; the movement is suspicious! After a day working on rotations and
feeling a bit rotated myself, I discovered that instead of Z XY, the best
rotation would be -Y -X Z, in that order, using other bvh-files if found
that the hip translate would be X Y -Z. So after reorienting the camera and
the lights this grenade-trowing-guy looks a bit more realistic. I also
included a different bvh and my own pov-model inspired by grenade, it's
called sticky things.
Post a reply to this message
Attachments:
Download 'grenade2.zip' (538 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |