From 8ac1ca13c852b8f35306d8aff7d2fa0f2a690ccf Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 14 Sep 2020 00:22:30 +0200 Subject: Sculpt: Lower the default cloth deformation constraints strength The deformation constraints strength were too strong and they were preventing the cloth effects of the brushes with cloth deformation target to create folds properly. This lowers the default, making the simulation follow the deformation in a more relaxed way. I'll make a separate patch to expose this as a property for certain brushes and cloth deformers that may need higher values (like boundary with loop falloff on a low poly mesh), but I think this default will work better for most use cases. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8884 --- source/blender/editors/sculpt_paint/sculpt_cloth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 2207ceda11a..0246e208bcb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -139,7 +139,8 @@ static float cloth_brush_simulation_falloff_get(const Brush *brush, #define CLOTH_SIMULATION_ITERATIONS 5 #define CLOTH_MAX_CONSTRAINTS_PER_VERTEX 1024 #define CLOTH_SIMULATION_TIME_STEP 0.01f -#define CLOTH_DEFORMATION_TARGET_STRENGTH 0.35f +#define CLOTH_DEFORMATION_SNAKEHOOK_STRENGTH 0.35f +#define CLOTH_DEFORMATION_TARGET_STRENGTH 0.01f static bool cloth_brush_sim_has_length_constraint(SculptClothSimulation *cloth_sim, const int v1, @@ -322,7 +323,7 @@ static void do_cloth_brush_build_constraints_task_cb_ex( /* Cloth Snake Hook creates deformation constraint with fixed strength because the strength * is controlled per iteration using cloth_sim->deformation_strength. */ cloth_brush_add_deformation_constraint( - data->cloth_sim, vd.index, CLOTH_DEFORMATION_TARGET_STRENGTH); + data->cloth_sim, vd.index, CLOTH_DEFORMATION_SNAKEHOOK_STRENGTH); } } else if (data->cloth_sim->deformation_pos) { -- cgit v1.2.3