Page MenuHome

Sculpt: Use constraints in cloth deform brushes
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jul 29 2020, 8:10 PM.
Tags
None
Subscribers
None
Tokens
"100" token, awarded by lopoIsaac."Love" token, awarded by rlsl0422."Love" token, awarded by Shimoon."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by vladimirzb."Love" token, awarded by julperado."Love" token, awarded by abdo25."Love" token, awarded by ZohaibAli.

Details

Summary

Previously, deform brushes were modifying the final positions in the
simulation directly, which was causing all sorts of artifacts in the
deformed area and problems with other features of the solver.
Now these brushes deform a separate array of positions and the solver
adds constraints to them, so the real vertices are moved when solving
the constraints. This prevents those artifacts and gives the brush a
much better behavior.
Before:

After:

Diff Detail

Repository
rB Blender
Branch
sculpt-cloth-grab-constraints (branched from master)
Build Status
Buildable 9265
Build 9265: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jul 29 2020, 8:10 PM
Pablo Dobarro (pablodp606) created this revision.
Anže (koko_ze) rescinded a token.
Sergey Sharybin (sergey) requested changes to this revision.Jul 30 2020, 9:21 AM

Generally fine, and the video comparison looks great. Also kudos for showing before/after ;)
However, see inlined comments for simple things.

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

radius_squared = ss->cache->initial_radius * ss->cache->initial_radius;

pow2f is slower.

473

MEM_calloc_arrayN

This revision now requires changes to proceed.Jul 30 2020, 9:21 AM
Pablo Dobarro (pablodp606) marked 2 inline comments as done.
  • Review update
This revision is now accepted and ready to land.Jul 30 2020, 3:34 PM