[Addon] Mesh Fairing

This addon provides a new smoothing tool. Please, see GitHub (link) for download instructions and documentation.

25 Likes

Thank you, this is brilliant! The amount of times I had to re-use generic topology without modifying it, smoothing out excess fingers and such in zbrush… This is going to come in real handy.

3 Likes

Looks like a great tool… I’m sure I’ll have use for it in future projects. Thanks!

Very impressive. Can you recommend some resources (book, online course) for understanding math behind the addon (I mean calc_gaussian_curvature, calc_mean_curvature etc)? I could never find easy lecture about those subjects…

1 Like

Awesome! Nice to see that someone is already finding a use for this addon.

1 Like

That first gif is brilliant.
Thanks for your work also. Another smoothing tool is good to have.

1 Like

Oops! Those curvature functions aren’t actually used in this addon. They are for another weighting/masking tool I’m putting together. No harm in having them included I suppose.

As for good learning resources for computational geometry, I’m sorry to say that I find them every bit as hard to come by. All treatments of the subject assume proficiency in vector calculus and discrete mathematics. I learn by struggling my way through the material, be it a white paper or lecture slides. Whenever I encounter some symbol/operation that I’m not comfortable with, I go down another rabbit hole of knowledge. It’s slow going but extremely rewarding. I certainly learned a lot doing this project.

Anyways, here’s what I consider a good explanation of mesh curvature: link

Best wishes to you in expanding your knowledge!

Edit: Another thing worth mentioning is that understanding something from a mathematical level and knowing how to implement it in code are two very different things. Try to find code examples that do something similar to what you want to achieve. For example, check out CGAL.

1 Like

Without doubt super coding and we will be a succes (we can use good smoothing algorithm), but I think most blender users get frustrated trying to install scipy.

Update: ah… it works without scipy as well. And good idea to make shapekeys as shown in documentation

" but I think most blender users get frustrated trying to install scipy. "
Yeah… I agree, but yes, it works without scipy too. :slight_smile:

This will make working with more complex single mesh rigs way less painful! Really looking forward to your weighting/masking tool.

14 Likes

This is most excellent! Thank you.

Best way to get up to speed on the latest and greatest in this field is probably read through the https://libigl.github.io/tutorial/

Most of this stuff seems to boil down to Laplace-Beltrami operator and a solid understanding of both linear algebra and partial differential equations. Which I confess, is a bit of a voodoo for me too.

1 Like

@Peetie & @COB-666 - Yep, it works with NumPy too, though slower and less reliable. Did the “Install SciPy” button in the preferences section not work for either of you?

@ambi - Thanks for sharing the libigl tutorial. It looks like an incredible resource that somehow managed to escape my notice.

No didn’t work. So I tried manually as described on Blender exchange (the link you gave), but the instruction were confusing for me. I also have Python installed in Windows and was able to install SciPy systemwide, but not for Blender. Well, could find it out if I had more time. But Mesh Fairing works nice. (Therefore made an article on another website. Can’t post it here though because some see that as spamm).

https://igl.ethz.ch/projects/Laplacian-mesh-processing/STAR/STAR-Laplacian-mesh-processing.pdf is also very useful

As is http://brickisland.net/DDGSpring2019/ by https://www.cs.cmu.edu/~kmcrane/

2 Likes

Here’s what worked for me:

[Path to Directory]\\2.80\\python\\bin\\python.EXE -m pip install --user --no-deps scipy

If you get a No module named pip message, run this and try again:

[Path to Directory]\\2.80\\python\\bin\\python.EXE -m ensurepip

3 Likes

I’ve reworked the Python module installer to both leverage “ensurepip” and check for executable permissions. Thanks for the tip!

Doing so, I was able to install SciPy, but my Windows Blender build crashed. Upon restarting the application, however, SciPy was installed and usable for mesh fairing.

No issues on my end with Linux Blender.

scipy wasn’t installing for me, and no luck following the alternate instructions. However, doing as @ThatAsherGuy posted (-m ensurepip, except for my own build on linux it’s python3.7m instead of python.exe) made the install button inside the addon’s preferences work, and scipy’s installed now. :+1:

1 Like

After torturing myself with cmd-lines for hours in vain, I found a clever advice somewhere in the net:

Download Anaconda from

Don’t overlook the other system versions above the big fat line “Anaconda 2019.03 for macOS Install”.

Download your version for Python 3.7 and install it.

Go to the directory where you installed Anaconda to,

If you let it, it installs itself in Windows to

c:\Users\xxx\Anaconda3 (where xxx is your username) - go there and

open the folder c:\Users\xxx\Anaconda3\Lib\site-packages\

There you find the folders “scipy” and, if you havn’t got it already, “numpy”.

Now open your Blender-Python-Folder e. g.

C:\Program Files\Blender\2.80\python\lib\site-packages\ (same like in Anaconda)

and copy the folders “numpy” resp. “scipy” or both from Anaconda into this folder “site-packages” of Blender Python.

Then open Preferences -->Addons -->Mesh Fairing and klick on Install for numpy, if it isn’t already and on Install for scipy - after that is done, the install request in Mesh Fairing disappears.

You can keep Anaconda for further use, but if you have not much space on Drive C:, you can uninstall it, cause it eats more than half a gigabyte. It doesn’t affect your Blender-Python installation.

On Linux and McOs same procedure, but pathes you know better than I.

1 Like

Very nice add-on, thank you, @Umdee. :+1:

In the Blender 2.81 alpha master builds there’s a lot of crashes in Sculpt Mode when a mask is used. SciPy is installed.

Also (in 2.81 alpha), the options don’t appear when you activate it in Edit Mode using Control + V ➔ Fair Vertices, only if you activate it from the UI drop-down menu.

I know one shouldn’t expect support for alpha versions, but I’d still thought to mention this, as I’d love to use Mesh Fairing.