Page MenuHome

Sculpt: Boundary Brush Falloff Types and Offset
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Aug 10 2020, 10:12 PM.
Tags
None
Tokens
"Like" token, awarded by kivig."Love" token, awarded by Xlindvain."Like" token, awarded by YAFU."100" token, awarded by Frozen_Death_Knight.

Details

Summary

This adds the boundary_falloff_type and boundary_offset to control how the
falloff of the Boundary Brush is applied.

Boundary Origin Offset is the same concept as the Pose Origin offset in
the Pose Brush. It is a multiplier that adds extra length to the brush
radius to locate the deformation pivot further from the boundary without
affecting the falloff.

The Falloff type includes Constant (previous default), brush radius, loop
and loop and invert. Loop and Loop and Invert can be used to create
deformation patterns in a mesh.

Diff Detail

Repository
rB Blender

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Aug 10 2020, 10:12 PM
Pablo Dobarro (pablodp606) created this revision.
  • Fix symmetry when both passes modify the same boundary with a non constant falloff. This needs symmetry passes to be separated by areas, like other tools like pose or transform.
Sergey Sharybin (sergey) requested changes to this revision.Aug 11 2020, 9:52 AM

Fix symmetry when both passes modify the same boundary with a non constant falloff. This needs symmetry passes to be separated by areas, like other tools like pose or transform.

This does not seem to be related to the implementation of boundary brush falloff. You can fix the symmetry outside of this falloff feature, there is no (visible) need to put this fix into this code review.
Please start following atomic changes approach, this isn't the first time I'm asking for this.

source/blender/editors/sculpt_paint/sculpt_boundary.c
222

This isn't an accumulator in its canonical meaning in Blender. Accumulator accumulates value for average.
This seems to be a distance from boundary to the to vertex, which you can treat as a current destination, and hence call distance_boundary_to_dst. Something like that.

Again,. be explicit in naming, units, and semantic.

242

From my understanding, you do need to allocate memory if constant falloff is used.

It also seems some naming got slipped from another review. See https://developer.blender.org/D8356#inline-67087 and clean this up as a followup change.

453

What are you trying to achieve with explicit cast?
If you want rounding, it is wrong and you should be using lround instead. If you just want to drop the fractional part,you do not need to do explicit cast.

This revision now requires changes to proceed.Aug 11 2020, 9:52 AM
Pablo Dobarro (pablodp606) marked 3 inline comments as done.
  • Revert "Fix symmetry when both passes modify the same boundary with a non"
  • Review update
This revision is now accepted and ready to land.Aug 12 2020, 6:12 PM