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.
This commit is contained in:
parent
3119d718f8
commit
8532cf206e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue