Converting BVH animations to VMD animations can be a bit complicated, and you will need some patience and perseverance to succeed with it. There are several issues which can give you problems in making this conversion. Here is the information which I have about these problems and how to solve them, followed by step-by-step instructions for converting BVH to VMD:LIST OF POSSIBLE ISSUES AND THEIR SOLUTIONS:
1. The Blender BVH importer has a bug. If you try to import a BVH file which has Japanese bone names, it won't import into Blender, and you will get an error message. This simple bug fix will work if your BVH file is a unicode utf-8 text file:
Open this file (from the Blender program folder) in a text editor, such as Notepad++:
Change line 97 from:
file = open(file_path, 'rU')
file = open(file_path, 'rU', encoding = 'utf-8')
2. The X,Y,Z axes and + and - directions of bone rotations may not be defined in the same way in a BVH file as they are defined in an MMD model.
When you import a BVH animation into Blender, an "Import BVH" options panel appears at the lower left. Try the default options (-Z forward, Y up). If that doesn't give you a correct-looking animation, then you need to experiment with these 2 import options until you find the option which works. If you are converting a DAZ/Poser BVH to VMD, you do not need to change these 2 options away from their default values.
3. The scale(size) of the armature in a BVH file may be different from the scale of the armature of an MMD model.
When you import a BVH animation into Blender, an "Import BVH" options panel appears at the lower left. In Blender's Import BVH options panel, beside the word "Scale", input the Scale that you want. The information on this page can give you some idea of how you may need to calculate the correct scaling for your imported BVH animation:hogarth-mmd.deviantart.com/jou…
When you convert a DAZ/Poser BVH animation to VMD, you can input 1/7 as the Scale value and 1/7 is an adequate approximation. Blender automaticallly converts an inputted fraction to a decimal number.
4. A BVH animation may have a different frame rate than the normal frame rete of a VMD animation, which is 30 FPS (30 frames per second). Before you import a BVH animation into Blender, set the frame rate of your scene to 30 FPS (under the Render tab of Blender's Properties Window.)
When you import a BVH animation into Blender, an "Import BVH" options panel appears at the lower left. In Blender's Import BVH options panel, enable the ScaleFPS option.
5. You need the names of bones in your BVH armature animation to be the same as the names of the bones in the character who you are trying to animate. So if you want to animate MMD characters, you will need to rename the bones from your BVH animation to MMD Japanese bone names.
Here is the download link to my bones renaming Blender add-on:github.com/Hogarth-MMD/bones_r…
My journal entry about this Bones renamer add-on is here:Bones renamer add-on
6. The rest pose of the armature in a BVH animation may be different than the rest pose of an MMD model. In the rest pose of the armatures of most BVH files, the arms of the character are outstretched at a 90 degree angle from its body in a T-pose. The standard rest pose for an MMD armature is an A-pose, with the character's arms being rotated downwards at an approximately 45 degree angle.
Before you export the animation to VMD, you need to create an A-Pose. In the first frame of the animation, in Blender's pose mode, change the arms pose from a T-pose to an A-pose, by rotating the character's left arm 45 degrees, and rotating the character's right arm -45 degrees. When you export the animation to a VMD file, a panel of VMD export options appears on the bottom left side of Blender. Enable this VMD export option: "Treat Current Pose as Rest Pose".
7. A BVH animation will almost never animate MMD leg and foot IK bones. To solve that problem, you will need to turn off the IK of all 4 leg and foot IK bones of your character in MikuMikuDance. Import a .pmd or .pmx model into MikuMikuDance. Turn off the IK of all 4 leg and toe IK bones. Remember to click "Register" after turning off the IK of each bone. The controls for turning off the IK of a model are in the "model manipulation" area at the bottom left of MikuMikuDance.
8. The armature of a BVH animation may have a height above the ground in its rest pose which is different from the height above the ground of an MMD model in its rest pose. The best solution is to use a BVH animation in which the character's feet are on the ground in its rest pose. For example, the DAZ CMU "hip-corrected" BVH animations have the character's hip bone on the ground in its rest pose, which is bad. The DAZ CMU "hip-uncorrected" BVH animations are better for exporting to VMD because in them the character's feet are on the ground. You can check to see if the character's feet are on the ground in its rest pose in Blender by selecting the Armature and going into Edit mode. If you need to adjust the height of a character's animation in MikuMikuDance, you can do that by selecting edit(D), select all bone frame(N), edit(D), apply center position bias(B), input a change of the height(Y value) and then click OK.
9. The armature of a BVH file may have a bone for which there is no equivalent bone in an MMD model. Or an MMD model may have a bone for which there is no equivalent bone in the BVH armature. I don't know any quick, easy fix for this issue, so the resulting VMD animation may be only approximately the same as the BVH animation.Converting BVH to VMD summary of steps:
1. Download Blender.
2. Download Blender mmd_tools add-on (powroupi fork).
3. Install Blender mmd_tools add-on (by copying the mmd_tools folder into Blender's scripts/add-ons folder, then enable it in Blender's User Preferences).
4. Import a BVH file into Blender. Select File, Import, Motion Capture(.bvh).
5. Choose the correct BVH import options (see issues 2,3,4 above).
6. In addition to these BVH import options:
Enable "Update Scene Duration".
Choose "Quaternion" as the rotation type, because VMD files use Quaternion rotation.
Do not change these options away from their default value:
Update Scene FPS disabled.
Start Frame can be 0 or 1.
7. After importing the BVH animation, press '.' on the numpad of your computer keyboard to zoom the view onto the BVH armature.
8. Do a mass renaming of bone names to MMD Japanese bone names (see issue 5).
9. Create an A-Pose on your animation, if necessary(see issue 6 above). Export the VMD file from Blender with the mmd_tools add-on. Click File, Export, MikuMikuDance motion(.vmd). When you export the animation to a VMD file, a panel of VMD export options appears on the bottom left side of Blender. Enable this VMD export option: "Treat Current Pose as Rest Pose" (as explained in issue 6 above). Choose 1.0 as the Scale value. Navigate to where you want to save the exported .vmd file and click the "Export VMD file(.vmd)" button to save the .vmd file.
10. In MikuMikuDance, disable the IK for all 4 leg and foot IK bones (see issue 7 above).
11. Import the VMD file to a character in MikuMikuDance. You can mport the.vmd motion which you previously exported from Blender onto your model in MikuMikuDance and then play the animation. To import the vmd animation, either drag and drop it into MikuMikuDance or click File, Load Motion Data.
12. If you see the character floating and moving above the ground or beneath the ground, adjust the height of the animation (see issue 8 above).You can download free BVH files here:
The CMU (Carnegie Mellon University) database of 2548 free BVH files:sites.google.com/a/cgspeed.com…sites.google.com/a/cgspeed.com…
Truebones 500 free sample BVH fileswww.truebones.com/500Free.rarOther tutorial links:
If you are using Windows XP Download Blender 2.76:download.blender.org/release/B…
(or search for a tutorial about how to use the most recent version of Blender with Windows XP)
Blender reference manual English online:docs.blender.org/manual/en/dev…
Blender reference manual English download:docs.blender.org/manual/en/dev…
Download Blender MMD tools add-on (with bug fixes and feature-additions by powroupi):
Forked version of MMD tools by powroupi direct download from Github:github.com/powroupi/blender_mm…
Forked version of MMD tools by powroupi Github page:github.com/powroupi/blender_mm…
Forked version of MMD tools by powroupi issues(bug reports):github.com/powroupi/blender_mm…