Volume Preserving Smoothing ($)

This kind of circular looping topology is not optimal for smoothing. However, if you want to increase strength - just press shift+R to repeat last action.

1 Like


Could there be an option to keep the circle displayed while the Volume Smooth brush is being used?

Maybe in future updates. The ‘new’ python tools api is not well documented

1 Like


Blender version: 2.82a
Addon version: 2.4

  1. :white_check_mark: I created a character thanks to the MB-Lab 1.7.7b addon.
  2. :white_check_mark: The mesh was too high poly for my needs so I decimated the mesh with value = 0.15.
  3. :white_check_mark: I smoothed the character with VPS.
  4. :white_check_mark: Then, I used the Tris to Quad feature from the Edit Mesh Tools addon.
  5. :warning: Finally, I retried to use VPS on the mesh and this error appeared:
Traceback (most recent call last):
  File "C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vps_smoothing\smooth_tool.py", line 276, in invoke
    ret = self.numpy_smooth_init(context, method=vps_settings.method, from_brush = True) #sets self.bm and self.p_co
  File "C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vps_smoothing\volume_preserve_smoothing.py", line 182, in numpy_smooth_init
    v1_id = orig_to_new_idx[edge.verts[0].index]
KeyError: -1

location: <unknown location>:-1

Then I retried all the steps above but when I tried to reproduce the error, I got this other error message just after trying to smooth edges on a new character:

Traceback (most recent call last):
  File "C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vps_smoothing\smooth_tool.py", line 207, in modal
  File "C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vps_smoothing\smooth_tool.py", line 176, in smooth_write
    if self.vsmooth_mask[v.index] >= self.vsmooth_mask[mirror_vert_idx]: 
IndexError: list index out of range

location: <unknown location>:-1

Without doing anything special, I also noticed this error in the System Console:

Traceback (most recent call last):
  File "C:\Users\Sebastien\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vps_smoothing\smooth_tool.py", line 113, in draw_circle_px
    if self.draw_cursor_co:
  File "E:\blender\blender_official\2.82\scripts\modules\bpy_types.py", line 708, in __getattribute__
    properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type VPS_OT_DrawSmooth has been removed

But maybe it’s related to a glitch in the viewport that (randomly) I got ?
I couldn’t get rid of this circle in the viewport:

To get rid of it, I had to disable and re-activate the addon.

Sometimes bmesh glitches out in blender, and that may cause addon malfunction. Did you try hitting tab twice, to exit then enter editmode? If it wont work, can u send the blend file?

test01.blend (376.2 KB)

  1. Go to edit mode
  2. Select one vertex
  3. Start using VPS on the body
  4. it should display the first error that I reported above (in the “Summary” block): errors at line 182 an 276

And after that this error appears, if you load a default scene, you should see the circle at the middle of the viewport (reported above in my GIF).

Sorry, I cant reproduce the error on my end. I added and applied decimate then VPS smooths everything ok. After tris to quad also no problem. I have no idea what may be wrong.

tried the blend scene.
if I select any vert in mesh edit mode, after I rotate the viewport I would get error. after click it away, smooth brush works, but if rotate again, it would show the error again.

if none is selected, no errors.
meanwhile the circle stays in the origin, only restart blender it would disappear.

using blender 2.82.7 zip version and VPS 2.4

1 Like

Ok, I got it now and I reported it to blender devs:
For not just do not use VPS directly after using ‘Focus selected’ (numpad .) - I think this is the main cause

Is there any way of implementing this as an alternative smoothing algorithm in the Sculpt Mode smooth brush?

1 Like

I’m not sure if it could work with new multires I will have to investigate. Plus on heavy sculpt meshes it may be slow since this is written in python…


The Mesh Fairing add-on offers installing faster Python modules in its Preferences: SciPy or NumPy. You really notice the speed increase if you use the option to install the module(s). Would that be a possibility for a Sculpt Mode version? Like @Musashidan I’d love a Sculpt Mode version.

I’m already using numpy for everything in VPSmooting. Is still not as fast as C++ code, and the source code got way more complicated when I started to use numpy - since I wanted to support ‘rail edges’ sliding, and partial mesh smooting. In theory code could be faster if I did not support only selection smoothing, but then on heavy meshes, if you wanted to smooth only fingers, the VPS would have to go through processing whole body just to smooth the finger. The way I implemented smoothing now is - that if you select finger, only its geometry is processed - so it is faster, but at the cost of more complicated numpy mesh processing, and slower code when whole mesh is selected. It is bit hard to explain. Anyway aroudn 60k tris VPS starts too lag, and for sculpting this is very low poly, but it is ok for game ready meshes processing.

1 Like

Thanks for the clarification. I was already afraid no Python module could match C# speed, which is indeed necessary for calculation-intensive processes like volume smoothing. But I figured to ask anyway, just in case. :slightly_smiling_face:

Is it possible to have “mirror” feature?
I tried turning on the built-in topology mirror.
But when I do, it still only smooths one side.

symmetry works, just enable this option:
it toolbar settings

1 Like

After turning on Mirror mesh editing, sometimes it still might not work, so you should try select the whole model in edit mode >Spacebar > search for Snap to Symmetry, so Blender can recognize its a mirrored mesh

1 Like

@JoseConseco and @SPYNeox

Thanks for the response. Works as expected specially the Snap to Symmetry one.

1 Like

Hi @JoseConseco.

I noticed that when you change the brush size (with F hotkey) the circle grows or shrinks but not from the center of the circle (but rather, from top left).

It’s not a big annoyance but do you think that you could change this behavior to match the other resizements of other Blender sculpt brushes (from the center) ?

Thank you in advance.