diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-18 12:30:11 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:08 +0300 |
commit | 60bf6c123fae87f8ced5c2f33a6c14cab50d94c2 (patch) | |
tree | 2afe59fb74e3fe293d0cb128fbddb058cc95e00e /source/blender/blenkernel/intern/particle_system.c | |
parent | d031831a05b0717348df7747c251f623d0d61f55 (diff) |
Fix for applying the bending randomness factor.
A stupid hack is needed here, changing the way the factor is applied to
angular bending springs. In cloth sim the bending factor of individual
springs is applied as a mix value between the bending stiffness and a
max value, but this max value isn't even used in hair sim so that
approach becomes useless.
Conflicts:
source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 01a44e8c6b5..bcd0a0318fb 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3048,7 +3048,7 @@ static void hair_create_input_dm(ParticleSimulationData *sim, int totpoint, int mul_m4_m4m4(root_mat, sim->ob->obmat, hairmat); normalize_m4(root_mat); - bending_stiffness = 1.0f - part->bending_random * psys_frand(psys, p + 666); + bending_stiffness = CLAMPIS(1.0f - part->bending_random * psys_frand(psys, p + 666), 0.0f, 1.0f); for (k=0, key=pa->hair; k<pa->totkey; k++,key++) { ClothHairData *hair; |