VERC: QRAD Textures and the RAD File
Last edited 15 years ago2002-11-16 15:07:00 UTC by
- View Page
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 0TexlightB 25500 36000 1000TexlightC 128 128 0 10000TexlightD 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.
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.
You must log in to post a comment.
You can login or register a new account.