+#define DFL_MIN_LIGHT 0.35
+sgVec3 SGEnviro::min_light = {DFL_MIN_LIGHT, DFL_MIN_LIGHT, DFL_MIN_LIGHT};
+#define DFL_STREAK_BRIGHT_NEARMOST_LAYER 0.9
+SGfloat SGEnviro::streak_bright_nearmost_layer = DFL_STREAK_BRIGHT_NEARMOST_LAYER;
+#define DFL_STREAK_BRIGHT_FARMOST_LAYER 0.5
+SGfloat SGEnviro::streak_bright_farmost_layer = DFL_STREAK_BRIGHT_FARMOST_LAYER;
+#define DFL_STREAK_PERIOD_MAX 2.5
+SGfloat SGEnviro::streak_period_max = DFL_STREAK_PERIOD_MAX;
+#define DFL_STREAK_PERIOD_CHANGE_PER_KT 0.005
+SGfloat SGEnviro::streak_period_change_per_kt = DFL_STREAK_PERIOD_CHANGE_PER_KT;
+#define DFL_STREAK_PERIOD_MIN 1.0
+SGfloat SGEnviro::streak_period_min = DFL_STREAK_PERIOD_MIN;
+#define DFL_STREAK_LENGTH_MIN 0.03
+SGfloat SGEnviro::streak_length_min = DFL_STREAK_LENGTH_MIN;
+#define DFL_STREAK_LENGTH_CHANGE_PER_KT 0.0005
+SGfloat SGEnviro::streak_length_change_per_kt = DFL_STREAK_LENGTH_CHANGE_PER_KT;
+#define DFL_STREAK_LENGTH_MAX 0.1
+SGfloat SGEnviro::streak_length_max = DFL_STREAK_LENGTH_MAX;
+#define DFL_STREAK_COUNT_MIN 40
+int SGEnviro::streak_count_min = DFL_STREAK_COUNT_MIN;
+#define DFL_STREAK_COUNT_MAX 190
+#if (DFL_STREAK_COUNT_MAX > MAX_RAIN_SLICE)
+#error "Bad default!"
+#endif
+int SGEnviro::streak_count_max = DFL_STREAK_COUNT_MAX;
+#define DFL_CONE_BASE_RADIUS 15.0
+SGfloat SGEnviro::cone_base_radius = DFL_CONE_BASE_RADIUS;
+#define DFL_CONE_HEIGHT 30.0
+SGfloat SGEnviro::cone_height = DFL_CONE_HEIGHT;
+
+
+void SGEnviro::config(const SGPropertyNode* n)
+{
+ if (!n)
+ return;
+
+ const float ml = n->getFloatValue("min-light", DFL_MIN_LIGHT);
+ sgSetVec3(min_light, ml, ml, ml);
+
+ streak_bright_nearmost_layer = n->getFloatValue(
+ "streak-brightness-nearmost-layer",
+ DFL_STREAK_BRIGHT_NEARMOST_LAYER);
+ streak_bright_farmost_layer = n->getFloatValue(
+ "streak-brightness-farmost-layer",
+ DFL_STREAK_BRIGHT_FARMOST_LAYER);
+
+ streak_period_max = n->getFloatValue(
+ "streak-period-max",
+ DFL_STREAK_PERIOD_MAX);
+ streak_period_min = n->getFloatValue(
+ "streak-period-min",
+ DFL_STREAK_PERIOD_MIN);
+ streak_period_change_per_kt = n->getFloatValue(
+ "streak-period-change-per-kt",
+ DFL_STREAK_PERIOD_CHANGE_PER_KT);
+
+ streak_length_max = n->getFloatValue(
+ "streak-length-max",
+ DFL_STREAK_LENGTH_MAX);
+ streak_length_min = n->getFloatValue(
+ "streak-length-min",
+ DFL_STREAK_LENGTH_MIN);
+ streak_length_change_per_kt = n->getFloatValue(
+ "streak-length-change-per-kt",
+ DFL_STREAK_LENGTH_CHANGE_PER_KT);
+
+ streak_count_min = n->getIntValue(
+ "streak-count-min", DFL_STREAK_COUNT_MIN);
+ streak_count_max = n->getIntValue(
+ "streak-count-max", DFL_STREAK_COUNT_MAX);
+ if (streak_count_max > MAX_RAIN_SLICE)
+ streak_count_max = MAX_RAIN_SLICE;
+
+ cone_base_radius = n->getFloatValue(
+ "cone-base-radius", DFL_CONE_BASE_RADIUS);
+ cone_height = n->getFloatValue("cone_height", DFL_CONE_HEIGHT);
+}
+
+