Blender recently added support for custom vertex normals, although it doesn’t have a lot of good tools dedicated to editing them. I decided to make a tool that allows quick smoothing of vertex normals based on the current selection so that I can use it to improve the shading of my game models.
- New smoothing algorithm. Face Weighted Normals - works on selections in edit mode and on everything in object mode.
- Set Direction tool works properly on vertex and edge selections.
- Set Direction tool now has an option to keep normals from splitting at selection edges.
- Slight UI Panel cleanup
- Flip custom normals
- Harden selected faces (edge and vertex harden to come later)
- Set normals of selected faces using direction widget (in redo panel only for now… sorry)
- mask by faces only disabled by default
- Automatically enable autosmooth
- Never show when not in mesh edit mode
- Can smooth by selected edges
- Can smooth by selected vertices
- Can set tool option to only use face selection regardless of selection mode
- Small UI that appears in Tools > Shading / UVs in edit mode (not very useful currently…)
- Code cleanup
Available in a github repo: https://github.com/andyp123/blender_mesh_masked_smooth_normals
extract the .py file from this zip and install using Blender’s addon install from script function.
- With a mesh in edit mode select the faces that you’d like to smooth, making sure that any you don’t want to influence the result are not selected.
- Press [space] type in ‘masked soften normals’ and select it to run the script.
Alternatively, open the Shading / UVs panel and there is a button that will do the same thing.
If you want to restore normal blobby smooth shading, then either select all faces and run the script as above, or disable autosmooth.
I hope this is of use to someone other than myself, and if so, I’ll try and fix any bugs that crop up, and maybe add some new features. Note that there are already a couple of more complex normal editing tools that are much better for people that want fine control over the normals. If these tools add a similar feature to Masked Smooth Normals, then I’ll probably stop working on it.