[Bf-blender-cvs] [8532cf2] master: Ignore velocity changes when the cloth solver does not converge.

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


Commit: 8532cf206e21eb59743bf8de79d236fbd132c3ea
Author: Lukas Tönne
Date:   Fri Sep 12 15:02:37 2014 +0200
Branches: master
https://developer.blender.org/rB8532cf206e21eb59743bf8de79d236fbd132c3ea

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