Auto LOD fixes and improvements

* Fixed LODs for shadow meshes.
* Added a merging step before simplification. This helps with tesselated
  meshes that were previously left untouched. The angle difference at
  wich edges ar considered "hard" can be tweaked as an import setting.
* LODs will now start with the highest decimation possible and keep
  doubling (approximately) the number of triangles from there. This
  makes sure that very low triangle counts are included when possible.
* Given more weight to normal preservation.
* Modified MeshOptimizer to report distance-based error instead of
  including attributes in the reported metrics.
* Added attribute transference between the original mesh and the
  various LODs. Right now only normals are taken into account,
  but it could be expanded to other attributes in the future.
This commit is contained in:
jfons 2021-09-07 17:44:50 +02:00
parent 10801b90f9
commit 9e1810695c
15 changed files with 1045 additions and 100 deletions

View file

@ -30,9 +30,9 @@
#ifdef TOOLS_ENABLED
#include "core/io/image.h"
#include "core/object/object.h"
#include "scene/3d/lightmapper.h"
#include "scene/resources/mesh.h"
#include <embree3/rtcore.h>