Home
Products
Purchase
Downloads
Support
Education
Community
About Us
Developer Login
  
Forgot Password?

Create Custom BVH Profile

Level: Expert

You may in some cases encounter problems while converting BVH for iClone with BVH Motion Converter because of certain BVH format incompatibilities.The allowed bone structures in BVH are very flexible. Anyone can define a custom bone structure for their own purpose.There are only BVH profiles inside the iClone BVH motion converter, but due to the wide range of BVH format these conversion profiles may not satisfy all users' bvh files.This tutorial shows how to create custom BVH profiles for the iClone BVH motion converter, so you can make good use of the BVH assets you have with iClone.The profiles are .prf files located in \BVH Motion Converter folder.

Let's take a look at the profile format:

Motek //The profile name shown in the converter.
Position 0 -800 -1300 // The initial position offset.
FrameRate 60 // The frame rate of the original BVH motion data.
Chest <---> UpperTorso . //Bone mapping, The BVH bone name is on left and the HTR bone name is on right.
Head <---> Head .
Hips <---> LowerTorso -5,0,0 //The numbers are the values of the rotate offsets.
LeftAnkle <---> LFoot 90,0,-15
LeftCollar <---> LCollar 0,0,-15
LeftElbow <---> LLowArm .
LeftHip <---> LThigh 15,0,0
LeftKnee <---> LLowLeg 15,0,0
LeftShoulder <---> LUpArm .
LeftWrist <---> LHand .
Neck <---> Neck .
RightAnkle <---> RFoot 90,0,-15
RightCollar <---> RCollar 0,0,15
RightElbow <---> RLowArm .
RightHip <---> RThigh 15,0,0
RightKnee <---> RLowLeg 15,0,0
RightShoulder <---> RUpArm .
RightWrist <---> RHand .


Step 1: Set bone mapping. 

BVH converter transfers the animations from BVH bones to HTR bones on an one on one basis.So the first step of creating a custom BVH profile is to establish the bone mapping table.If you are familiar with the data structures of BVH & HTR formats, you may create the mapping table with any text editor.An easier way is to use the backdoor interface of BVH converter.

To activate it, follow the steps below:
Locate "MotionConverter.exe" in the Windows Explorer. (the default path is C:\Program Files\Reallusion\BVH Motion Converter)
On the Windows Start menu, select Run to bring up the Run dialogue.

From Windows Explorer, click and drag "MotionConverter.exe" to the Open field.
Add " /s" at the end of the line (Notice there is a space before the slash), it should looks like what shown below. 

Click "OK", the backdoor interface of the BVH motion converter will be now show as below.

Click "Load Source Anm File" to load a BVH file, and Click "Load target Anm File" to load "Base.htr" in the same folder of the converter.

The Skeletons will be displayed in the viewport.

Go to the table under the view port, double-click the node dot to expend the tree. Notice when a node is selected (yellow), the corresponding bone will be highlighted in the viewport above.

Select the corresponding bones of the BVH and HTR skeletons, for example, the bones named "LeftHip" of the BVH and "LThigh" of the HTR, then click "Add to Map" to create the mapping relation between these two bones. 

Create mapping relations betweens bones until all the HTR bones are mapped.
Notice: Since the pelvic bones are fixed and contain no motion, they don't have to be mapped.

Click "Convert", you'll see the result of conversion in the left view port.

You may find the result is not perfect, some limbs seem twisted or flipped. That's because the initial poses are different between the BVH file and "Base.htr".

Click "Save Result" to save the converted HTR file.

Click "Save Map" to save the mapping table as a txt file.

Close the backddoor program.

The next step will show you how to set the rotation offsets and refine your results.


Step 2: Prepare a custom profile.

Select one of the mapping items and click "Detail" to bring up a dialogue for the rotation offset setting, but the function here is not yet completed.

 

We suggest simply using a text editor to modify the rotate offset settings.

Please follow the steps below:

Copy the mapping table txt file to the BVH Motion Converter folder and rename it as a *.prf file. (You can see that there are already some prf files here. They are the original BVH profiles.)

Open your prf file with a text editor (ex. Windows Notepad) 

The text file contains the mapping table only. Add the profile name, "Position", and "FrameRate" on top of the mapping table.

The frame rate values are usually 30 or 60, you can find this setting in the BVH file (expressed by frame time, 0.033333 seconds frame time equals to 30 frame rate).

We'll determine the position offset value later.

Save the .prf file in the "BVH Motion Converter" folder.


Step 3: Set pose offsets.

Run iClone. 
Go to Animation>Motion>Modify tab, launch BVH Motion Converter.

Launch the "normal" BVH Motion Converter from iClone. You can see that the new profile is added in the BVH format list.

Load the BVH file, select the custom profile, click "Convert" then "Save and Apply", save the vns file.

iClone will load the motion data and apply it jautomatically.

You may notice that the character is not standing on the ground and some limbs seem twisted.

Let's take care of the floating problem first.

Go to Avatar>Character>Modify tab, adjust the values of the XYZ spinners in Character Position panel,
or use Ctrl + arrow keys to move the character to the ground origin. Write down the XYZ values.

Tips: you can turn the grid on (in preference) or load a prop and use it as a position reference.

Open the custom prf file with text editor, type the offset value next to the "Position".

If the (X, Y, Z) values are (a, b, c), then set the offset value as a, b, -c.
for example, if the (X, Y, Z) values are (0, -800, 1000), then the text on line 2 should be "Position 0 -800 -1000".

Next we'll fix the twisted limbs, take the left ankle for example.

The feet point downward unnaturally, to improve it, find the corresponding bone name in the profile (in this case, the "LFoot" bone),

remove the dot "." behind the bone name and type the XYZ rotate offset value "90,0,0". Save the prf file.

Now switch to the BVH Motion Converter, "Convert" the motion again and "Save and Apply".

You can see in iClone the left foot is rotated to a more proper angle.

Modify the values of XYZ rotate offset of the twisted limbs one by one. 

It may take some time and needs you to switch among the text editor, BVH Motion Converter and iClone to modify the profile and check the result.

When all the offset values are determined, save the prf file. You can use this BVH profile to convert all the BVH motion data with the same format.


The technique described in this tutorial can be used to make many kinds of transitioning displays, like TV, signboards, etc.

[TOP]


 
<font color="#CCCCCC" face="Arial, Helvetica, sans-serif" size="2"> <p><CrazyTalk is an innovative and easy-to-use software tool for creating animated talking messages from any still digital image or digital photo. Images are brought to life by morphing and appearing to lip-synch with recordings of your own voice, imported audio files or text messages. Messages can be sent as animated greetings cards, instant talking messages, sent as talking email or as an interactive web assitant or virtual host></p> <a class="link_ct" href="https://www.reallusion.com/crazytalk/ct_gallery.asp"><View our Talking Image Gallery></a> <a class="link_ct" href="https://www.reallusion.com/crazytalk/download.asp"><Download free trial of CrazyTalk Home Edition or CrazyTalk Web Edition></a><br> <a class="link_ct" href="https://www.reallusion.com/crazytalk/ct_features.asp"><View the CrazyTalk features which help to make your images talk by morphing and lip-syncing></a><br> <a class="link_ct" href="https://www.reallusion.com/crazytalk/ct_showcase.asp"><View the CrazyTalk Showcase which shows examples of how CrazyTalk can be used as an interactive host on your web site></a> <p><CrazyTalk Web Edition has all the features of the Home Edition with the addition of being able to create interactive talking content for your web site. Talking messages can be exported using .wmv & .rm streaming media formats which can be directly published on your website or imported into tools like FlashMX. For truly interactive content the ActiveX web player can be controlled by JavaScript giving you the ability to react to user driven events.> </p> </font>