I'm trying to 'inflate' a mesh. I see that basically what I'm looking for is performed in Blender by scaling everything along the normals. Would there be a way to do this precisely (setting a precise percentage) in MeshLab?
I'm trying to 'inflate' a mesh. I see that basically what I'm looking for is performed in Blender by scaling everything along the normals. Would there be a way to do this precisely (setting a precise percentage) in MeshLab?
The technical name of the operation that you describe as 'inflate' is 'dilate', and the opposite operation is named 'erode'. I will use this mesh as input to illustrate two ways to achieve dilation in meshlab:
Meshlab has a filter named Per-Vertex Geometric Function that let to write one expression to evaluate as coordinates of vertex. You can use position, normal, colors, quality, etc... in the expression.
So you can add the normal to coordinates to "inflate" the mesh, with those expression
x = x + nx
y = y + ny
z = z + nz
Depending of the dimensions of your mesh, you may want to apply a weight factor in the formula as here:
x = x + 0.05 * nx
y = y + 0.05 * ny
z = z + 0.05 * nz
As you see, this work well if your input mesh is relatively smooth (there is no great changes in the normal between neighbors vertex) and can produce some auto-collision problems in concave areas (as the eyes of the lion)
A different method (slower but topologically more accurate) is using the uniform mesh resampling filter and specifying a positive offset to obtain a dilate effect (or negative to erode). The offset can be absolute or relative to bbox diagonal measure. In this case a new mesh is created to ensure there is no auto-collisions. The output accuracy depends on the value for the precision parameter you set. I suggest to activate the Clean Vertices flag.
This method works very well with concave areas, but is quite slow in comparison with displacement-along-normal method.