[Bf-blender-cvs] [2da21b3] master: Inverted effect of target density was unstable, the divergence term needs to be substracted instead.

Lukas Tönne noreply at git.blender.org
Tue Jan 20 09:52:55 CET 2015


Commit: 2da21b30aecc8b5d355aeb435173f98f2b25fd8c
Author: Lukas Tönne
Date:   Fri Nov 14 17:11:33 2014 +0100
Branches: master
https://developer.blender.org/rB2da21b30aecc8b5d355aeb435173f98f2b25fd8c

Inverted effect of target density was unstable, the divergence term
needs to be substracted instead.

===================================================================

M	source/blender/physics/intern/hair_volume.cpp

===================================================================

diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp
index 4f2f6a3..91198cf 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
 				{




More information about the Bf-blender-cvs mailing list