- Generate lightmaps
- Generate ambient samples
- Generate per-object or per-vertex prop_static and detail prop lighting
9...this is usually because VRAD takes longer with each light bounce calculation.
.mdlfiles that don't have
.dx80.vtxfiles with them will lead to VRAD skipping lighting for that prop. Copying the
.dx90.vtxfile and renaming it to a
.dx80.vtxwill fix the issue.
A windows batch file to do this automatically has been created here:  (place above model folder and run .bat)
.mdlfiles that have the
IDST1header will fail to load for VBSP, and will give a error message stating the prop failed to load; this can be fixed by changing the header to
IDST0in a Hex Editor, or by recompiling the prop in a non-L4D branch Studiomdl application such as Source 2013.
- Tip: Source Engine BSP Lightmap Editor can be used to manually correct a .bsp lightmap data.
vrad [options...] <bsp file>
"Half-Life 2\bin\vrad.exe" -both -StaticPropLighting sdk_trainstation_01
This will generate and embed both standard and High Dynamic Range lighting data, at per-vertex detail for prop_static entities.
Use these in combination with expert compile mode or a batch file.
- Whether to compile standard or High Dynamic Range lighting, or both.
- Quick and dirty lighting. Don't ship with this.
-fastwill cause random and miscolored splotching to appear in darker areas.
- Increases the quality of
light_environmentand indirect lighting by spending more time firing rays.
- Trace N times as many rays for indirect light and sky ambient. (
-finalis equivalent to
-extrasky 16; normal is equivalent to
- Load a custom lights file in addition to
lights.radand the map-specific lights file. Include the file extension in the parameter.
- Set the maximum number of light ray bounces. (default: 100).
- Set the threshold for smoothing groups, in degrees (default: 45).
- Scale down all luxels. Default (and maximum) value is 1.
- Scale the $reflectivity of all textures. Default 1.0
- Treat the sun as an area light source of this many degrees. Produces soft shadows. Recommended values are 0-5, default is 0. Identical to the SunSpreadAngle parameter for
light_environment, use that instead.
- Generate per-vertex lighting on
prop_statics; always enabled for
info_lightingentities on props without bump maps. Does not work on props with bump maps, except in .
- Warning: This can increase your map's filesize substantially. Disable vertex lighting for props that don't need it to keep filesize low.
- Use the actual meshes of static props to generate shadows instead of using their collision meshes. This results in far more accurate shadowing.
- Generates lightmap shadows from
$translucentsurfaces of models (NOT brushes) that are specified in a lights file and being used with
prop_static. Usually requires
-StaticPropPolysto have any effect.
- Note: A surface will need a low lightmap scale for most texture shadows to be recognisable.
- Note: For some strange reason this will not work if a translucent texture's VMT file contains the .vtf file ending in the basetexture lines.
- Scales the intensity of VRAD's simulated ambient occlusion. 1.0 is default.
- Tip: Valve uses 1.5 for the new Dust 2.
- Set the radius of VRAD's simulated ambient occlusion. To do: Figure out what exactly this does.
- How many samples to use for VRAD's simulated ambient occlusion.
- Number of static prop light bounces to simulate. The default is 0.
- Tip: Valve uses 3 static prop bounces for the new Dust 2.
- Note: Any static props that you want light to bounce off of must also have their "Enable Bounced Lighting" keyvalue set.
- Replaced by
- Will use the old lighting algorithm on props, light affects them much more.
- Enables chopping of texture lights generated from a lights file. Control texture light quality with lightmap density in Hammer. Dramatically increases both texture light quality and compile time.
- Enable overscaling of light transfers.
- This is the scale factor of light transfers. Increased values make surfaces transfer extra light (scale of 2-4 suggested). Default 1.0.
- This is the threshold that checks how saturated a material color is. Used with
-satthreshscale. Default 0.4.
- The amount to scale light transfers from surfaces that pass the saturation threshold. Default 3.0.
- Enable lightmapped ambient occlusion
- Use an improved algorithm for the ambient occlusion
- indicates that lightmap alpha data is interleved in the lighting lump, required for CSM.
- Enables VRAD to compute skylight ambient color by using actual values from skybox.
- Scale factor of -realskylight intensity. Default: 1.0
- Toggles direct sunlight for additive mode.
- Run as a low-priority process.
- Override the number of CPU threads used. Maximum is 16 threads. With a patched vrad_dll you can use 32 threads.
- Use VMPI to distribute computations.
- Use a password to choose a specific set of VMPI workers.
- Disable supersampling. This will lead to blockier, more inaccurate lighting.
- Smallest number of luxel widths for a bounce patch, used on edges. (Default: 4)
- Coarsest allowed number of luxel widths for a patch, used in face interiors. (Default: 4)
- Smallest acceptable luxel width of displacement patch face. (Default: 8)
- This can be used if there are splotches of bounced light on terrain. The compile will take longer, but it will gather light across a wider area.
- Compress lightmaps whose color variation is less than this many units. To do: Find out if this is branch specific, as it doesn't work with TF2.
- Uses low quality per-leaf ambient sampling to save compute time.
- To do Used on dz_sirocco.
- Disables compiling simulated ambient occlusion for lightmaps.
- Regulates the generated per-vertex prop_static lighting.
- slow: 16 (high quality); default: 4 (normal); fast: 0.25 (low quality)
- Note: -final is the equivalent of having -StaticPropLightingScale 16.
- Emit red light when "a luxel has no samples".
- Override the VPROJECT environment variable.
- To do: What does this do?
- Turn on verbose output.
- Don't bring up graphical UI on vproject errors.
- Dump patches to debug files.
- Write normals to debug .txt files.
- Places debugging data in lightmaps to visualize supersampling.
- Force direct lighting into different lightmap than radiosity.
- Wait for a keypress on exit.
- Don't light detail props.
- Move sample centers.
- Log the sample hash table to samplehash.txt.
- Only light detail props and per-leaf lighting.
- Set max displacement sample size (default: 512).
- Write large minidumps on crash.
- Only perform direct static prop lighting.
- When lighting static props, just show their normal vector.
- Turn off recursion into 3d skybox (skybox shadows on world).
- Globally disable self-shadowing on static props.
- Dump computed prop lightmaps.
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.
lights.rad, the global file.
- An auto-loaded map light file, using the format
<map name>.rad. The file must be placed in the same folder as
- Any number of additional lights files that can be added with the
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: The material does not truly emit light, but instead, a
lightentity is generated every four luxels across a brush face using a lit material. It may be smarter and cheaper to instead manually place
lightentities near the material.
- Note: Materials that aren't in a folder must have a slash before their name.
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.
- Prefixes to make any rule only apply to LDR or HDR lighting.
- 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.
To do: Add description about missing outputs output (BuildVisLeafs, other)