Page MenuHome

Sculpt: Edge Automasking
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jan 29 2020, 2:38 AM.
Tokens
"Like" token, awarded by julperado."Love" token, awarded by Fad.N53."Love" token, awarded by Shimoon."Mountain of Wealth" token, awarded by TheAngerSpecialist."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by tiagoffcruz."Love" token, awarded by MetinSeven."100" token, awarded by Brandon777."Love" token, awarded by RC12."Like" token, awarded by TheRedWaxPolice."100" token, awarded by AlRedd.

Details

Summary

This automasking option protects the open boundary edges of the mesh from the brush deformation. This is needed to sculpt cloths.
It has a Propagation Steps property that controls the falloff of the mask from the edge.

Limitations:

  • The automask is recalculated at the beginning of each stroke, creating a little bit of lag in high poly meshes, but it is not necessary. This can be fixed in the future by caching the edge distances, increasing a little bit the complexity of the code.
  • The boundary vertex detection in meshes is not ideal and it fails with triangulated geometry, but it is the same as in the smooth brush. After fixing this, we should refactor the smooth brush to use the API and let the automasking option manually control the affected vertices.
  • It does not work in Multires (it needs to be implemented in the API). The smooth brush in Multires is also not making boundary vertices.
  • The falloff has a visible line artifact on grid patterns. We can smooth the final automasking factors several iterations, but it will make the initialization much slower. This can also be added in the future if we decided to cache the distances.

The naming is not ideal

Diff Detail

Repository
rB Blender
Branch
sculpt-edge-automasking (branched from master)
Build Status
Buildable 6425
Build 6425: arc lint + arc unit

Event Timeline

Really useful!

It would be great if you could use the Falloff curves (Smoother, Sharper, etc.) to determine the transition from the edge.

@Pablo Dobarro (pablodp606) I wonder if we should put this in the Falloff panel instead?

@Pablo Dobarro (pablodp606) This works really well as far as I tested it now. I would personally mostly have it reserved for the "Smooth" and "Slide Relax" Tools so I'm glad that the option also works by accessing the smooth brush via holding Shift.
I noticed the limitations too but I don't have anything else to add.

Jeroen Bakker (jbakker) requested changes to this revision.Feb 18 2020, 12:10 PM

Codewise seems to be ok. What about the comments from @William Reynish (billreynish) and @Julien Kaspar (JulienKaspar)

source/blender/editors/sculpt_paint/sculpt.c
1382

Can be merged with previous loop

This revision now requires changes to proceed.Feb 18 2020, 12:10 PM
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • Review update
  • Rebase

@Jeroen Bakker (jbakker) Regaring IU, I think that we need to create a more detailed task to organize all the properties that were added in the last releases, but maybe it is better to wait to also have vertex colors and face groups merged so we can have a more clear scope of the project. For now I'm just adding all the properties to the brush panel in all patches (topology automasking is also there)
The biggest problem I see with this patch is that it does not have the multires implementation, but as the multires smooth did not have edge automasking by default we can maybe wait to have some details about the multires project to implement all functions in the API.
Also, there is no need to rush and commit this feature before the multires project. I made it because it can be useful when users test the cloth brush for the first time to use Blender as a cloth sculpting tool.

This revision is now accepted and ready to land.Mar 3 2020, 3:36 PM
This comment was removed by Brecht Van Lommel (brecht).
This revision was automatically updated to reflect the committed changes.