
BVH2POV.PL is a Perl script for converting BVH motion capture files into POV animations.


Running It
==========

When run, it will ask for the name of the BVH file. The output file names will be
derived from the name of this input file.

input
	FOO.BVH		motion capture file
output
	FOO_PARTS.INC	body parts for a "stick man" calculated from the BVH heirarchy
	FOO.INC		the main POV include file
	FOO.DAT		the motion information in POV readable format

When run, it will display the name(s) of the top level object(s) that it finds, and the
value that should be used for final_frame.


Stick Figure Animation
======================

To include a stick figure animation animation in your scene, add to your POV scene:

	#include "foo_parts.inc"
	#include "foo.inc"
	object {HIPS texture {...}}

(The name of the top level object of BVH animations is often "HIPS". If it's something 
else then use that name instead. If your BVH file has more than one top level object, 
then add a line to invoke each of the other top level objects).

Set the value of final_frame in the command line options, and render the scene.


Using your own figure
=====================

To perform the same motions with your own figure you'll need to edit or replace the
FOO_PARTS.INC file with your own code. Each of the parts should be designed to swivel
around the point <0,0,0>, which is the point by which it will be attached to the parent
object. Examine the existing parts to see the lengths and orientations that should
be used for the parts. E.g. if the parts file has

	#declare neck = cylinder {0,<0,4.63,0>,0.5}

then the top centre of your neck should be at the point <0,4.63,0>.

Hint: the length specified for the HEAD in BVH files is often rather short, so be prepared
to make it bigger.

Hint: the BVH files contain no clues about the shape of rigid props. BVH2POV will use a
unit sphere, which may well be totally inapropriate, so be prepared to change them.


An Example
==========

The ZIP file includes and example bvh file which contains one figure and one prop. Run
BVH2POV and specify "golf_swing" as the filename. 

The "example.pov" file uses the files that this generates to create an animation.
Observe that "example.pov" overrules the "head" and "golfclub" parts that were
generated by BVH2POV, and it invokes the two top-level objects independently.


Author
======

Mike Williams
mike@econym.demon.co.uk

	