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.
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.
Thank you, it targeted a missing feature in Blender; do you plan to develop it more like offering something like ‘smoothing groups’ in Max?
One of the reason I have to use Max near Blender is the handling of smoothing; it would be great to step over it. I would even donate some money for implementing it somehow.
AlmaTalp: I’m not going to attempt a Max style smoothing group editor, as I actually hated that system when using Max. Blender already has a Maya-style smooth face/edge/vertex feature that should work when autosmooth is enabled, although it doesn’t seem to work when you are using custom normals, so doesn’t play nice with my script. I will next try to modify my script so that it can smooth based on sharp edges set from the Blender Shading / UVs panel.
I’m not sure actually. I was thinking about trying to add it to the specials menu and see if I can figure out how to expose it to the user prefs so you can assign your own hotkey. Blender already uses a crazy number of shortcuts and I’d rather not add more by default if I can help it. Maybe I could enable the hotkey in the addon prefs. I’ll really have to have a think about how to do it.
To be honest the problem with the crazy amount of Blender hotkeys is that Blender uses hotkeys for unnecessary things in many cases (rarely used ones). Your add-on will be an ‘always used’ one for any proper modeling process. Also it is a problem that both Toolbox and Properties Menu represents a terrible GUI design concept which is everything but not not user-friendly/informative/fast to access anything.
So hotkeys would be an alternative solution; with customizing option it would allow to replace never used ones.
Another small update today. I really need to sit down and spend some time to polish this, as the way custom normals are implemented in Blender makes doing a lot of the stuff I’d like to do more fiddly than it needs to be (would be so easy if it was pure bmesh…) and so I don’t make much progress each time I work on it I also forgot how to write python code, so I’m doing a lot of looking at Python docs on top of the Blender API docs. Still, I’ll try and make this as usable as I can little by little
Here’s what’s new in v0.0.3
Flip custom normals (based on sample code by mont29)
Harden selected faces (no edge/vertex harden atm, because it requires a lot of annoying mesh traversal I think)
Set normals of selected faces using direction widget (appears only in redo panel… sorry for being lame)
TODO:
improve functionality of harden
use hard edges to autosmooth
better control over setting specific normals
average merge split normals as average of existing custom normals (rather than just face normal average)
rename everything to make more sense and make sure language is consistent
I was looking something like this to use after automatically weighting normals. Addon that can be used to manipulate, tweak and polish larger flat and curvy hard surface areas manually more faster at once, than go one face at the time.
Looking forward for next version.
Finally Blender starts to have nice combination of addons/tools to edit custom vertex normals for different situations.
just wanted to say thanks a lot for this script, and I’m looking forward to any additional development you might do on it!
I’m the sole artist on a team of 3 working on a game, I’m using blender for block-ins and retopo.
This script has allowed me to finally take advantage of better baking workflows for my assets, and now I can all kinds of nice things with my models without ruining how they interact with the normal maps! For example here’s some WIP shots of a tiling wooden plank I’m going to reuse all over the environment in different ways:
Although I haven’t added any of the items on my TODO list, I thought I would add the face weighted normals smoothing algorithm to make it easier to quickly get acceptable results with less manual effort. This uses the area of faces around a vertex to set the influence the face will have on the smoothed normal. This means that in many cases you can get a decent smoothing by simply selecting all faces and running the new ‘Face Weighted Normals’ operator. Because of this, I enabled its use in object mode as well as edit mode.
v.0.0.4 changes
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.
p2o, therealmarkehle, raziel_henzo: Glad you found some use for the tool. I really made it for myself so that I could effectively use Blender at work where we were making a game using cell shading outline effects so the normals could not be split, but it’s good that some others have been able to benefit from it.
If anyone has any feature requests or other suggestions, please let me know in this thread and I’ll think about doing them (I can’t guarantee anything of course, but I would like ideas for further development).
Damn. I left a really stupid bug in the script that is fixed now. I didn’t test it properly until today, so sorry if anyone was using it and was inconvenienced by this issue.