diff options
author | Luca Rood <LucaRood> | 2016-08-13 19:40:22 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2016-08-13 19:48:33 +0300 |
commit | da77d9873f1632f2ec4b624e949c0270753fa465 (patch) | |
tree | e9574927276b3039807083ea0f029f43386c9f48 /intern/cycles/kernel | |
parent | 35a6e540b172cf351da34715b8ad2e0bebc92d44 (diff) |
Prevent max stiffness values from going under normal stiffness values in cloth stiffness scaling.
When updating the max values under stiffness scaling, they clip at the normal stiffness values
as expected, however when updating stiffness values, you could set them higher than the max
values, and the max values weren't updated accordingly. As the stiffness scaling computes using
the absolute difference between the max values and the stiffness values, you got higher
stiffnesses in scaled areas even though your max is actually lower than the normal stiffness.
This diff fixes that behaviour, by updating the max values to be equal to the stiffness whenever
you set a higher stiffness than the max value.
Also, I have initialized the max values to the same as the stiffnesses, as they were previously
just set to zero, and caused the same problem described above.
Reviewers: lukastoenne
Reviewed By: lukastoenne
Tags: #physics
Differential Revision: https://developer.blender.org/D2147
Diffstat (limited to 'intern/cycles/kernel')
0 files changed, 0 insertions, 0 deletions