diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-10 18:57:01 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-10 19:04:00 +0300 |
commit | ed9c0464bae66411384c216ba3f34f65658e0f68 (patch) | |
tree | b0a5004801180bbf67ae220f92932d007397671f /source/blender/blenkernel/intern/brush.c | |
parent | 71639cc8627fb26e50233b9bb942776a950b6ab1 (diff) |
Sculpt: Boundary Brush
This brush includes a set of deformation modes designed to deform and
control the shape of the mesh boundaries, which are really hard to do
with regular sculpt brushes (and even in edit mode). This is useful
for creating cloth assets and hard surface base meshes.
The brush detects the mesh boundary closest to the active vertex and
propagates the deformation using the brush falloff into the mesh.
It includes bend, expand, inflate, grab and twist deform modes.
The main use cases of this brush are the Bend and Expand deformation
modes, which depend on a grid topology to create the best results.
In order to do further adjustments and tweaks to the result of these
deformation modes, the brush also includes the Inflate, Grab and
Twist deformation modes, which do not depend that much on the topology.
Grab and Inflate are the same operation that is implemented in the
Grab and Inflate tools, they are also available in the boundary brush
as producing deformations with regular brushes in these areas is very
hard to control.
Even if this brush can produce deformations in triangle meshes and
meshes with a non-regular quad grid, the more regular and clean the
topology is, the better. Most of the assets this brush is intended to
deform are always created from a cylindrical or plane quad grid, so it
should be fine. Also, its algorithms can be improved in future versions
to handle more corner cases and topology patterns.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8356
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index ce0249c71ce..af186dc4940 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1566,6 +1566,12 @@ void BKE_brush_sculpt_reset(Brush *br) br->flag &= ~BRUSH_SPACE; br->flag &= ~BRUSH_SPACE_ATTEN; break; + case SCULPT_TOOL_BOUNDARY: + br->flag &= ~BRUSH_ALPHA_PRESSURE; + br->flag &= ~BRUSH_SPACE; + br->flag &= ~BRUSH_SPACE_ATTEN; + br->curve_preset = BRUSH_CURVE_CONSTANT; + break; case SCULPT_TOOL_DRAW_FACE_SETS: br->alpha = 0.5f; br->flag &= ~BRUSH_ALPHA_PRESSURE; @@ -1660,6 +1666,7 @@ void BKE_brush_sculpt_reset(Brush *br) case SCULPT_TOOL_ROTATE: case SCULPT_TOOL_ELASTIC_DEFORM: case SCULPT_TOOL_POSE: + case SCULPT_TOOL_BOUNDARY: case SCULPT_TOOL_SLIDE_RELAX: br->add_col[0] = 1.0f; br->add_col[1] = 0.95f; |