Lights.rad: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixup)
(cleanup)
Line 1: Line 1:
= Overview =
'''Lights.rad''' is a plain text file that can be used to manipulate the way [[Vrad|VRAD]] handles given [[material]]s when compiling static lighting. It performs three functions:
'''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:
#Makes a material applied to a [[brush]] surface '''emit light''' (numbers are [[RGBA]]).
#:<pre>lights/my_lightpanel 250 240 205 100</pre>
#'''Prevents static shadows''' from being cast on a material.
#:<pre>noshadow tree_deciduous_01a_branches.vmt</pre>
#Forces shadows ''of a [[model]]'' to be calculated '''using its material's [[$translucent|translucency]]''', as opposed to its polygons.
#:<pre>forcetextureshadow props_wasteland/interior_fence001a.mdl</pre>


* [[LightmappedGeneric]]
{{todo|Can you force texture shadows on a material?}}
* [[UnlitGeneric]]


A lights.rad file can be edited with any preferred text editor, and most commonly looks like this:
== See Also ==
 
* [[Vrad|VRAD]]
lights/white001 250 240 205 100
* [[Creating a Material]]
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. It can also tell [[Vrad | 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.
[[Category:Level design]]
noshadow tree_deciduous_01a_branches.vmt
 
This command, however tells VRAD to calculate shadows based on a [[model]]s Texture. More importantly on the textures within the Model that contain an Alpha channel.
 
forcetextureshadow props_wasteland/interior_fence001a.mdl
 
= See Also =
* [[ Vrad | VRAD]]
* [http://developer.valvesoftware.com/wiki/Category:List_of_Shaders List of Shaders]
* [[Creating a Material]]

Revision as of 03:04, 17 September 2008

Lights.rad is a plain text file that can be used to manipulate the way VRAD handles given materials when compiling static lighting. It performs three functions:

  1. Makes a material applied to a brush surface emit light (numbers are RGBA).
    lights/my_lightpanel	250 240 205 100
  2. Prevents static shadows from being cast on a material.
    noshadow tree_deciduous_01a_branches.vmt
  3. Forces shadows of a model to be calculated using its material's translucency, as opposed to its polygons.
    forcetextureshadow props_wasteland/interior_fence001a.mdl
Todo: Can you force texture shadows on a material?

See Also