From a3e0cceba0adfd22c2221a19b8ee2c814a9b9135 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 12 Aug 2021 21:34:32 +0200 Subject: [PATCH] GS-Entbase: Add detailed QUAKED definition for light_environment! --- src/gs-entbase/client/light_environment.qc | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/gs-entbase/client/light_environment.qc b/src/gs-entbase/client/light_environment.qc index 98eaf5f0..de60ed94 100644 --- a/src/gs-entbase/client/light_environment.qc +++ b/src/gs-entbase/client/light_environment.qc @@ -15,8 +15,35 @@ */ /*QUAKED light_environment (1 0 0) (-8 -8 -8) (8 8 8) ? +Defines the overall ambient skylight in the map. -STUB! +-------- KEYS -------- +"color" : Normalized RGB color value. Default is [1,1,1] +"color255" : RGB255 color value. e.g. '255 255 255' for white +"ambientcolor" : Shadow color. Normalized RGB color value. Default is [1,1,1] +"ambientcolor255" : Shadow color. RGB255 color value. e.g. '255 255 255' for white +"intensity" : Overall intensity of the sky light. '300' is probably okay for a day level. +"sunangle" : The yaw position of the sun, basically the horizontal direction. +"pitch" : The vertical position of the sun. '-90' means straight down, '-45' is diagonal etc. +"samples" : The amount of passes onto the lightmap, this is required for spread. +"sunspreadangle" : The offset of each sample pass in degrees, basically horizontal jitter. +"filterradius" : Blur amount for each pass. This will make cloud scenes work well. + +-------- NOTES -------- +Only one is effective per map. +Sun light generally is white, unless the atmosphere/horizon is coloring it. +The ambientcolor should generally be set to that of the skybox for the most +realistic depiction of the world. +As mentioned before, the 'sunspreadangle' and 'filterradius' keys only work +if 'samples' is set to something higher than 1, as those are parameters for +said behaviour. There's no point in setting 'samples' to something higher than +1 if you aren't bothering to supply a valid 'sunspreadangle' and 'filterradius' +key either. + +For cloudly/overcast skies, I'd recommend setting the 'pitch' to '-45', then +'samples' to at least '4' and 'sunspreadangle to '360' with a 'filterradius' +of at least '1'. This will ensure that the sunlight will be cast diagonally +from 4 positions across the entire horizon - thus eliminating any harsh shadows. -------- TRIVIA -------- This entity was introduced in Half-Life (1998).