Back to the Index
These are flags which can be set for certain entities in maps to trigger certain functionality of the compile tools.
|_diffuse_light r g b||
Gives the colour and intensity of the diffuse lighting, i.e. light from the sky, not from the sun. Applies to the light_environment entity.
This allows a different colour for the diffuse light from a light_environment, more accurately mimicking real-world lighting (yellow sun, blue sky).
It should be fully backwards-compatible with older maps - if there's no '_diffuse_light' key, it uses the intensity from the standard '_light' key.
Set fade (larger values = shorter lights). Applies to any light, light_environment, or light_spot entities.
This value adds in an artificial factor into the normal (1 / dist * dist) inverse square falloff calculations, by multiplying the denominator of the scale by the fade value. Point lights can set their own individual fade and falloff values, which override any global setting on the command line. These calculations only affect the direct lighting layer, as the radiosity pass always uses plain inverse square falloff. The default value is 1.0, and as you approach 0.0 the lights will travel much further, and as you go higher than 1.0, they will travel less.
Set falloff mode (1 = inv linear, 2 = inv square). Applies to any light, light_environment, light_spot entities.
This option can change the normal inverse square falloff of lighting in the direct lighting layer with inverse falloff.
Set optional light placement. Can be applied to any brush based entity.
light_origin can be used to place a brush based entity to a new location for the purposes of lighting. Typical use requires placing an info_target at the relevant location, and then setting the light_origin to point the info_target's name. If the entity is opaque, it will also cast shadows from that location in addition to being lit as if it were there.
Set a style of lighting for the texlight. Can be applied to any brush based entity.
Available styles are:
The Grouped setting is essentially a hack to allow your texlights to be switchable. To use it, create a brush entity with texlights on it, and set its style to Grouped; then create a light entity with the same name as the brush entity. HLRAD will now pretend that the light emitted by the texlight is "really" being emitted by your light entity. In other words, turning the light on and off will now turn the texlights on and off, too.
You'll probably want to set the brightness of the light entity to 0.01, so that it emits no light of its own (this trick is unnecessary if you're using Spirit of Half-Life, which supports switchable texlights directly).
Defines the transparency and colouring of brush based entities for the purposes of the shadows that those brushes cast. Can be applied to any brush based entity.
To use this feature, the brush based entity must have its opaque flag set in zhlt_lightflags. This opaque brush entity will now cast normal shadows, just like any other brush.
To customise this shadow, add this key. The value represents how opaque the brush based entity should be treated in HLRAD, on a scale from 1.0 to 0.0 (where 1.0 is fully opaque, casting a full shadow, and 0.0 being fully transparent, casting no shadow).
Additionally, colour may be added to this shadow. Instead of defining one value, define 3, representing the RGB values of the shadow (on the same scale). For example, if you wanted a brush to cast a red shadow (for say, a red stain glass window effect), you would use a value like value 0.5 0.0 0.0
If you specify any value above 1.0, HLRAD will cast additional light (useful for and effect that may require luminecent shadows, or another effect that may require a particular shape of light).
By default, none of these will take effect on bounced light; for this to occur, you must specify the -customshadowwithbounce parameter in HLRAD.
Makes the entity invisible. Can be applied to any brush based entity.
Adding this key with a non-empty value to any brush entity will cause the entity to be invisible in the game and not contribute to r_speed values (this is the same as using the NULL texture for the entire entity). If the value is set to 0, this attribute is ignored.
Set optional lightflags. Can be applied to any brush based entity.
For opaque brushes, it will be frequently necessary to place point lights inside the brush so that faces obscured by the brushes are properly lit (for example the trim adjacent to a func_door). Setting the opaque bit is useful for most func_wall's, some func_illusionary's, the occasional func_door, and possibly others for some effect.
The 'EmbeddedFix' is for telling HLRAD to not used the complex light bleed fix on the entity, as sometimes when creating a brush entity that sticks through a wall, it will be lit incorrectly from the other side of the wall due to the bleed correction.
The 'ConcaveFix' is needed for curved func_wall's, notably arch shapes. When they are set to opaque, the inner curve (the concave porition) will frequently have black fringes at the joins where brushes touch up. Setting the ConcaveFix flag fixes the black seams in these cases, but then the entity cannot have the EmbeddedFix set.
Strips all clipping information from the entity. Can be applied to any brush based entity.
Adding this key with a non-empty value to any brush entity will cause ALL clipping information for the brush entity to be stripped, making the entity non-solid in the game. If the value is set to 0, this attribute is ignored.
Back to top
Back to the Index
This is a point-based entity that you can place in your map, from which you can select standard compile settings instead of using the command line switches.
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.
Back to top
Back to the Index