[Bf-blender-cvs] [6991b13e41f] master: Fix T81649: Cloth simulation dynamic area mode tearing the mesh

Pablo Dobarro noreply at git.blender.org
Thu Oct 15 19:41:25 CEST 2020


Commit: 6991b13e41f39e07e1d6bf4a3ae95249e610afb8
Author: Pablo Dobarro
Date:   Mon Oct 12 19:31:38 2020 +0200
Branches: master
https://developer.blender.org/rB6991b13e41f39e07e1d6bf4a3ae95249e610afb8

Fix T81649: Cloth simulation dynamic area mode tearing the mesh

Dynamic area should use the radius instead of the initial radius to get
the nodes as the radius can now change during the stroke. In case of
anchored strokes, the current radius can be bigger than the initial
radius, simulating vertices outside the falloff area and breaking the
mesh.

Reviewed By: sergey

Maniphest Tasks: T81649

Differential Revision: https://developer.blender.org/D9181

===================================================================

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

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f512da504eb..078baf0dfc6 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5684,7 +5684,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
       SculptSearchSphereData data = {
           .ss = ss,
           .sd = sd,
-          .radius_squared = square_f(ss->cache->initial_radius * (1.0 + brush->cloth_sim_limit)),
+          .radius_squared = square_f(ss->cache->radius * (1.0 + brush->cloth_sim_limit)),
           .original = false,
           .ignore_fully_ineffective = false,
           .center = ss->cache->location,



More information about the Bf-blender-cvs mailing list