Skip to content

Mesh normals aren't correct #38

@MateuszRe

Description

@MateuszRe

Hey again, i noticed that the generated normals arent correct (left is how it looks, right is how it should look for a flat surface):
normals

Its caused by the triangles sharing vertices (which is perfectly fine when you dont need to use normals, as it reduces the vert count to minimum), i fixed it on my end by splitting the vertices on the generated mesh using this little method: https://pastebin.com/QqpVQT75
You could make it an optional thing, as it does increase vert count quite drastically (triple the amount of triangles). They can however be welded back together afterwards (but respecting the normals this time), which will still be quite a bit more than the original but that's the choice here if someone wants correct normals. I can provide you with a welding method too, although its not as clean as its part of my much older code base.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions