powroupi / blender_mmd_tools

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

Blender weight paint result not corrently exported to pmx file #335

Closed Vwings closed 2 years ago

Vwings commented 3 years ago

I have a model weight painted in blender, but after exported to pmx file, part of the weight of the model is not very correct. I have tried:

But it doesn't work

Blender: image1

PMX Editor(Exported from Blender): image2

nagadomi commented 3 years ago

I guess the model is using SDEF weights (one of the skinning algorithms in PMX). SDEF weights cannot be edited in Blender. If you want to make just the outfit in Blender, enable the SDEF driver(3DView > Misc > MMD SDEF Driver > Bind) for the body mesh in Blender and make it fit. However, with the BDEF4 weights, it is difficult to make outfits that fit closely to the body. There are also ways to do this, such as making the material of the body inside the outfit transparent.

Vwings commented 3 years ago

I guess the model is using SDEF weights (one of the skinning algorithms in PMX). SDEF weights cannot be edited in Blender. If you want to make just the outfit in Blender, enable the SDEF driver(3DView > Misc > MMD SDEF Driver > Bind) for the body mesh in Blender and make it fit. However, with the BDEF4 weights, it is difficult to make outfits that fit closely to the body. There are also ways to do this, such as making the material of the body inside the outfit transparent.

Thanks for your reply. After enable SDEF driver,the body object looks the same as in PMX Editor, but it's hard to make clothes fit the body by weight painting. I have also tried to use Transfer mesh data -> vertex groups to copy all vertex groups to clothes, still not working. Finally I found two ways to resolve this in PMX Editor:


It looks like copy vertex groups is not enough. I noticed meshes from mmd have some SDEF shape keys:mmd_sdef_c, mmd_sdef_r0, mmd_sdef_r1. mmd_sdef_mask cannot work without sdef data in these shape keys. I wonder if it's possible to convert mesh verties to SDEF in blender when exporting?

nagadomi commented 3 years ago

If the imported model has SDEF weights, they will be stored in mmd_sdef_c, mmd_sdef_r0, and mmd_sdef_r1 and restored as SDEF weights when exporting. However, creating and editing SDEF weights is not possible with the current mmd_tools. Related to: latter half of #162