[Bf-blender-cvs] [1bc75dfa4a9] master: Sculpt: Allow inverting the Erase Displacement mesh filter

Pablo Dobarro noreply at git.blender.org
Thu Dec 3 22:48:46 CET 2020


Commit: 1bc75dfa4a9863016002800b27d6f5addbc3ed7d
Author: Pablo Dobarro
Date:   Tue Dec 1 00:15:15 2020 +0100
Branches: master
https://developer.blender.org/rB1bc75dfa4a9863016002800b27d6f5addbc3ed7d

Sculpt: Allow inverting the Erase Displacement mesh filter

When inverting erase displacement the filter can increase the
displacement over the limit surface. After using apply base, this can be
used as an alternative intensify details as it usually gives better
results.

This is the same concept as smoothing inverting to intensify details.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9679

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_filter_mesh.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
index 11af63c6e47..02d4be20e1b 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
@@ -448,7 +448,7 @@ static void mesh_filter_task_cb(void *__restrict userdata,
         mul_v3_v3fl(disp, ss->filter_cache->detail_directions[vd.index], -fabsf(fade));
       } break;
       case MESH_FILTER_ERASE_DISPLACEMENT: {
-        fade = clamp_f(fade, 0.0f, 1.0f);
+        fade = clamp_f(fade, -1.0f, 1.0f);
         sub_v3_v3v3(disp, ss->filter_cache->limit_surface_co[vd.index], orig_co);
         mul_v3_fl(disp, fade);
         break;



More information about the Bf-blender-cvs mailing list