Lights.rad

From Valve Developer Community
Revision as of 00:19, 17 September 2008 by MrTwoVideoCards (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Lights.rad, is a file that specifies the color, and Brightness values for materials that can cast and receive Light. This applies to Materials that are of any shader. A lights.rad file already exists within a normal Game directory, however it is possible to make your own.

However these are the current Shaders most commonly used to cast Light:

A lights.rad file can be edited with any preferred text editor, and most commonly looks like this:

lights/white001			250 240 205 100
lights/white002			189 233 247 425
lights/white003			232 246 190 350
lights/white004			170 228 247 425
lights/white005			234 235 220 375
lights/white006			234 235 220 100

Aside that, the file can also specify other parameters beside lighting values. I can also tell VRAD to ignore lighting on certain materials, or to calculate shadows based on a Textures Alpha channel.

The below command tells VRAD to skip shadows casted on this material. Therefore shadows will not be calculated on this material.
noshadow tree_deciduous_01a_branches.vmt

This command, however tells VRAD to calculate shadows based on a models Texture. More importantly on the textures within the Model that contain an Alpha channel.

forcetextureshadow props_wasteland/interior_fence001a.mdl

See Also