Page MenuHome

Sculpt: Topology Slide/Relax
AcceptedPublic

Authored by Pablo Dobarro (pablodp606) on Oct 14 2019, 7:48 PM.
Tokens
"Mountain of Wealth" token, awarded by TheAngerSpecialist."Love" token, awarded by brilliant_ape."Love" token, awarded by intracube."Like" token, awarded by Loner."Love" token, awarded by xrg."Burninate" token, awarded by hitrpr."Like" token, awarded by Maged_afra."Love" token, awarded by belich."Love" token, awarded by Brandon777."Burninate" token, awarded by leha."Love" token, awarded by MetinSeven."Love" token, awarded by tiagoffcruz."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by lopoIsaac.

Details

Summary

This patch implements the Topology Slide/Relax brush and the Relax mesh filter.
These tools are designed to move the topology on top of the mesh without affecting the volume.

The Topology Slide/Relax brush slides the topology of the mesh in the direction of the stroke. When pressing shift, it has an alternative smooth mode similar to the Relax Brush in the sculpt branch. It should be way more stable and produce fewer artifacts.

Diff Detail

Repository
rB Blender
Branch
sculpt-topology-slide-brush (branched from master)
Build Status
Buildable 5494
Build 5494: arc lint + arc unit

Event Timeline

Icon pleeez (at least temporary)

This is incredible. This looks like a feature that other softwares have, called Surface Constraint, that does this with the move/rotate/scale tools. Would it be possible to extend the topology slide feature to mesh editing? Or use the relax tool in edit mode on the selected vertices? I mean, could the same code be re-used for this?

Either way, I'm going to get so much use out of this. I can't overstate how great this is.

Jeroen Bakker (jbakker) requested changes to this revision.Wed, Oct 30, 8:55 AM

Just some small code improvements.
Not related to this patch, but an improvement in organizing code is to use code folding. As you have any patches open, perhaps just start adding them.

/* -------------------------------------------------------------------- */

/** \name Sculpt Topology Brush
 * \{ */

...

/** \} */

/* -------------------------------------------------------------------- */

/** \name Sculpt Relax Brush
 * \{ */

...

/** \} */
source/blender/editors/sculpt_paint/sculpt.c
1741

Use float as static multiplyer.

3130

isn't this a mul_v3_v3fl?

3142

Can't you use madd_v3_v3v3fl instead?

6562

Don't think this is intended?

8477–8482

put this in the else

8594
  • Use ELEM
  • place in separate function.
This revision now requires changes to proceed.Wed, Oct 30, 8:55 AM
Pablo Dobarro (pablodp606) marked 6 inline comments as done.
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)
  • Review update
  • Rebase
Jeroen Bakker (jbakker) requested changes to this revision.Wed, Oct 30, 3:42 PM
Jeroen Bakker (jbakker) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
8640

The idea was to place the ELEM in a function and also use here

This revision now requires changes to proceed.Wed, Oct 30, 3:42 PM
  • Use function to check needs_pmap
Pablo Dobarro (pablodp606) marked an inline comment as done.Wed, Oct 30, 4:08 PM
This revision is now accepted and ready to land.Wed, Oct 30, 4:56 PM
Jun Mizutani (jmztn) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
3255

The type cast is required when building on Windows.
BKE_pbvh_parallel_range_settings((PBVHParallelSettings*) &settings, (sd->flags & SCULPT_USE_OPENMP), totnode);

I used the topology brush to modify the cube mesh.
Topology brush with X symmetry works fine.


Topology Relax brush with X symmetry seems to have a problem near the cube corner.