From 2da21b30aecc8b5d355aeb435173f98f2b25fd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Fri, 14 Nov 2014 17:11:33 +0100 Subject: [PATCH] Inverted effect of target density was unstable, the divergence term needs to be substracted instead. --- source/blender/physics/intern/hair_volume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp index 4f2f6a33c52..91198cfaff0 100644 --- a/source/blender/physics/intern/hair_volume.cpp +++ b/source/blender/physics/intern/hair_volume.cpp @@ -682,7 +682,7 @@ bool BPH_hair_volume_solve_divergence(HairGrid *grid, float dt, float target_den * and resulting pressure gradient should be multiplied by the (inverse) density; * however, this is already included in the weighting of hair velocities on the grid! */ - B[u] = divergence + target; + B[u] = divergence - target; #if 0 {