ousttrue / pymeshio

3d model reader/writer for python
http://pypi.python.org/pypi/pymeshio/
92 stars 27 forks source link

Problem Report!! MMD crash with exported Model! #22

Open huskyfish14 opened 9 years ago

huskyfish14 commented 9 years ago

Hello!! I am currently trying to export a model to MMD, but something is making MMD crash.

Exporting seems to go as planned, because the model opens in PMX editor just fine, all morphs work, materials are working. But for some reason it crashes MMD when trying to open.

I got the model to open in MMD, but only after exporting from PMX editor to PMD format, then opening and saving as PMX again. This however breaks the weights of the model, making it useless.

Here is a test model i prepared for u to test yourself http://www.mediafire.com/download/l7rcn333leas55c/mmd+crash+report.rar

This problem isnt occuring with just this model, it happens with any model i export. The issue might be overlooked by anyone who is just exporting a mesh, as the problem with the weights wouldnt matter. But i export with the armature as well, so its important that the weights remain intact.

Hopefully you can find the problem with the PMX export model! Good luck!

Hogarth-MMD commented 9 years ago

Pymeshio usually works better with .pmd models than with .pmx models. And because of a pymeshio bug, a model which has a mother bone does not export the mother bone correctly. You can puzzle solve the problems with your model if you teach yourself how to do model error checking in PMD editor. Here is your model's error report from PMD editor, translated by Google translate: ■ system

Additional UV number: 0 | ... ○ OK

■ Model Information

Model Name: Blender export | ... ○ OK

Comments: (***) | ... ○ OK

■ vertex

Unauthorized normal number:! 111 | ... × Bad please do the modification of fraud normal.

Incorrect number of wait cycles: 0 | ... ○ OK

Unset SDEF value: 0 | ... ○ OK

SDEF vertex fraud bone reference number: 0 | ... ○ OK

Alone (surface non-reference) the number of vertices: 0 | ... ○ OK

■ surface

Incorrect reference number of vertices: 0 | ... ○ OK

Non-front number: 0 | ... ○ OK

Duplicate surface number: 0 | ... ○ OK

■ Material

Material name not set: 0 | ... ○ OK

Material name duplication number: 0 | ... ○ OK

The material does not contain a surface: 0 | ... ○ OK

Texture invalid Material:! 12 | ... × Bad does not exist texture files of the following material.

(0,1,2,3,4,6,9,10,11,12,13,14)

Sphere texture invalid material: 0 | ... ○ OK

Sphere setting invalid material: 0 | ... ○ OK

Toon texture invalid material: 0 | ... ○ OK

Surface total number of material: 5057 | ... ○ OK

■ Bone

Vaughan number: 137 | ... ○ OK

Bone names not set: 0 | ... ○ OK

Bone names overlap number: 0 | ... ○ OK

Circular reference:! 1 | ... × Bad following bone is bone structure has become a circular reference.

(0)

Series order confirmation: 8 | ... △ following bone will be later than the deformation order of the parent the child (please check bone order and the deformation order).

(1,5,10,14,15,36,40,41)

Parent reference illegal:! 1 | ... × Bad is incorrect parent bone set the following bone.

(0)

Display destination see incorrect: 0 | ... ○ OK

Grant parent reference fraud: 0 | ... ○ OK

IKTarget see fraud: 0 | ... ○ OK

IKLink see fraud: 0 | ... ○ OK

■ morph

Morph name not set: 0 | ... ○ OK

Morph name duplication number: 0 | ... ○ OK

Morph offset reference fraud: 0 | ... ○ OK

■ display frame

Frame name not set: 0 | ... ○ OK

Frame name duplication number: 0 | ... ○ OK

Unregistered bone: 137 | ... △ is not registered to the display frame below the bone.

(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 , 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49 , 50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74 , 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136 )

Unregistered Morph: 47 | ... △ is not registered to the display frame following morph.

(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 , 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46)

Duplicate registration Vaughan: 0 | ... ○ OK

Duplicate registration morph: 0 | ... ○ OK

Registration bone reference fraud: 0 | ... ○ OK

Registration morph see fraud: 0 | ... ○ OK

Look frame registration: ... ○ OK

System frame situation: ... ○ OK

■ rigid body

Rigid body name not set: 0 | ... ○ OK

Rigid body name duplication number: 0 | ... ○ OK

Bone see fraud: 0 | ... ○ OK

■ Joint

Joint name not set: 0 | ... ○ OK

Joint name duplication number: 0 | ... ○ OK

A rigid body reference fraud: 0 | ... ○ OK

Rigid body B reference fraud: 0 | ... ○ OK

huskyfish14 commented 9 years ago

Pymeshio seems to export everything just fine into PMX editor for me, the problem is with the crash that happens when opened in MMD. Do you think that by fixing these errors it will open correctly without having to go thru PMD editor? Because when exporting to PMD format, all the weights of the model break, making it unusable. I think i read somewhere that PMD format doesnt support weights shared by more than 2 bones, but that may not be true. My model's weights are pretty much shared by 3 or more bones, so this wont do at all, the only option for me is PMX format.

Now for the errors:

"Bad please do the modification of fraud normal" What does it mean by this?

"Bad following bone is bone structure has become a circular reference." Also have no idea what this means.

Can you explain the errors to me so that i can try fixing them? Thanks for the help so far!

Hogarth-MMD commented 9 years ago

'Do you think that by fixing these errors it will open correctly without having to go thru PMD editor? ' Pymeshio still has bugs and until those are fixed, you usually need to do some manual correction of your model in PMD editor after exporting the model from Blender.

Hogarth-MMD commented 9 years ago

"I think i read somewhere that PMD format doesnt support weights shared by more than 2 bones, but that may not be true. My model's weights are pretty much shared by 3 or more bones, so this wont do at all, the only option for me is PMX format."

That is exactly correct. The .pmd model format limits a vertex to be weighted to no more than 2 bones. The .pmx file format allows you to rig and weight a vertex in only 1 of 4 possible ways: BDEF1 - weighted to one bone BDEF2 - weighted to two bones BDEF4 - weighted to four bones SDEF - weighted to two bones with a spherical constraint

ousttrue commented 9 years ago

I need blend as well as pmx to investigate the problem.

Hogarth-MMD commented 9 years ago

I found this excellent tutorial which teaches you how to do model error checking in PMD editor and how to make the corrections: PMX Validation: Every modeler should know and do Googleが翻訳します: 私はモデルPMDエディタでエラーチェックし、どのように修正を行うを行う方法を教え、この優れたチュートリアルが見つかりました: PMX検証:すべてのモデラーが知っていると行う必要があります http://permayuyuko.deviantart.com/journal/PMX-Validation-Every-modeler-should-know-and-do-469367980

huskyfish14 commented 9 years ago

Thanks hogarth, I will definitely use this to fix any errors with my model and see if the problem persists.

To ousttrue, I will put together a pmx and blend pair and upload then for u to look at later today!

Thanks for all the help!

Hogarth-MMD commented 9 years ago

Are you sure that this is really an export problem? Do you get any error message when you import a model with pymeshio?

huskyfish14 commented 9 years ago

Sometimes it imports perfectly fine, sometimes it gives an error message