Fix mesh boundary automask curve falloff

As the main use case of this feature is to work with cloth, using this
curve makes more sense than a smoothstep to simulate cloth tension near
the edges.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7262
This commit is contained in:
Pablo Dobarro 2020-03-27 23:22:59 +01:00
parent b26bebd59f
commit 43f748a32f
1 changed files with 1 additions and 1 deletions

View File

@ -1741,7 +1741,7 @@ static float *sculpt_boundary_edges_automasking_init(Object *ob,
for (int i = 0; i < totvert; i++) {
if (edge_distance[i] != EDGE_DISTANCE_INF) {
const float p = 1.0f - ((float)edge_distance[i] / (float)propagation_steps);
const float edge_boundary_automask = 3.0f * p * p - 2.0f * p * p * p;
const float edge_boundary_automask = pow2f(p);
automask_factor[i] *= (1.0f - edge_boundary_automask);
}
}