Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2019-10-04 00:46:29 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-04 16:28:00 +0300
commitd590db83705b9bfbb663c9aa388f5bf6fff09116 (patch)
tree7d125df35e0049aa542aec6848b2a650eb03864b /source/blender/editors/sculpt_paint/sculpt.c
parent2b55a1da50d213b34993a00b6b4459970e82a5aa (diff)
Sculpt: Clay Strips brush tweaks
- Fix accumulate by allowing normal radius greater than one. Now it works as it should and it should be enabled by default - Make the square test sharper. This gives a lot more definition to the brush, even when working with fewer polygons Reviewed By: brecht Differential Revision: https://developer.blender.org/D5984
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 6e9f62b980c..64674ecd0a1 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1098,9 +1098,8 @@ bool sculpt_brush_test_cube(SculptBrushTest *test, const float co[3], float loca
local_co[1] = fabsf(local_co[1]);
local_co[2] = fabsf(local_co[2]);
+ const float p = 8.0f;
if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) {
- float p = 4.0f;
-
test->dist = ((powf(local_co[0], p) + powf(local_co[1], p) + powf(local_co[2], p)) /
powf(side, p));
@@ -1740,11 +1739,13 @@ static float brush_strength(const Sculpt *sd,
switch (brush->sculpt_tool) {
case SCULPT_TOOL_CLAY:
- case SCULPT_TOOL_CLAY_STRIPS:
case SCULPT_TOOL_DRAW:
case SCULPT_TOOL_DRAW_SHARP:
case SCULPT_TOOL_LAYER:
return alpha * flip * pressure * overlap * feather;
+ case SCULPT_TOOL_CLAY_STRIPS:
+ /* Clay Strips needs extra strength to compensate for its default normal radius */
+ return alpha * flip * pressure * overlap * feather * 1.3f;
case SCULPT_TOOL_MASK:
overlap = (1 + overlap) / 2;