meshlab
meshlab copied to clipboard
Per-Vertex Geometric Function - weird behaviour when using "preview"
Dear Meshlab team,
I am using the (very cool) Per-Vertex Geometric Function to inflate a mesh by a precise factor. I for instance use the following functions: x + 0.05 * nx y + 0.05 * ny z + 0.05 * nz When I enter these functions, and click on Preview once, I get one result (see left screen), which is applied when I then hit 'Apply'. But if I do any other operation before applying (which could be just unclick and then reclick the Preview), I get a very different (inconcistent) result (see right screen).
I use the last version (2022.02) under Windows 10 Pro.
...and thank you so much for this fantastic program!
All the best,
Eli
I can confirm the issue, thanks for reporting. It is a problem of the "preview" feature that in these cases does not work as expected, the filter works fine.
I believe I'm running into this same issue when invoking the Per-Vertex Geometric Function filter from within pymeshlab. But it sounds like it is an issue with core Meshlab, not pymeshlab. For example, here is a side-by-side comparison of the results when I attempt a per-vertex geometric displacement with x=x, y=y+ny, z=z+nz
in Meshlab (left) and with a pymeshlab script (right):
EDIT: It appears to be related to the normals not being, well, normalized 😅 If I change the pymeshlab script to x=x, y=y+ny/sqrt(nx^2+ny^2+nz^2), z=z+nz/sqrt(nx^2+ny^2+nz^2)
, then the output looks correct.