Generates new versions of 3D meshes (.obj, .ply or .stl) in a selected directory. The vertex count in the new meshes is reduced to become similar to the smallest vertex count amongst the selected meshes. Vertices in the new meshes are uniformly distributed. Meshes are automatically exported in polygon file format (.ply). reMesh is useful for studies that want to apply whole-mesh analyses (e.g. Generalized Procrustes Surface Analysis from Pomidor et al. 2016) to a set of 3D meshes that have very large vertex counts, or have large disparity in vertex counts between meshes.

reMesh(dirpath, scale = 1)

Arguments

dirpath

the directory path where two or 3D meshes with .obj, .ply, or .stl extensions will be found.

scale

a proportion for specifying how the vertex counts in the new versions of the 3D meshes should be scaled relative to the smallest vertex count amongst the 3D meshes. For scale = 1 (default), all new versions of meshes will have vertex counts that are similar to the vertex count of the smallest mesh.

Details

reMesh can be used for 3D mesh preprocessing before computationally demanding analyses. reMesh is a wrapper for vcgImport, vcgMeshres, vcgPlyWrite and vcgQEdecim from the Rvcg package (Schlager, 2017).

References

Pomidor BJ, Makedonska J, Slice DE. 2016. A landmark-free method for three-dimensional shape analysis. PLoS One 11: e0150368 https://doi.org/10.1371/journal.pone.0150368

Schlager S. 2017. Morpho and Rvcg–shape analysis in R. In Zheng G, Li S, Székely (eds.) Statistical shape and deformation analysis. Academic Press, London. Pp. 217–256.