[Bf-blender-cvs] [c52b8ae] hair_immediate_fixes: Ignore velocity changes when the cloth solver does not converge.

Lukas Tönne noreply at git.blender.org
Fri Sep 12 15:05:22 CEST 2014


Commit: c52b8ae818844965d56714a71255408873275dc1
Author: Lukas Tönne
Date:   Fri Sep 12 15:02:37 2014 +0200
Branches: hair_immediate_fixes
https://developer.blender.org/rBc52b8ae818844965d56714a71255408873275dc1

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 49dc6dd..0170f63 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -2624,8 +2624,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