Shop Forum More Submit  Join Login
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++:
scripts\addons\io_anim_bvh\import_bvh.py

Change line 97 from:
file = open(file_path, 'rU')

to:
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:
Target Armature.
Update Scene FPS disabled.
Loop 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 files
www.truebones.com/500Free.rar


Other tutorial links:

Download Blender:
www.blender.org/download/

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…
Add a Comment:
 
:iconnalune1877:
Nalune1877 Featured By Owner Apr 22, 2018
I don't understand this tutorial. I'm not very good in english. Can you please help me in private (like skype) please! 
Reply
:iconmaxofp2p:
maxofp2p Featured By Owner Mar 15, 2018
I was download MMD tools but any Export option is not avalible. 
Reply
:iconhogarth-mmd:
Hogarth-MMD Featured By Owner Mar 15, 2018
Notes about installing mmd_tools:

You need to open Blender AFTER installing a new add-on. Blender detects a new add-on when it is starting up. One of the most common errors that people make when installing a Blender add-on is failing to restart Blender.

Also you cannot install mmd_tools directly from the .zip file. You need to copy the mmd_tools directory into Blender's scripts/addons directory.

Also when you are installing a more recent version of an add-on, you may need to disable it, and then re-enable it, in Blender user preferences. That step is not always necessary for every add-on. Some add-ons are programmed to reload themselves automatically.

Another mistake that a few people make is downloading the old version of mmd_tools by sugiany, which is no longer being developed by sugiany. The powroupi fork of mmd_tools is the version of mmd_tools which you need to download:

github.com/powroupi/blender_mm…

Direct download link:
github.com/powroupi/blender_mm…
Reply
:iconduracull:
duracull Featured By Owner Edited Mar 10, 2018
HEY! HELP ME! THERE IS NOT "EXPORT VMD FILE". THERE IS ONLY "IMPORT VMD FILE" PLEASE HELP ME
Reply
:iconduracull:
duracull Featured By Owner Mar 10, 2018
Oh sorry! I solved this problem but I can't rename bone names please help me!
Reply
:iconhogarth-mmd:
Hogarth-MMD Featured By Owner Edited Mar 10, 2018
If you want help, you need to give me more information. Did you succeed in installing my Bones renamer add-on? After installing it, mass renaming bones is very simple. Just select the source and destination armature types and click the button, with the armature selected to be the active object.

Bones renamer add-on
Reply
:iconmaxofp2p:
maxofp2p Featured By Owner Mar 6, 2018
I was try install MMD tools but when i activated it in user  preferences (add-ons section) got all format withot vmd export/import in blender.  New version not suported ?
Reply
:iconhogarth-mmd:
Hogarth-MMD Featured By Owner Edited Mar 6, 2018
As far as I know, the most recent version of mmd_tools (powroupi fork) is working fine. I don't know why you are having a problem with it.

You need to open Blender AFTER installing a new add-on. Blender detects a new add-on when it is starting up. One of the most common errors that people make when installing a Blender add-on is failing to restart Blender.

Also you cannot install mmd_tools directly from the .zip file. You need to copy the mmd_tools directory into Blender's scripts/addons directory.

Also when you are installing a more recent version of an add-on, you may need to disable it, and then re-enable it, in Blender user preferences. That step is not always necessary for every add-on. Some add-ons are programmed to reload themselves automatically.

Another mistake that a few people make is downloading the old version of mmd_tools by sugiany, which is no longer being developed by sugiany. The powroupi fork of mmd_tools is the version of mmd_tools which you need to download:

github.com/powroupi/blender_mm…

Direct download link:
github.com/powroupi/blender_mm…
Reply
:iconduracull:
duracull Featured By Owner Feb 18, 2018
can you make a video tutorial?
Reply
:iconvadoka:
Vadoka Featured By Owner Jan 28, 2018  Student Digital Artist
вы можете сделать видео-урок? Я просто не понимаю(
Reply
:iconhogarth-mmd:
Hogarth-MMD Featured By Owner Jan 29, 2018
can you make a video lesson? I just do not understand(

No, sorry. :-(
Reply
Add a Comment:
 
×

:iconhogarth-mmd: More from Hogarth-MMD





Details

Submitted on
September 24, 2017
Link
Thumb

Stats

Views
7,271 (27 today)
Favourites
33 (who?)
Comments
12
×