Created by: portnov
This node moves vertices of the input mesh, in order to make it more "relaxed", i.e. for mesh elements to have more even distribution in some sense. There are several algorithms supported, each of which has different definition of what "relaxed" is:
- Lloyd-based algorithm. This is created after well-known Lloyd algorithm. For each vertex, find centers of all incident faces, and then find the average of those points; this will be the new location of the vertex. Effectively, this algorithm tries to make each face as close to circle as possible. This algorithm shows it's best for meshes that consist of Tris.
- Edge lengths. Scale each edge up or down, trying to make all edges of the same length. Target edge length can be minimum, maximum or average of all lengths of edges of the source mesh.
- Face areas. Scale each face up or down, trying to make all faces of the same area. Target face area can be minimum, maximum or average of all areas of faces of the source mes.
These algorithms can change the overall shape of the mesh a lot. In order to try to preserve original shape of the mesh at least partially, the following methods are supported:
- "Linear" method is supported for Lloyd algorithm only. When the algorithm has found the new location of the vertex, put it at the same distance from the plane where centers of incident faces lie, as the original vertex was. This method can be slow for large meshes.
- "Tangent": move vertices along tangent planes of original vertexes only (i.e. perpendicular to vertex normal).
- "BVH": use BVH tree to find the nearest point to the newly calculated vertex on the original mesh.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.