Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only triangulate n-gons when necessary for calc_tangents (godotengine…
…#379) * Export from mesh.loop_triangles instead of mesh.polygons This shouldn't change anything atm since the mesh is triangulated beforehand, but this will allow us a non-triangulated mesh in the future, which avoids problems where the mesh triangulation is wrong; loop_triangles is always the "true" triangulation. * Use mesh.loop_triangles for concave_shape No longer need to ask the mesh converter to triangulate. * Triangulate meshes if necessary for tangents This means it is no longer required to ask for triangulation if asking for tangents. * Remove triangulate argument; now only triangulate for tangents It is now as if it were always False. Triangulation will only occur if needed for calc_tangents. This was only True in mesh.py. Now that it is False there, triangulate_mesh will be skipped for any meshes without (>4)-gons, which solves issues of bad triangulation/damaged normals for these meshes. * Only triangulate n-gons when we can't calc_tangents This should confine damage caused by triangulation to n-gons only. * Warn when triangulating that exported n-gons may look wrong * Test: make update-examples
- Loading branch information