Fix hair collision instability with 'Quality Steps' > 1
This was removed in rB0666ece2e2f9 because it is handled differently for "real" cloth in cloth_solve_collisions(), but hair still needs this apparently [does its thing in cloth_continuum_step() instead]. And since we have a default 'Quality Steps' setting of 5, it made many simulations unstable. Fixes T65038, T59742 (possibly others) Reviewers: brecht Maniphest Tasks: T65038, T59742 Differential Revision: https://developer.blender.org/D5681
This commit is contained in:
@@ -1111,6 +1111,12 @@ int BPH_cloth_solve(
|
||||
ImplicitSolverResult result;
|
||||
|
||||
if (is_hair) {
|
||||
/* copy velocities for collision */
|
||||
for (i = 0; i < mvert_num; i++) {
|
||||
BPH_mass_spring_get_motion_state(id, i, NULL, verts[i].tv);
|
||||
copy_v3_v3(verts[i].v, verts[i].tv);
|
||||
}
|
||||
|
||||
/* determine contact points */
|
||||
if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) {
|
||||
cloth_find_point_contacts(depsgraph, ob, clmd, 0.0f, tf, &contacts, &totcolliders);
|
||||
|
||||
Reference in New Issue
Block a user