Page MenuHome

Sculpt: Surface Smooth Brush

Authored by Pablo Dobarro (pablodp606) on Sat, Mar 7, 2:55 PM.
"Love" token, awarded by CobraA."Love" token, awarded by brilliant_ape."Love" token, awarded by 1D_Inc."Love" token, awarded by Brandon777."Love" token, awarded by bnzs."Doubloon" token, awarded by TheAngerSpecialist."Love" token, awarded by jmztn."Love" token, awarded by ate1."Love" token, awarded by Zino."Love" token, awarded by Maged_afra."Like" token, awarded by Constantina32."Love" token, awarded by rbx775."100" token, awarded by EAW."Yellow Medal" token, awarded by MetinSeven."Love" token, awarded by lopoIsaac."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by RodDavis."Like" token, awarded by TheRedWaxPolice.



This implements the Surface Smooth Brush, which uses the HC algorithm
from "Improved Laplacian Smoothing of Noisy Surface Meshes". Comparted
to the regular smooth brush with laplacian smooth, this brush removes
the surface while preserving the volume of the object. The smooth result
can be controlled by tweaing the original shape preservation,
displacement and iteration count.

Diff Detail

rB Blender

Event Timeline

While I am incredibly happy to see this feature in Blender, one concern I have is that it is a separate tool from the regular Smooth brush. Right now the shift modifier for all the regular brushes is reliant on the Smooth brush settings, which makes Surface Smooth being a separate brush a problem. Right now you can't simply switch out the modifier brushes reliably, so if users want to use this new feature they can't use the shift modifier to surface smooth, but just regular smooth.

I don't know what's planned for the brush management system so this might be resolved eventually, but I think it would be a good idea right now if Surface Smooth and Smooth was just one single tool on the toolbar so you could switch between the two and the shift modifier would recognise them both. Would make usability a lot stronger.

". . ."one concern I have is that it is a separate tool from the regular Smooth brush. Right now the shift modifier for all the regular brushes is reliant on the Smooth brush settings ". . ."

It is still being somewhat discussed. Though, I believe it's set.

I would rather wait to have the asset manager before trying to add something like this. This should not be a keymap option and the user should be able to choose any brush preset to use as the Shift mode, not just the default preset for the tool.
In 2.83 we are probably going to include multiple brushes per tool, so an approach like this will be confusing as you won't know which brush are you switching to.

I like the way it's going. It is a better method instead of keymaps. It will take some time.. But I believe it's worth it in the end.

Anyway, this isn't supposed to be discussed underneath this differential code. Go to Juanfran Matheu (jfmatheu)'s Differential for feedback.

This is great!

I agree with @Kenn Nyström (Frozen_Death_Knight) : it would be very convenient to be able to switch between the regular Smooth brush and this algorithm under the Smooth key (e.g. one algorithm when Shift is held down, the other when Shift is released). It would also be great if the Strength could be set for both algorithms when used with Shift.

Thanks! 👍👍

Nice to speed it's possible to have good results with such a relatively simple and fast algorithm.

If you would use this instead of the existing smooth brush most of the time, then to me it makes sense for it to just be additional settings on the existing smooth tool.


Shape preservation -> Shape Preservation

Also, match property identifier and UI name whenever possible.


coordinates -> shape?


This name and description I find hard to understand, it seems to be describing the algorithm more than what it means for users.

Can we find something more user friendly?


smooth iterations -> smoothing iterations

Pablo Dobarro (pablodp606) marked 4 inline comments as done.
  • Rebase
  • Review update

@Brecht Van Lommel (brecht) Using this or the regular smooth brush really depends on what you are doing. I personally would find this smoothing algorithm too weak to be used by default and I would only use for cleaning up details and polishing. I still need to find another algorithm that does the opposite thing as this one to smooth volume as fast as possible, so ideally I would like to have the 3 variations. I already discussed with @William Reynish (billreynish) that in the future the main way to change brushes will be by using the asset manager and brush presets which will change the tool automatically, so having this in a separate tool will no make any difference for the user.

The next thing I'm going to do is refactoring the algorithm functions to implement the mesh filter (similar to how relax is implemented), so in case we find that users prefer this instead of the regular smooth() function, it will be easy to change.

I still need to find another algorithm that does the opposite thing as this one to smooth volume as fast as possible, so ideally I would like to have the 3 variations.

That would be fantastic. Great to read you're planning this. Thanks! 👍

This just seems like an improved Smooth tool, or at least something that could be an option for Smooth?

I would prefer not to end up with hundreds of tools in Sculpt mode, each of which are just small variations on one another. That could get out of hand very quickly.

@William Reynish (billreynish) The thing with this brush is that it needs 3 extra properties to control the smoothing algorithm which are irrelevant to the regular smooth brush algorithm. I think it will create more confusion if we merge them.

@Pablo Dobarro (pablodp606) We could just only show those properties of this smoothing algorithm is chosen.

I think it's more confusing if there are too many similar tools - users then have to learn and know the difference between the different variations of each tool.

@William Reynish (billreynish) But if we do that now without having the global brush management ready, changing to a particular smooth tool will be 2 clicks in the worst case instead of 1. With brush management both options are equivalent, but it helps to have the code a little bit more organized.
In this case, I would say that the algorithms of these two smooth brushes are quite different. If we want to merge tools, it would be better to merge flatten, scrape and fill, as it deformation algorithm is almost identical.

@Pablo Dobarro (pablodp606) I think it's acceptable if it's two clicks for now - We could even set this method as the default since it seems better for most cases.

When we have better brush management, we can make switching to any configuration a 1-click thing.

@William Reynish (billreynish) I was about to merge this tool into the smooth brush, but If we do that, we will loose the ability to do what you are seeing in the video (switch from surface smooth to regular smooth by pressing shift when the surface smooth tool is active), but we will be able to use surface smooth as the shift-smooth tool for all brushes, which is currently not possible. I personally prefer to have the ability to use smooth and surface smooth at the same time by pressing shift, but I would like to have more opinions on this.

I m kind of worried about the tool panel in sculpt mode is getting full, is it a problem to put this new brush like shown in the pic, there we can toggle them ( both smooth brush) with s-key and when the brush manager tool refactoring happen we can see if there is a better organisation

My vote goes to alternating the smoothing modes using the Shift key, accessible from any brush. Holding Shift while brushing = regular smooth, releasing Shift while brushing on activates alternate Smooth algorithm. This is the way it works in ZBrush, it's very convenient and doesn't require separate Smooth brushes.

I agree with @Metin Seven (MetinSeven) that the Zbrush way of alternating between the 2 smoothing methods is the most convenient but it needs to be properly explained in a Tooltip since it 's a very unusual behaviour for Blender.
Zbrush often changes the current operation if a key is no longer held but Blender does the opposite and keeps the current operation unless a new key is pressed.

If the Zbrush method is not what we want then IMO it would be better to have the 2 Tools merged. Since users can press S multiple times to toggle brushes within a Tool, it's easy to get to the second smooth brush.
Also since Shift is always linked to the Brush called "Smooth", users can just hold Shift to smooth normally and press S to use the secondary smoothing method.

@Julien Kaspar (JulienKaspar) I don't think doing those operations is currently supported in the keymap and in the stroke operator, the same way you can't invert the stroke while active if you press Ctrl. I think that right now the only possible options are the ones I mentioned in my last comment. We can change how the keymap and modifier keys work after having an initial implementation of the brush management to see how everything works together, but that is outside the scope of this patch.

@Pablo Dobarro (pablodp606) Ok I also just discovered that the workflow I described above is a bit different than I thought.
If you have 2 different smooth brushes in the Smooth Tool, switch to the second brush, switch back to another tool and use Shift to smooth, then the Smooth Tool has the first brush assigned again.
This is a bit bizarre behaviour and make it less predictable which smooth brush will be used when pressing S.

I do get your point of being able to smooth while having the Surface Smooth Tool active. Maybe it's best then to have it as it's own tool for the moment and perhaps assign the shortcut Alt + S to the Tool for convenience.
The brush management can be improved afterwards.

  • Rebase
  • Surface Smooth Mesh Filter

The filter version shares the sames functions as the brush. If we want to keep it as a separate tool I think that this patch now has all the functionality related to surface smooth.
The filter is useful to clean the projection artifacts of the voxel remesher

  • Rebase
  • Merge Smooth and Surface Smooth into the Smooth tool

@William Reynish (billreynish) Surface smooth is now a deformation mode inside the Smooth tool, so this tool should be already considered merged. I still think that if we can't deliver the global brush management to 2.83 we should split this back again into its own tool (that is an easy change to do, even in master). Otherwise, I think this is ready for 2.83.

Small comment, rest LGTM


convention is _pad<number>

This revision is now accepted and ready to land.Thu, Mar 19, 10:33 AM

Hey Pablo at the mark 0:06 of your video, this "issue" happens so many times with the regular brushes, when you smooth there is this quick switch between brushes all the time.
Is there a reason for that, could it be fixed?I couldn't capture it before as it happens too fast but you managed to do it here.
Sorry for hijacking this task :).

This revision was automatically updated to reflect the committed changes.
Pablo Dobarro (pablodp606) marked an inline comment as done.