[Bf-blender-cvs] [6e521b0] temp_merge_gooseberry_hair: Ignore velocity changes when the cloth solver does not converge.

Lukas Tönne noreply at git.blender.org
Mon Jan 19 20:48:53 CET 2015


Commit: 6e521b06471f597e0481012d6931616b5a16bbfc
Author: Lukas Tönne
Date:   Fri Sep 12 15:02:37 2014 +0200
Branches: temp_merge_gooseberry_hair
https://developer.blender.org/rB6e521b06471f597e0481012d6931616b5a16bbfc

Ignore velocity changes when the cloth solver does not converge.

This helps keep the simulation stable as long as there are only a few
substeps that become too constrained for the solver.

Eventually we need better feedback about these solver results, so that
artists can tweak situations specifically to resolve bad solver results.
This is somewhat similar to the camera tracker, which also can run into
cases that cannot be resolved and have to be fixed manually.

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

M	source/blender/blenkernel/intern/implicit.c

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

diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index f60a0cc..54fb7e2 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -2430,8 +2430,10 @@ static bool simulate_implicit_euler(Implicit_Data *id, float dt)
 	// itend();
 	// printf("cg_filtered calc time: %f\n", (float)itval());
 
-	// advance velocities
-	add_lfvector_lfvector(id->Vnew, id->V, id->dV, numverts);
+	if (ok) {
+		// advance velocities
+		add_lfvector_lfvector(id->Vnew, id->V, id->dV, numverts);
+	}
 
 	del_lfvector(dFdXmV);




More information about the Bf-blender-cvs mailing list