UuuNyaa / blender_mmd_tools

MMD Tools is a blender addon for importing/exporting Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.94k stars 92 forks source link

Messy and uncontrollable normals at sharp edges #99

Open WRtux opened 1 year ago

WRtux commented 1 year ago

I tried importing a MMD model that has some sharp edges (mainly on the hair), and it looks weird. Preview

It seems that the normals of the vertices on sharp edges are arbitrarily selected, instead of using the ones at the right side. And the affected surfaces will flash when adjusting the model. Moreover, re-calculating normals does not make sense and affects surfaces not selected. Maybe the internal data is corrupt. Corrupt normals

The problem may sound like #181 in powroupi/blender_mmd_tools, but I've checked it in PMX Editor and there are no invalid normals, only sharp edges that are valid and better to be kept. PMX Editor

I have tried importing the model on both Blender 3.5.1 and 3.3 LTS and the problem persists. I believe this is the addon's problem, as importing the OBJ file converted from the model works well. I guess the addon may have wrongly treated the vertices at one place as the same.
The points on sharp edges are just multiple vertices with the same position and different normal vectors. Vertices Model imported from OBJ file: OBJ

WRtux commented 1 year ago

Find that selecting "remove doubles" when importing model can get most of the normals right, but the problem still exists at some points.

UuuNyaa commented 11 months ago

Thank you for the report! :grinning: Can you share the .pmx file with me to reproduce the problem?

WRtux commented 11 months ago

I'm afraid I can't because the author disallows that. But you can find and download it here.

UuuNyaa commented 11 months ago

@WRtux I adjusted the settings on import to work around the problem. I will look into the difference in behavior with and without Remove Doubles some more.

https://github.com/UuuNyaa/blender_mmd_tools/assets/70152495/3da6cd0b-c01e-4caf-9cb2-04087e0b8908