diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-14 01:22:30 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-18 20:06:24 +0300 |
commit | 8ac1ca13c852b8f35306d8aff7d2fa0f2a690ccf (patch) | |
tree | 9430cca8fce21536106d9be68dfa8b9a0bec6ba4 | |
parent | a0f6da0abc6fefc6a679d8182b673e7c5ad3fdde (diff) |
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
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |