Page MenuHome

Sculpt: Mask By Color
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Tue, Jun 30, 12:59 AM.
Tags
None
Subscribers
None
Tokens
"Like" token, awarded by knightknight."Love" token, awarded by Serva."Love" token, awarded by CobraA."Love" token, awarded by brilliant_ape."Love" token, awarded by lopoIsaac."Love" token, awarded by DaveDeer."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by Brandon777.

Details

Summary

This tool generates masks based on the sculpt vertex colors by clicking
on the model, similar to automatic selection tools in image editing
software.

Diff Detail

Repository
rB Blender

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Tue, Jun 30, 12:59 AM
Pablo Dobarro (pablodp606) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Tue, Jun 30, 10:15 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
8230–8231

I'm not quite sure where M_SQRT3 and why you divide by threshold rather than comparing to it. This isn't how threshold work.

Either its logical error in the code, or the code needs explanation and better naming choice.

8236–8238
8250–8256

Same as above.

This revision now requires changes to proceed.Tue, Jun 30, 10:15 AM
Pablo Dobarro (pablodp606) marked 3 inline comments as done.
  • Review Update

@Sergey Sharybin (sergey) I reworked the threshold function in a way that is more similar to image editing programs with lasso selections. To me it would make more sense to have a function that produces the larger falloff possible across the color instead of a fixed falloff defined by the slope while keeping the same behavior (threshold of 0 selects only the same color, 1 selects the entire image). I was trying something like this, which produces a much bigger falloff when the threshold is 0.5, but I'm not sure how it will work in practice. I can take a look at this again in a later patch.

It's ok to use fall-off function, but you need to put information about reasoning and general idea as a comment in the code.

  • Add comment to sculpt_mask_by_color_delta_get
This revision is now accepted and ready to land.Thu, Jul 2, 10:16 AM
This revision was automatically updated to reflect the committed changes.