Template:Archived page history/VRAD/en: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→Effects) |
||
Line 89: | Line 89: | ||
{{IO|-directsunlightisforadditivemode|Toggles direct sunlight for additive mode.|only=BMS}} | {{IO|-directsunlightisforadditivemode|Toggles direct sunlight for additive mode.|only=BMS}} | ||
{{IO|-ambient|param=vector|Sets the ambient term. Can be used to tweak lightmap color. Appears to just mix the color into all lightmaps.|only=CSGO|also={{Dmmm}}{{slamminsrc}}}} | {{IO|-ambient|param=vector|Sets the ambient term. Can be used to tweak lightmap color. Appears to just mix the color into all lightmaps.|only=CSGO|also={{Dmmm}}{{slamminsrc}}}} | ||
{{IO|-PortalTraversalLighting|Enables static lights to go through static worldportals.|only={{P2CE}}}} | <span id="p2ceparms">{{IO|-PortalTraversalLighting|Enables static lights to go through static worldportals.|only={{P2CE}}}}</span> | ||
{{IO|-PortalTraversalAO|Enables static light AO to go through static worldportals.|only={{P2CE}}}} | {{IO|-PortalTraversalAO|Enables static light AO to go through static worldportals.|only={{P2CE}}}} | ||
{{IO|-softencosine|Softens coloured lighting so it blends more accurately.|only={{slamminsrc}}}} | {{IO|-softencosine|Softens coloured lighting so it blends more accurately.|only={{slamminsrc}}}} |
Revision as of 20:17, 8 December 2023
VRAD is the command-line tool for
Source that takes a compiled BSP map and embeds lighting data into it. VRAD's static and pre-compiled light is bounced around the world with a radiosity algorithm.
VRAD will:
- Generate lightmaps
- Generate ambient samples
- Generate per-object or per-vertex prop_static and detail prop lighting
VRAD is generally the slowest of the three compilers due to the many, many calculations it must perform. Lighting optimization can help, as can ensuring your map is free of leaks.
Syntax
For example:
This will generate and embed both Standard and High Dynamic Range lighting data, at per-vertex detail for prop_static entities. It also generates shadows based on transparency for prop_static entities that have been flagged as casting texture shadows.
Options
Use these in combination with expert compile mode or a batch file.
Effects
{{{1}}}
Performance
- -low
- Run as a low-priority process.
- -threads <integer>
- Override the number of CPU threads used. Maximum is 16 threads (32 in
also in
). With a patched vrad_dll you can use 32 threads.
Tip:If you know that the compile time will be very long and would rather do something else while waiting, it may be useful to specify a number of threads 1 or 2 lower than what your CPU has. This allows the computer to allocate some more power to other applications, making it less choppy while lighting is being compiled. Keep in mind that this may slightly extend your compile time.
- -mpi
- Use VMPI to distribute computations.
- -mpi_pw <string>
- Use a password to choose a specific set of VMPI workers.
- -noextra
- Disable supersampling. This will lead to blockier, more inaccurate lighting.
- -maxchop <integer>
- Coarsest allowed number of luxel widths for a patch, used in face interiors. (Default: 4)
- -LargeDispSampleRadius
- 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.
- -compressconstant <integer>
- Compress lightmaps whose color variation is less than this many units. Todo: Find out if this is branch specific, as it doesn't work with TF2.
- -fastambient
- Uses low quality per-leaf ambient sampling to save compute time.
- -LeafAmbientSampleReduction <float> (only in
)
- Reduction factor for ambient samples. Defaults to 1.0.
- -StaticPropSampleScale <float> (only in
)
- 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 -StaticPropSampleScale 16.
- -disppatchradius <float>
- Sets the maximum radius allowed for displacement patches.
Debugging
- -rederrors
- Emit red light when "a luxel has no samples".
- -vproject <directory>
- -game <directory>
- Override the VPROJECT environment variable.
- -insert_search_path <directory>
- Includes an extra base directory for mounting additional content (like Gameinfo.txt entries). Useful if you want to separate some assets from the mod for whatever reason.
- -v
- -verbose
- Turn on verbose output.
- -novconfig
- Don't bring up graphical UI on vproject errors.
- -dump
- Dump patches to debug files.
- -dumpnormals
- Write normals to debug .txt files.
- -debugextra
- Places debugging data in lightmaps to visualize supersampling.
- -dlightmap
- Force direct lighting into different lightmap than radiosity.
- -stoponexit
- Wait for a keypress on exit.
- -nodetaillight
- Don't light detail props.
- -centersamples
- Move sample centers.
- -loghash
- Log the sample hash table to samplehash.txt.
- -onlydetail
- Only light detail props and per-leaf lighting.
- -maxdispsamplesize <integer>
- Set max displacement sample size (default: 512).
- -FullMinidump
- Write large minidumps on crash.
- -OnlyStaticProps
- Only perform direct static prop lighting.
- -StaticPropNormals
- When lighting static props, just show their normal vector.
- -noskyboxrecurse
- Turn off recursion into 3d skybox (skybox shadows on world).
- -nossprops
- Globally disable self-shadowing on static props.
Lights files
Main article: RAD file#Source 1
Console Output
Todo: Add description about missing outputs output (BuildVisLeafs, other)
See Also
- QRAD -
GoldSrc counterpart.
- VRAD2 & VRAD3 -
Source 2 counterpart.
- Map Compiling Theory
- HDR Lighting Basics
- VRAD HDR Crash Fix
- Static Props show up black