Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-11-15 14:40:34 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:08 +0300
commit52384179f4c5153a62d711d326a7f6a877508dbb (patch)
tree7cc9bef7bb0799d2e66c1c2a9d23bf269bc21844 /source/blender/physics
parent2da21b30aecc8b5d355aeb435173f98f2b25fd8c (diff)
Some tweaking of value ranges for hair target density and removed
density factor (already included in grid velocity). Conflicts: source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/physics')
-rw-r--r--source/blender/physics/intern/BPH_mass_spring.cpp3
-rw-r--r--source/blender/physics/intern/hair_volume.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index ee2b7915caa..7a3660d1734 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -672,6 +672,9 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt)
const float fluid_factor = 0.95f; /* blend between PIC and FLIP methods */
float smoothfac = parms->velocity_smooth;
+ /* XXX FIXME arbitrary factor!!! this should be based on some intuitive value instead,
+ * like number of hairs per cell and time decay instead of "strength"
+ */
float density_target = parms->density_target;
float density_strength = parms->density_strength;
float gmin[3], gmax[3];
diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp
index 91198cfaff0..b08eef05392 100644
--- a/source/blender/physics/intern/hair_volume.cpp
+++ b/source/blender/physics/intern/hair_volume.cpp
@@ -598,7 +598,7 @@ static const float density_threshold = 0.001f; /* cells with density below this
BLI_INLINE float hair_volume_density_divergence(float density, float target_density, float strength)
{
if (density > density_threshold && density > target_density)
- return strength * density * logf(target_density / density);
+ return strength * logf(target_density / density);
else
return 0.0f;
}