BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.8k stars 122 forks source link

After running "remesh_smooth", the new mesh did not save the vertex colors of the old mesh. #157

Closed skylinestars closed 1 week ago

skylinestars commented 2 months ago

Excuse me,After running "remesh_smooth", the new mesh did not save the vertex colors of the old mesh. How should I calculate the vertex colors of the new mesh.

BrunoLevy commented 2 months ago

Yes, the result of remesh smooth is a mesh that is completely different from the original mesh, so it does not have the initial attributes. You will have to transfer the attributes, which you can do by creating an AABB (axis-aligned bounding box tree) and find the nearest triangle of the initial mesh for each vertex of the remesh, then interpolate the colors from the mesh. Examples of such attribute transfers are in geogram/mesh/mesh_baking.cpp