Sculpt: Remove hardcoded plane offset value for clay brushes
The Clay and Clay Strips brush have a built-in hardcoded Plane Offset of 0.40m and 0.18m, respectively. This value is added to the displacement scalar after the pressure sensitivity is factored into the calculation, leading to the pre-bundled essential assets not responding to tablet pressure when enabled and potentially confusing behavior otherwise. Pull Request: https://projects.blender.org/blender/blender/pulls/144382
This commit is contained in:
BIN
assets/brushes/essentials_brushes-mesh_sculpt.blend
(Stored with Git LFS)
BIN
assets/brushes/essentials_brushes-mesh_sculpt.blend
(Stored with Git LFS)
Binary file not shown.
@@ -166,7 +166,7 @@ void do_clay_brush(const Depsgraph &depsgraph,
|
||||
/* This implementation skips a factor calculation as it currently has
|
||||
* no user-facing impact (i.e. is effectively a constant)
|
||||
* See: #123518 */
|
||||
float displace = fabsf(initial_radius * (0.25f + offset + 0.15f));
|
||||
float displace = fabsf(initial_radius * offset);
|
||||
|
||||
const bool flip = ss.cache->bstrength < 0.0f;
|
||||
if (flip) {
|
||||
|
||||
@@ -468,8 +468,8 @@ CursorSampleResult calc_node_mask(const Depsgraph &depsgraph,
|
||||
const SculptSession &ss = *object.sculpt;
|
||||
|
||||
const bool flip = (ss.cache->bstrength < 0.0f);
|
||||
const float offset = brush_plane_offset_get(brush, ss);
|
||||
const float displace = ss.cache->radius * (0.18f + offset) * (flip ? -1.0f : 1.0f);
|
||||
const float displace = ss.cache->radius * brush_plane_offset_get(brush, ss) *
|
||||
(flip ? -1.0f : 1.0f);
|
||||
|
||||
/* TODO: Test to see if the sqrt2 extra factor can be removed */
|
||||
const float initial_radius_squared = math::square(ss.cache->radius * math::numbers::sqrt2);
|
||||
|
||||
Reference in New Issue
Block a user