Page MenuHome

Sculpt: Scale Cloth Filter
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Aug 20 2020, 6:21 PM.

Details

Summary

This filter scales the mesh as it was a softbody, producing folds in the
surface. The orientation of the folds can be controlled using the filter
axis and orientation.

This is an example of a cloth filter that uses deform coordinates instead
of forces, but probably it does not make much sense to expose it to the
user in a different way and with different parameters. I'll remove
FilterCache->enabled_force_axis in a later patch and use always
enabled_axis in SCULPT_filter_zero_disabled_axis_components
for both forces and deformation filters, so this function can also be used
in the mesh filter.

Diff Detail

Repository
rB Blender

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Aug 20 2020, 6:21 PM
Pablo Dobarro (pablodp606) created this revision.
Pablo Dobarro (pablodp606) retitled this revision from Cloth: Scale Cloth Filter to Sculpt: Scale Cloth Filter.Aug 20 2020, 6:22 PM
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)

Might be helpful to note in the tooltip that the force is applied from the object origin, that could cause some confusion more more complicated cases.

EDIT: I don't have the build of this around to test anymore, but I do remember that being the case when I did.

Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)
  • Review update: change tooltip
source/blender/editors/sculpt_paint/sculpt_cloth.c
1121

Nitpicky, but "pivot" relates to rotation "scale" would make more sense here.

source/blender/editors/sculpt_paint/sculpt_cloth.c
1121

So you mean just replacing "pivot" with "scale"?

source/blender/editors/sculpt_paint/sculpt_cloth.c
1121

Yeah, that's what I meant. Like I said, a bit nitpicky. Thanks

Pablo Dobarro (pablodp606) marked 2 inline comments as done.
  • Rename Pivot to Scale

I'll remove FilterCache->enabled_force_axis and use always enabled_axis for both forces and deformation filters.

Is it something you plan to do after this patch is landed? In this case please word this in a more explicit way.
Is it something you was planning to do while working in this patch? Is it done then?

source/blender/editors/sculpt_paint/sculpt_cloth.c
1256–1266

From the more ideal world scenario:

  • Can be moved to utility functions, keeping cloth_filter_apply_forces_task_cb smaller in vertical space
  • The loop over enabled_force_axis can be generalized to utility function as well, something like zero_disabled_axis_components().
Pablo Dobarro (pablodp606) marked an inline comment as done.
  • Review Update
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)

Is it something you plan to do after this patch is landed? In this case please word this in a more explicit way.

Is it something you was planning to do while working in this patch? Is it done then?

In a separate patch, also making both the mesh and cloth filter to use the same function and the same enabled_axis variable from the Filter Cache.

This revision is now accepted and ready to land.Sep 18 2020, 10:43 AM
This revision was automatically updated to reflect the committed changes.