[Bf-blender-cvs] [8ac1ca13c85] master: Sculpt: Lower the default cloth deformation constraints strength
Pablo Dobarro
noreply at git.blender.org
Fri Sep 18 19:07:07 CEST 2020
Commit: 8ac1ca13c852b8f35306d8aff7d2fa0f2a690ccf
Author: Pablo Dobarro
Date: Mon Sep 14 00:22:30 2020 +0200
Branches: master
https://developer.blender.org/rB8ac1ca13c852b8f35306d8aff7d2fa0f2a690ccf
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
===================================================================
M source/blender/editors/sculpt_paint/sculpt_cloth.c
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list