diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-12 17:02:37 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:00 +0300 |
commit | 8532cf206e21eb59743bf8de79d236fbd132c3ea (patch) | |
tree | b7006f008952d1e678e2dc2aaf45cb21b05f7260 /source/blender/blenkernel/intern/implicit.c | |
parent | 3119d718f8b6394c54778ee6325248ddaf1df074 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/implicit.c')
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index f60a0ccac82..54fb7e2571b 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); |