09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Split normals not supported #3

Closed ghost closed 9 years ago

ghost commented 10 years ago

YABEE doesn't support a feature which I was told in the blender chat is named "split normals".

To test, put up a sphere and then select all edges and set them to smooth, then pick a single pair of connected edges and set to sharp, then enable Object Data > Normals > Auto Smoothing. Sadly, this result won't be exported properly unless you use an edge split modifier - however, that is impossible for export when any shape keys are in the model due to blender limitations I don't understand.

ghost commented 10 years ago

Reproducability:

Apparently, it works as soon as it can be done without splitting normals/double normals. So larger blocks of flat faces will generally work (except for the outside border), and single sharp edge lines never will. So the implementation is only partial, and would need to be expanded to actually do double normals/vertices for proper behavior in all cases.

ghost commented 10 years ago

.blend file reproducing the problem for me in blender 2.71: http://www.homeofjones.de/temp/sphere.blend (compare 3d preview to pview with lighting (press L) result)

ghost commented 10 years ago

Real world use case:

If you ever try to get seams on clothing to work, this is the best result that appears to be currently possible: http://i.imgur.com/lTnAyIu.png obviously, those weird vertical stripes aren't really desirable.

09th commented 9 years ago

Partially fixed. If I understand correctly, full support is not possible. It depends from the internal Blender "Autosmooth" mechanism, which not realised in Panda. We can split normals in vertex, but it looks not exactly like in Blender.