diff options
author | Pablo Dobarro <pablodp606> | 2020-03-26 18:05:46 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-26 18:13:47 +0300 |
commit | a218be308032ac4c270950f450bc7a5e05f066ce (patch) | |
tree | 5013a6731b5791236bebd52b40bdfbd140dd5b1e /source/blender/editors/sculpt_paint/sculpt_intern.h | |
parent | a0437c3f730f14be83f8e6cb20432b3775ffd03f (diff) |
Sculpt: Surface Smooth Brush and Mesh Filter
This implements the Surface Smooth Brush as a mode inside the Smooth tool,
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.
The same surface smooth operation is also available as a mesh filter.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7057
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index b8235dc5c95..d8e29d0e773 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -618,6 +618,10 @@ typedef struct StrokeCache { float initial_normal[3]; float true_initial_normal[3]; + /* Surface Smooth Brush */ + /* Stores the displacement produced by the laplacian step of HC smooth. */ + float (*surface_smooth_laplacian_disp)[3]; + float vertex_rotation; /* amount to rotate the vertices when using rotate brush */ struct Dial *dial; @@ -650,6 +654,11 @@ typedef struct FilterCache { * achieve certain effects. */ int iteration_count; + /* Stores the displacement produced by the laplacian step of HC smooth. */ + float (*surface_smooth_laplacian_disp)[3]; + float surface_smooth_shape_preservation; + float surface_smooth_current_vertex; + /* unmasked nodes */ PBVHNode **nodes; int totnode; |