The first part of the radiosity process is the accurate calculation of direct lighting.
All entity lights and the bright (5000 or greater) surface patches exactly trace lines to the individual lightmap samples.
If -bounce 0 is specified, thats it for the lighting.
Otherwise, the lightmap values are summed up to give the initial amount of light to be bounced around the world in the radiosity pass.
ISSUES WITH BMODELS
Brush models emit and absorb light like other surfaces, but they do not block light, so after normalization, a little less light lands on the nearby surfaces, because it was absorbed both by the door and the surfaces beyond it. You probably won't notice anything unless you have a row of spotlights on normal walls, then an identical one on a bmodel.
ISSUES WITH WATER
Light does NOT cross through water surfaces if the vis has been calculated, because the areas are in different potentially visible sets, but if you run qrad without a vis, then light will be sent through as well.
(QRAD DOCUMENTATION)
Surface lighting
All textures that are on the "light emiting" list will cast light into the world, oriented down the surface normal.
A value of 100-300 is reasonable for a large, dim surface, like slime, lava, or a dark sky. Lights that will illuminate large areas with a small surface area will have values of 5000 or greater.
The total amount of light emited from a surface is proportional to the surface's area, so the size of the brush face has as much effect on the light sent into the world as the light value.
Surface lighting falls off with the sqare of distance, so if you double the height of a room, you will need to have four times the light intensity on the ceiling to get the floor the same brightness. The walls would then be much brighter near the top than they were with the smaller room as well.
(QRAD DOCUMENTATION)
rad file, see #37
TextureName R G B V
TextureName R G B
TextureName V
info_texlights (HLRAD+)
keyvalues
"TextureName"
R G B V
Color and brighness (R G B V=Scale)
initially dark (1)
By default the light source will be turned off and can be turned on by some kind of trigger.
light_environment
Skys emit light like other surfaces, but have slightly different characteristics. They emit light from all angles, so it doesn't matter if you see a horizontal or vertical sky brush. Light also does not bounce off of a sky in the radiosity pass, if it flies out a sky texture it is just gone.
(QRAD DOCUMENTATION)
"target" Target
Entity name where the light will be directed to.
If validly specified, "pitch", "angle", "angles" is ignored.
"angles" Pitch Yaw Roll (X Y Z)
X Y Z
"pitch" Pitch
Angle
Takes priotity over Pitch inside "angles"Legacy Pitch
"angle" Angle
Angle
Takes priotity over Angle inside "angles"Legacy Yaw
"_light" Brightness
R G B V
Color and brighness (R G B V=Scale)
dynamic_light
TBD
func_wall and etc
keyvalues
"_minlight" Minimal Light Level
Used to set maximum lightning level for entities. Imagine a computer screen in the darkness, machine diodes or just a lamp that produces a light and need to be full-lit. Use minimum light level key to do this. It's only supports two states: '0' (normal light) and more than '0' (full bright). Set it to '1' or any other value to make brush full-lit.
Keep in mind that it does not produce light itself (in the first image I added light by myself).
func_train
For dynamic lighting (moving light) is set by effects
"TextureName"
R G B V
Color and brighness (R G B V=Scale)
This entity can act as a replacement for a lights.rad file, in that it simply resides within the map as a point based entity. The usefulness of this is that each map can have its own unique ambient lighting applied to it, and those settings will travel with the map and not affect any other maps.
Usage of the entity is much like that of the multimanager. To add an entry (take smart-edit off if you are using the Valve Hammer Editor/Worldcraft) and add key-value pairs in manually; the key should contain the name of the texture to apply lighting to, and the value a set of numbers representing the red green blue lumionsity(brightness) of the texture, just as you would in the lights.rad file.
The presence of this entity will not override the lights.rad file - both the values specified in this entity and the lights.rad file will be used by HLRAD.
General
https://github.com/ValveSoftware/halflife/blob/master/utils/qrad/qrad.txt https://sites.google.com/site/svenmanor/tutorials/light Also: https://csm.dev/threads/radius-osveschenija-v-half-life.38602/#post-935193 https://github.com/ValveSoftware/halflife/blob/master/utils/qrad/lightmap.c#L1020
Surface lighting
rad file, see #37
TextureName R G B V
TextureName R G B
TextureName V
info_texlights (HLRAD+)
keyvalues
"TextureName"
R G B V Color and brighness (R G B V=Scale)light
https://github.com/ValveSoftware/halflife/blob/master/utils/qrad/lightmap.c#L901
light_spot
https://github.com/ValveSoftware/halflife/blob/master/utils/qrad/lightmap.c#L935
keyvalues
"target"
Target Entity name where the light will be directed to. If validly specified,"pitch"
,"angle"
,"angles"
and initially dark (1
) is ignored."angles"
Pitch Yaw Roll (X Y Z) X Y Z"_cone"
Inner (bright) angle Angle See https://sites.google.com/site/svenmanor/tutorials/light Spotlight section"_cone2"
Outer (fadding) angle Angle See https://sites.google.com/site/svenmanor/tutorials/light Spotlight section"pitch"
Pitch Angle Takes priotity over Pitch inside"angles"
Legacy Pitch"angle"
Angle Angle Takes priotity over Angle inside"angles"
Legacy Yaw"_light"
Brightness R G B V Color and brighness (R G B V=Scale)"_sky"
Is Sky? 0 = no 1 = yes Works like light_environment but does not replace light_environment and can work together."style"
Appearance 0 = normal 1 = flicker A 2 = slow strong pulse 3 = candle A 4 = fast strobe 5 = gentle pulse 6 = flicker B 7 = candle B 8 = candle C 9 = slow strobe 10 = fluorescent flicker 11 = slow pulse, no black"pattern"
Custom Appearance https://twhl.info/wiki/page/VERC%3A_Preset_Light_Appearances https://github.com/FWGS/hlsdk-xash3d/blob/f0b649f50711814c99e758497eae3f0de352fbaf/dlls/world.cpp#L534-L582flags
1
) By default the light source will be turned off and can be turned on by some kind of trigger.light_environment
https://github.com/ValveSoftware/halflife/blob/master/utils/qrad/lightmap.c#L935 Note: Some maps have multiple light_environment entities. If so, every light setting will be listed. В QRAD источники применяются к рядом стоящим SURF_DRAWSKY, в HLRAD light_environment (light_spot _sky=1) единственный глобальный.
keyvalues
"target"
Target Entity name where the light will be directed to. If validly specified,"pitch"
,"angle"
,"angles"
is ignored."angles"
Pitch Yaw Roll (X Y Z) X Y Z"pitch"
Pitch Angle Takes priotity over Pitch inside"angles"
Legacy Pitch"angle"
Angle Angle Takes priotity over Angle inside"angles"
Legacy Yaw"_light"
Brightness R G B V Color and brighness (R G B V=Scale)dynamic_light
TBD
func_wall and etc
keyvalues
"_minlight"
Minimal Light Level"effects"
http://ralertmod.narod.ru/ent_env_model.htm#effects-par https://github.com/FWGS/xash3d-fwgs/blob/ddc4d7666874ce050d33ba6cc5781f08180776c5/common/const.h#L107 https://github.com/FWGS/xash3d-fwgs/blob/ddc4d7666874ce050d33ba6cc5781f08180776c5/engine/client/cl_tent.c#L2699ELIGHT and DLIGHT
https://twhl.info/wiki/page/VERC%3A_Dynamic_Lighting
Specificity of ZHLT/VHLT
http://zhlt.info/entity-changes.html https://sites.google.com/site/svenmanor/tutorials/advancedlight (a lot of useful information)
At least need to be implemented:
info_texlights
keyvalues
"TextureName"
R G B V Color and brighness (R G B V=Scale)Undocumented features
http://ralertmod.narod.ru/hlra-articles-nedok.htm http://ralertmod.narod.ru/ent_env_model.htm#effects-par