diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 591168fd3a2..1a1200bb6c2 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -153,6 +153,8 @@ static float cloth_brush_simulation_falloff_get(const Brush *brush, #define CLOTH_LENGTH_CONSTRAINTS_BLOCK 100000 #define CLOTH_SIMULATION_ITERATIONS 5 + +#define CLOTH_SOLVER_DISPLACEMENT_FACTOR 0.6f #define CLOTH_MAX_CONSTRAINTS_PER_VERTEX 1024 #define CLOTH_SIMULATION_TIME_STEP 0.01f #define CLOTH_DEFORMATION_SNAKEHOOK_STRENGTH 0.35f @@ -805,10 +807,13 @@ static void cloth_brush_satisfy_constraints(SculptSession *ss, (cloth_sim->length_constraint_tweak[v2] * 0.5f); if (current_distance > 0.0f) { - mul_v3_v3fl(correction_vector, v1_to_v2, 1.0f - (constraint_distance / current_distance)); + mul_v3_v3fl(correction_vector, + v1_to_v2, + CLOTH_SOLVER_DISPLACEMENT_FACTOR * + (1.0f - (constraint_distance / current_distance))); } else { - copy_v3_v3(correction_vector, v1_to_v2); + mul_v3_v3fl(correction_vector, v1_to_v2, CLOTH_SOLVER_DISPLACEMENT_FACTOR); } mul_v3_v3fl(correction_vector_half, correction_vector, 0.5f); |