Half-Life Re-imagined competition results on their way...
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to neophus775, our newest member!


Site Stuff






Feeling Blue

What's your favourite shade of blue?














4 mins


5 mins


6 mins


7 mins


19 mins

ninja defuse

23 mins


46 mins



A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

QRAD Textures and the RAD File

By Chris 'autolycus' Bokitch

Textures in Half-Life can be set to throw light as if they were light entities. To do so, they must be referenced in a RAD file. A texture thus referenced will always throw light: every example of that texture in the level will throw identical light. Further, this light cannot be turned off, so creating on/off textures for lights that one expects to switch should not be given qrad values: those lights need to be light entities.

    note: further tool development has brought about the ability to switch texture lights on and off. Since this depends on third party tools rather than the default ones, this area will not be discussed here.

There are three types of RAD file: lights.rad, a global RAD file; designer.rad, a user-specified RAD file; and levelname.rad, a RAD file that is automatically parsed if it exists in the same folder when compiling a map of the same name. The designer.rad supersedes the lights.rad, and the levelname.rad supersedes the designer.rad, in case a texture is specified in multiple files.

A texture can be given an RGB value in the RAD file, or an RGBV value. RGBV values are a little easier to understand sometimes, but you may use either. The amount of light a texture throws off is directly proportional to how much of that texture is visible, so TextureA on a 4x4 pixel face may throw off very little light, while the same texture on a 128x128 pixel face may flood a room completely with light. It?s best to decide on a light value for a texture and use that texture similarly under all circumstances: that?s the best way to know what things will look like in the engine. A designer usually handles the qrad file for a map, but the texture artist should also know when textures get used in this way.

    Note: to use the designer.rad file, use the -lights designer.rad parameter with the RAD tools -- qrad.exe by default, or hlrad.exe if you're using Zoner's tools.

A RAD file is a text file that looks like this:

TexlightA     255 0 0
TexlightB     25500 36000 1000
TexlightC     128 128 0 10000
TexlightD     100 128 225 1000

The first texture is just RGB values, the second is RGB where the texture needs to be really powerfully bright: perhaps it will always appear on very small faces but be asked to throw a lot of light, like a small halogen bulb. As you can see, with three values like that, it can be tough to know exactly what color light the thing is, because there?s no paint program that will show you what the values 25500 36000 1000 work out to. The better way is to add the V number, so you can more readily understand the exact color (by bringing up a paint program and generating the color you want, and writing down the RGB values), and increasing the strength of the light is merely a matter of adjusting the final number up or down. Given an RGBV sequence, the RGB values must be between 0 and 255. The V can be anything. Given just RGB, they can be any value, but again, it?s tougher to predict what the light will be, and tougher to adjust the texture to be brighter or darker.