Pherakki / Blender-Tools-for-DSCS

This repository provides a work-in-progress addon for Blender 2.8 that can (to some degree) import model files from the PC version of Digimon Story: Cyber Sleuth. It provides new options in File > Import and File > Export named "DSCS Model", which should be pointed towards 'name' files in the game data. The file format is mostly understood; but some bugs remain and there are some Blender issues yet to be understood. Also has experimental support for the PS4 version, and for Megido72.
MIT License
24 stars 5 forks source link

Vertex normals misbehave #4

Closed Pherakki closed 3 years ago

Pherakki commented 3 years ago

Smooth shading is broken when the models animate. If Blender recalculates the normals, they are totally wrong - probably a geometry issue?

Cause unknown.

Pherakki commented 3 years ago

This is an import issue. The file format stores a VBO that presumably gets directly uploaded to the GPU via OpenGL. That means that any vertices connected to faces with hard shading are split into multiple vertices in the VBO. If this is naively imported to Blender, this results in lots of disconnected faces which snap between smooth and hard shading during animation when auto-smooth is turned on. The solution is to merge vertices at the same position whilst preserving all faces attached to those vertices.

This solution seems to work, and this issue will be closed after the commits are pushed and merged into master.