From 2ed0beb1c0cdb6fd84a3eb1c5e92f5561c8a7996 Mon Sep 17 00:00:00 2001 From: Tyrann Date: Thu, 23 Aug 2007 20:48:02 +0930 Subject: [PATCH] [PATCH] qbsp: Tweak epsilons The choice of the various epsilon values is critical to having geometrically complex maps compile correctly. The one which seems most important (so far) is the ANGLE_EPSILON. This one needs to be quite tight to avoid "bad things" happening when you create small angles between adjacent surfaces. Another epsilon inter-relationship I discovered, is that it seems CONTINUOUS_EPSILON needs to be larger than EQUAL_EPSILON. It seems to play havoc with the t-junction code otherwise. Signed-off-by: Tyrann --- qbsp/qbsp.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/qbsp/qbsp.h b/qbsp/qbsp.h index 8fe06618..a41f9caf 100644 --- a/qbsp/qbsp.h +++ b/qbsp/qbsp.h @@ -107,17 +107,22 @@ #define AMBIENT_LAVA 3 #define NUM_AMBIENTS 4 // automatic ambient sounds -// Misc values -#define ANGLEEPSILON 0.00001 -#define NORMAL_EPSILON 0.0001 -#define EQUAL_EPSILON 0.001 -#define DIST_EPSILON 0.001 -#define ZERO_EPSILON 0.001 -#define CONTINUOUS_EPSILON 0.001 -#define DISTEPSILON 0.01 -#define POINT_EPSILON 0.01 -#define T_EPSILON 0.01 -#define ON_EPSILON 0.05 +/* + * The quality of the bsp output is highly sensitive to these epsilon values. + * Notes: + * - CONTINUOUS_EPSILON needs to be slightly larger than EQUAL_EPSILON, + * otherwise this messes with t-junctions + */ +#define NORMAL_EPSILON 0.000001 +#define ANGLEEPSILON 0.000001 +#define DIST_EPSILON 0.0001 +#define ZERO_EPSILON 0.0001 +#define DISTEPSILON 0.0001 +#define POINT_EPSILON 0.0001 +#define T_EPSILON 0.0001 +#define ON_EPSILON 0.0001 +#define EQUAL_EPSILON 0.0001 +#define CONTINUOUS_EPSILON 0.0005 #define BOGUS_RANGE 18000