RAD file: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{draft}} == Source 1 == A light file is a plain text file that can be used to manipulate the way VRAD handles given materials when compiling static lighting. Al...")
 
mNo edit summary
Line 1: Line 1:
{{draft}}
{{draft}}{{cleanup|Recently moved from [[VRAD]], in order to also cover [[QRAD]] and [[HLRAD]]}}
== Source 1 ==
 
== {{goldsrc|4}} ==
{{modernDeprecated|Use [[info_texlights]] instead. Alternatively, [[light_surface]] can be used, providing more options]].}}
 
;{{mono|<material> <red> <green> <blue> <intensity>}}
:Makes the material emit the given light value when applied to a [[brush]] face ({{mono|hdr_}} values are optional). Texture scale has an effect on final intensity.
 
== {{src|4|nt=0}} ==


A light file is a plain text file that can be used to manipulate the way [[Vrad|VRAD]] handles given [[material]]s when compiling static lighting. All lights files must have the .rad file extension and must be in the same folder as your [[gameinfo.txt]], except for {{mono|<mapname>.rad}}, which should be in the same folder as the uncompiled VMF.
A light file is a plain text file that can be used to manipulate the way [[Vrad|VRAD]] handles given [[material]]s when compiling static lighting. All lights files must have the .rad file extension and must be in the same folder as your [[gameinfo.txt]], except for {{mono|<mapname>.rad}}, which should be in the same folder as the uncompiled VMF.

Revision as of 10:39, 31 July 2023

Icon-under construction-blue.png
This is a draft page. It is a work in progress open to editing by anyone.
Remember to check for any notes left by the tagger at this article's talk page.
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
Recently moved from VRAD, in order to also cover QRAD and HLRAD
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

GoldSrc GoldSrc

Obsolete-notext.pngDeprecated:Use info_texlights instead. Alternatively, light_surface can be used, providing more options]].
<material> <red> <green> <blue> <intensity>
Makes the material emit the given light value when applied to a brush face (hdr_ values are optional). Texture scale has an effect on final intensity.

Source Source 1

A light file is a plain text file that can be used to manipulate the way VRAD handles given materials when compiling static lighting. All lights files must have the .rad file extension and must be in the same folder as your gameinfo.txt, except for <mapname>.rad, which should be in the same folder as the uncompiled VMF.

There are:

  1. lights.rad, the global file.
  2. An auto-loaded map light file, using the format <mapname>.rad. The file must be placed in the same folder as <mapname>.vmf.
  3. Any number of additional lights files that can be added with the -lights parameter.

An example rad file, can be found here (from Half-Life 2).

Rules

Lights files perform these functions, one rule per line:

<material> <red> <green> <blue> <intensity> <hdr_red> <hdr_green> <hdr_blue> <hdr_intensity>
Makes the material emit the given light value when applied to a brush face (hdr_ values are optional). Texture scale has an effect on final intensity.
Note.pngNote:The material does not truly emit light, but instead, a light entity is generated across the surface. More technically, lights are placed at the center of every subdivision on the surface. The brightness of each light is distributed uniformly, by taking the area of each subdivision. Lower lightmap scales will increase subdivision and therefore more lights will be created. This will not occur on textures that are unlit, as no subdivision occurs on these textures. Leaf splits will still incur subdivision however, which might make the light creation unpredictable (using a func_detail will avoid this). It may be smarter and cheaper to instead manually place light entities near the material.
Note.pngNote:Materials that aren't in a folder must have a slash before their name.
Warning.pngWarning:A func_detail with an emissive material applied on a face may randomly cause VRAD to fail computing lighting for the face.
noshadow <material name>
Prevents the named material from casting shadows.
forcetextureshadow <model path>.mdl
Enables translucency shadow testing for a model when VRAD is run with -TextureShadows. Path is relative to the models folder.
ldr:
hdr:
Prefixes to make any rule only apply to SDR or HDR lighting.
hdr:ldr:
Lines beginning with both tags (in that order) will always be ignored by VRAD. Can be used to add comments or quickly disable some entries.