Increase visibility info importance, since the visibility info is now much more reliable

This commit is contained in:
PavelMikus 2022-05-16 09:56:58 +02:00
parent f1b4a187b6
commit 5796515322
2 changed files with 10 additions and 10 deletions

View File

@ -705,11 +705,11 @@ struct SeamComparator {
}
// the penalites are kept close to range [0-1.x] however, it should not be relied upon
float penalty_a = (a.visibility + SeamPlacer::additional_angle_importance)
* compute_angle_penalty(a.local_ccw_angle)
float penalty_a = a.visibility +
SeamPlacer::angle_importance * compute_angle_penalty(a.local_ccw_angle)
+ distance_penalty_a;
float penalty_b = (b.visibility + SeamPlacer::additional_angle_importance)
* compute_angle_penalty(b.local_ccw_angle)
float penalty_b = b.visibility +
SeamPlacer::angle_importance * compute_angle_penalty(b.local_ccw_angle)
+ distance_penalty_b;
return penalty_a < penalty_b;
@ -762,10 +762,10 @@ struct SeamComparator {
}
//ranges: [0 - 1] (0 - 1.3] ;
float penalty_a = (a.visibility + SeamPlacer::additional_angle_importance)
* compute_angle_penalty(a.local_ccw_angle);
float penalty_b = (b.visibility + SeamPlacer::additional_angle_importance)
* compute_angle_penalty(b.local_ccw_angle);
float penalty_a = a.visibility
+ SeamPlacer::angle_importance * compute_angle_penalty(a.local_ccw_angle);
float penalty_b = b.visibility +
SeamPlacer::angle_importance * compute_angle_penalty(b.local_ccw_angle);
return penalty_a <= penalty_b || penalty_a - penalty_b < SeamPlacer::seam_align_score_tolerance;
}

View File

@ -121,8 +121,8 @@ public:
// arm length used during angles computation
static constexpr float polygon_local_angles_arm_distance = 0.1f;
// increases angle importance at the cost of deacreasing visibility info importance. must be > 0
static constexpr float additional_angle_importance = 0.1f;
// determines angle importance compared to visibility ( neutral value is 1.0f. )
static constexpr float angle_importance = 0.7f;
// If enforcer or blocker is closer to the seam candidate than this limit, the seam candidate is set to Blocker or Enforcer
static constexpr float enforcer_blocker_distance_tolerance = 0.35f;