powroupi / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.83k stars 277 forks source link

some animation issues #223

Open Mejax opened 5 years ago

Mejax commented 5 years ago

so here it goes, after converting an idolmaster CGSS model with bones to pmx then importing this pmx file and a vmd (dance anim fbx converted from imas cgss motion file) and playing it in blender, the animation looks like a mess. however importing the original model fbx exported from asset studio fork of perfare, and then importing the vmd works fine. my guess is that something is happening during the pmx export that causes the vmd unable to recognize the bones (or whatever) correctly resulting to a twisted, incorrect animations. but i am not a pro on that matter so hoping those masters here will teach me if i am doing something wrong or what.

files.zip files i used are here. contents are the fbx file of the body model (with bones) and the pmx file of this model, and the vmd basically the animation.

sorry for poor explanation. to recreate the issue, open blender (i use 2.79), import the fbx (i strongly suggest to adjust the scale to 50 since the model is kinda small forgot to scale it during export to fbx in asset studio (perfare)), and then import the vmd, then play the anim... you will see that the anim shows correctly. but after exporting the same fbx to pmx, make new project (ctrlN), reimport the pmx, then use the said vmd, the anim becomes messed up.

Mejax commented 5 years ago

New Canvas 1st image shows fbx+vmd =correct anim 2nd image shows pmx+vmd = twisted messed up, anim

and as indicated, both images are on the same frame. that is why i am guessing, the vmd export is correct, but the pmx export is messed up somewhere during the export.

powroupi commented 5 years ago

Thank you for reporting this issue. :smile:

Currently, the VMD/VPD importer/exporter are using Object space of Armature object, so you need to find out correct Rest/Base pose and Size.

To apply the VMD motiongoin.vmd on the FBX md_body2006_hq.fbx:

  1. import FBX md_body2006_hq.fbx, import scale 50
  2. select FBX Armature, import VMD motiongoin.vmd, import scale 1

To apply the VMD motiongoin.vmd on the PMX sfbody.pmx properly using mmd_tools: (step 2 & 5 can be skipped)

  1. import PMX sfbody.pmx, import scale 1
  2. select PMX Sfbody, Rotate X 90 degrees, Scale (XYZ) 0.5 (in order to match the Transform of FBX Armature)
  3. select PMX Sfbody_arm, go to Pose mode, select first bone md_body2006_hq, Rotate X -90 degrees, then select root bone Root, go to Edit mode, disable Connected under Relations panel of Bone properties tab, (it should be disconnected if you export FBX to PMX using latest mmd_tools), go back to Pose mode or Object mode
  4. import VMD motiongoin.vmd, import scale 0.5, enable Treat Current Pose as Rest Pose
  5. select PMX Sfbody, Alt-R to reset Rotation, Alt-S to reset Scale
  6. select PMX Sfbody_arm, go to Pose mode, select first bone md_body2006_hq, Alt-R to reset Rotation

Export a new VMD in order to use the motion on MMD:

  1. change Start frame to 6 (if you imported VMD with default Margin 5)
  2. select PMX Sfbody_arm, export VMD for_mmd.vmd, enable Use Frame Range to cut unwanted frames