Page MenuHome

Sculpt: Refactor transform code to allow incremental updates
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Nov 13 2020, 12:41 AM.
Tags
None
Subscribers
Tokens
"Love" token, awarded by tiagoffcruz."Love" token, awarded by gilberto_rodrigues."Love" token, awarded by n-pigeon."Like" token, awarded by CobraA.

Details

Summary

This adds support for incremental updates in the sculpt transform
code. Now tools can define if they need the displacement applied
for the original coordinates or incrementally.

This is needed for features like elastic transform or cloth deformation
target in the transform tool.

Diff Detail

Repository
rB Blender
Branch
sculpt-elastic-transform (branched from master)
Build Status
Buildable 11413
Build 11413: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Nov 13 2020, 12:41 AM
Pablo Dobarro (pablodp606) created this revision.

I dont know if that is the intended behaviour but in the video you did a rotation on the middle of the cube ( of 720° more or less) that when u went back to rotation 0° it had some deformation applied, is that intended or a bug?

@David (Galagax), think this is due to an incremental nature of the transform tool.

What is the difference between elastic transform in this case and proportional transform in other modes? Do we need to bring a new term?

From implementation side there are some easy-to-address points. For the rest it'd be nice of UI team will make sure it fits nicely within the rest of Blender.

source/blender/editors/sculpt_paint/sculpt_intern.h
673

Explanation in a comment?

source/blender/editors/sculpt_paint/sculpt_transform.c
260–300

Cognitive complexity, one function doing one things, topics like this.

Pablo Dobarro (pablodp606) marked 2 inline comments as done.
  • review update

For context, after switching the transform tool to work on deltas, enabling the cloth deform target is trivial and it has plasticity collisions by default (see P1764).
This is the kind of functionality I'm trying to do:

For context, after switching the transform tool to work on deltas, enabling the cloth deform target is trivial and it has plasticity collisions by default

Looks interesting, but the incremental nature of transform tool is what:

  • Not how transform works anywhere in blender, consequentially..
  • .. is what confused @David (Galagax)

It might be acceptable, but is to be done as a design decision with all the outcomes of it being clear, and have UI/UX and sculpting artists in the module agree on it.

source/blender/editors/sculpt_paint/sculpt_transform.c
231

This and 0.4f above, where are they coming from? How are they calculated, what is it to be watched for when tweaking the parameter?

  • Add incremental and original transform modes
  • Remove elastic transform
  • Remove more unrelated code
Pablo Dobarro (pablodp606) retitled this revision from Sculpt: Elastic Transform to Sculpt: Refactor transform code to allow incremental updates.Nov 26 2020, 12:42 AM
Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)

When no functional changes (as far as users are concerned) expected please state it explicitly in the commit message. For example, rB226feb52eca. Other than that can't spot anything obviously wrong.

Accepting the revision, but expecting the node to happen in the final commit ;)

This revision is now accepted and ready to land.Nov 26 2020, 9:42 AM