- 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.
vrad [options...] <bsp file>
"%sourcesdk%\bin\orangebox\bin\vrad" -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.
%sourcesdk%\bin\orangebox\(or ep1 as the case may be). You can do this with the
cdcommand, or by setting the "Start In" value of a Windows shortcut. In Batch Compiler, set the BinRoot variable.
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.
- Increases the quality of light_environment and indirect lighting by spending more time firing rays.
- Trace N times as many rays for indirect light and sky ambient. (-final is equivalent to -extrasky 16; normal is equivalent to -extrasky 1)
- Load a custom lights file in addition to
lights.radand map-specific lights file.
- 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.
- Treat the sun as an area light source of this many degrees. Produces soft shadows. Recommended values are 0-5, default is 0.
- Generate per-vertex prop_static lighting; always enabled for light_spot entities. Disables info_lighting entities on props WITHOUT normal maps.
- Perform shadow tests of
prop_statics at polygon precision. Default is to use collision meshes.
- Generates lightmap shadows from $translucent surfaces 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.
- Run as a low-priority process.
- Override the number of CPU threads used.
- Use VMPI to distribute computations.
- Use a password to choose a specific set of VMPI workers.
- Disable supersampling.
- Smallest number of luxel widths for a bounce patch, used on edges.
- Coarsest allowed number of luxel widths for a patch, used in face interiors.
- 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.
- Emit red light when "a luxel has no samples".
- Override the VPROJECT environment variable.
- 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.
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
- 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: 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.