Using BVH motion converter

Introducing BVH motion converter

BVH – BioVision Hierarchy file is one of the most common format for holding motion capture data. You can find tons of free BVH motion data on the web or motion libraries for sale in BVH format. By using BVH motion converter, you can convert all these available resources into iClone format and enrich your motion content.

What’s BVH profile

BVH file format allows free definition of skeleton structure including bone names, hierarchy, bone length, initial position and rotation. The BVH motion profile describes the mapping relation between source BVH skeleton and target iClone bones. You have to assign the right profile for the source BVH data then BVH motion converter can convert motion data correctly. In iClone 1.0, there are only 4 preset profiles to choose from. iClone 2 provide new function for creating your own custom BVH profiles.

iClone RL bones 

RL bone system is a specific skeleton structure for iClone containing 18 bones driven by motion data and other bones for hand gestures and body deformation. These 18 bones are the object the object to be mapped with the source BVH skeleton.

They are :LowerTorso, UpperTorso, LCollar, RCollar, LUpArm, RUpArm, LLowArm, RLowArm, LHand, RHand, LThigh, RThigh, LLowLeg, RLowLeg, LFoot, RFoot, Neck and Head. 

The figure below shows the structure of the bones. 

iClone rlbone02 Using BVH Motion Converter iClone rlbone Using BVH Motion Converter

Note:

LPelvis and RPelvis are fixed bones which needn’t mapping to the source BVH skeleton.

To convert a BVH file in iClone BVH Motion Converter

1. Click the Animation iClone animate Using BVH Motion Converter button.

2. Click the Motion iClone motion Using BVH Motion Converter button then go to the Modify tab.

3. Click the Launch iClone launch Using BVH Motion Converter button in the the BVH Motion Converter field to launch BVH Motion Converter.

4. Click Load Motion button to locate and load the BVH file. The BVH skeleton shows on the Source File window.

iClone bvh 05 Using BVH Motion Converter

5. Choose the BVH profile correspondent to the imported BVH file.

Note:

6. Click the Convert button, the converted iClone skeleton shows on the Target File window. Click Play button to check the result.

iClone bvh 06 Using BVH Motion Converter

7. Click the Save / Apply iClone save apply Using BVH Motion Converter button to open the Save As file browser, give a name and save the vns file. The motion will be apply to the current character and added to the Motion Custom tab.

Note:

  • Converting a BVH file with a wrong profile pops up a massage: Unable to convert motion with selected profile! You have to choose a correct one or make your own.

  • To prevent from unexpected errors happening in BVH converter, take Poser for example, it is recommended for you to follow the steps below to export BVH motion files:

    1. Use the Default Character named James in Poser.

    iClone 01defaultcharacter Using BVH Motion Converter

    2. Apply a motion clip to James.

    3. Select File/Export/BVH motion… in the main menu bar.

    iClone 03exportbvh Using BVH Motion Converter

    4. Click Scale Automatically button and save the motion file.

    iClone 04exportoption Using BVH Motion Converter

To create a custom BVH profile 

1. Launch BVH Motion Converter, and load the BVH file.

2. Click Launch BVH Profile Editor iClone profileeditor Using BVH Motion Converter button to open the profile editor.

iClone profileeditor01 Using BVH Motion Converter

3. Type the name of your custom profile in the Profile Name field. 

4. The Profile Editor tries to figure the mapping relation and lists the outcome in the Bone Map List. Check mapping correctness by clicking the bones in the list one by one and see if the highlighted bones (in the Source File window and the bone structure list) are correspondent with the RL bones. You may have to refer to the figure of RL bone structure we mentioned earlier.

iClone sourcebvh Using BVH Motion Converter iClone bonelist Using BVH Motion Converter

5. If there are incorrect mappings, choose them and click Remove iClone removebtn Using BVH Motion Converter 8"> button to remove them from the list. The Remove All iClone removeallbtn Using BVH Motion Converter button removes all mapping relations in the list.

6. To add a new mapping relation, choose a BVH bone in the Source Bone structure list ,the correspondent RL bone in the iClone RL Bones structure list then click Add to Map iClone addtomap Using BVH Motion Converter button.

7. When all mapping relations are set, click the Save Profile iClone saveprofile Using BVH Motion Converter button to save the custom profile. The new profile is added to the profile list of the BVH motion converter.

8. Click the Convert button to convert the BVH with the new profile, then Click the Save / Apply iClone save apply Using BVH Motion Converter button to apply the motion to iClone character.

You may find the character is not standing on the ground and some limbs seem twisted. Let’s fix it in the next session.

To Adjust the initial position of the BVH motion

1. First you have to figure the proper offset value for locating the character in the origin. In iClone, go to Avatar>Character>Modify tab, adjust the values of the XYZ spinners in Character Position panel, or use Alt + Left Right/Up Down arrow keys or Ctrl + Up Down arrow keys to move the character to the ground origin. Remember the XYZ values.

 iClone characterposition Using BVH Motion Converter

Tip:

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

2. Go back to the BVH Profile Editor, the XYZ offset values will be converted by the program automatically.

3. Save the custom profile and convert the motion as described earlier, then save / apply the motion to iClone character. Reset the character position and check if the initial position of the converted motion is correct.

To fix the twisted limbs

1. In the image above, The feet point downward unnaturally, to improve it, select the corresponding bone name in the Bone Map List (in this case, the “LFoot” bone).

2. Click the Bone Offset iClone boneoffset Using BVH Motion Converter button to open the Bone Offset dialog box, input the Rotation offset value.

iClone lfootoffset Using BVH Motion Converter

3. Save the profile, convert the motion then save / apply the motion to iClone character. Check if the twisted limb is corrected properly.

iClone after Using BVH Motion Converter

4. Modify the values of XYZ rotate offset of the twisted limbs one by one. It may take some time and needs you to switch between BVH Motion Converter and iClone to modify the profile and check the result.

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

BVH profile format

The BVH profiles are .prf files located in \BVH Motion Converter folder (default path: C:\Program Files\Reallusion\BVH Motion Converter). They are plain ASCII files so you can modify them with any text editor instead of using the  BVH Profile Editor.  

Let’s take a look at the profile format:

Default //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 .
LeftAnkle <—> LFoot 60,0,0 //The numbers are the values of the rotate offsets.
LeftCollar <—> LCollar . // a dot means there are no offset needed
LeftElbow <—> LLowArm .
LeftHip <—> LThigh .
LeftKnee <—> LLowLeg .
LeftShoulder <—> LUpArm .
LeftWrist <—> LHand .
Neck <—> Neck .
RightAnkle <—> RFoot 60,0,0
RightCollar <—> RCollar .
RightElbow <—> RLowArm .
RightHip <—> RThigh .
RightKnee <—> RLowLeg .
RightShoulder <—> RUpArm .
RightWrist <—> RHand .
RightWrist <—> RHand .
* LPelvis //Fixed bones.
* RPelvis //Fixed bones.

Using BVH Motion Converter