Looking a specific mesh smoothing algorithm

Hi all,

I’m hoping some of your can provide some suggestions regarding a mesh smoothing algorithm. Ideally, you can also reference some code I can play around with (C++ or C#).

I need it to:

  1. Preserve the original boundary as closely as possible (Laplace + HC?)
  2. Give me the ability to pass the index of node/face that should remain completely unaffected
  3. Be relatively efficient

Any ideas?

Thanks,
Charles

When you say preserve the boundary, do you mean just keep the naked vertices fixed, or are you talking about keeping the same volume?
Laplacian smoothing or zero length edge springs with a fixed boundary in kangaroo converges to exactly the same thing as Laplacian smoothing in weaverbird, but you also have the option of fixing internal vertices.
If you want to script it though, it’s also fairly simple - just iteratively moving the vertices towards the average of their neighbours.

hi Charles,

this algorithm is very rubust, efficient and has nice smoothing properties (no spikes):
If it can exclude vertex I don’t know.
https://www.cs.cmu.edu/~kmcrane/Projects/ConformalWillmoreFlow/

Here’s an example comparing Laplacian smoothing -with a simple vertex averaging script, with Weaverbird, and with Kangaroo.
As you see, they all converge to the same result, but Kangaroo is able to get there faster because of its use of momentum to accelerate convergence

smooth.gh (28.3 KB)

1 Like

I want to have the ability to keep some vertices unaffected and for the remainder of the mesh to keep the same volume. I don’t currently have access to GH but I’ll check as soon as I do.

Thanks @Konrad.Kobayashi & @DanielPiker , do you know if the code is publicly available?

It seems Leopard plugin has some features on that.


The file I posted above lets you fix individual vertices with either the Kangaroo version or the C# scripted version.

If you want to keep the same volume you can use the Volume goal in Kangaroo.
This file also includes optional vertices to fix:


image
smooth_volume_preserve.gh (12.0 KB)

1 Like