This article's documentation is for anything that uses the Source engine. Click here for more information.

VVIS: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(27 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{Source topicon}}
{{toc-right}}
{{toc-right}}
{{map compile pipeline|source1}}


'''VVIS''' or ''Valve Visible Information Set'' is the [[command-line]] tool that takes a compiled [[BSP]] map and embeds visibility data into it. VVIS tests which [[visleaf|visleaves]] can see each other, and which cannot. See [[Visibility optimization]] for a more detailed explanation.
{{vvis|4}} is the [[command-line]] tool that takes a compiled [[BSP]] map and embeds visibility data into it. VVIS tests which [[visleaf|visleaves]] can see each other and which cannot. See [[Visibility optimization]] for a more detailed explanation.


VVIS will:
VVIS will:
Line 7: Line 10:
* Test visibility between [[visleaf|visleaves]] by [http://www.gdcvault.com/play/1014234/Excerpt-Quake-Postmortem-Optimizing-Level clipping their view planes].
* Test visibility between [[visleaf|visleaves]] by [http://www.gdcvault.com/play/1014234/Excerpt-Quake-Postmortem-Optimizing-Level clipping their view planes].
* Enforce a maximum visibility distance, if configured to.
* Enforce a maximum visibility distance, if configured to.
{{tip|For {{tf2branch|nt=0|4.1}} games and {{gmod|2}}, [https://ficool2.github.io/HammerPlusPlus-Website/tools.html VVIS++] is now available, which generates the same results as stock VVIS but at an ''order of magnitude'' quicker speed.}}
== Syntax ==
== Syntax ==


Line 13: Line 19:
For example:
For example:


  "%sourcesdk%\bin\orangebox\bin\vvis" -tmpout sdk_trainstation_01
  "Half-Life 2\bin\vvis.exe" -tmpout sdk_trainstation_01


This will generate and embed a visibility chart, writing portal data out to <code>.\tmp\sdk_trainstation_01.prt</code>.
This will generate and embed a visibility chart, writing portal data out to <code>.\tmp\sdk_trainstation_01.prt</code>.


==Options==
==Options==
Use these in combination with [[expert compile mode]] or a batch file:
Use these in combination with [[expert compile mode]] or a batch file:


=== Functions ===
=== Functions ===
; <code>-fast</code>
; <code>-fast</code>
: Only do a quick first pass. Does not actually test visibility.
: Only do a quick first pass. Does not actually test visibility.
Line 33: Line 37:
; <code>-tmpout</code>
; <code>-tmpout</code>
: Write portals to <code>\tmp\<mapname></code>.
: Write portals to <code>\tmp\<mapname></code>.
; <code>-trace <start cluster> <end cluster></code> {{source_2007|since}}
: Writes a linefile that traces the vis from one cluster to another for debugging map vis.


=== General ===
=== General ===
 
[[File:32cores16threads.png|300px|thumbnail|right|32 vCore machine running VVIS with only 16 cores used (even though 32 threads were specified)]]
[[File:32cores32threads.png|300px|thumbnail|right|32 vCore machine running VVIS with all cores used (patched vvis used)]]
; <code>-low</code>
; <code>-low</code>
: Run as an idle-priority process.
: Run as an idle-priority process.
; <code>-threads</code>
; <code>-threads</code>
: Control the number of threads used. Defaults to the # of processors (times 2 for Hypertreading/SMT CPU's) on your machine.
: Override the number of CPU threads used. Maximum is 16 threads (32 in {{csgo}}{{slamminsrc}}{{mapbase}}, unlimited in {{tf2}})
:--[[User:Walki|Walki]]: Maximum is [https://developer.valvesoftware.com/w/images/1/1f/32cores16threads.png 16 threads]. With a '''patched''' vvis_dll you can reach [https://developer.valvesoftware.com/w/images/a/ae/32cores32threads.png 32 threads].
:{{Workaround|With a [[Increased_Thread_Limit_for_Compile_Tools|patched vrad_dll]] you can use 32 threads. {{l4d2}} [https://github.com/ficool2/fixtoolthreads fixtoolthreads] is a patch for [[VVIS]] (and [[VRAD]]) that supports ''unlimited'' threads and fixes a thread scaling issue.}}
 
::{{Note|The above mentioned thread scaling issue has been fixed in {{tf2}},{{csgo}},{{l4d2}},{{gmod}}.}}
:{{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.}}
; <code>-verbose (-v)</code>
; <code>-verbose (-v)</code>
: Turn on verbose output
: Turn on verbose output
Line 56: Line 64:
== Console Output ==
== Console Output ==
VVIS prints various information about the compile process to the console. Note that output from older versions of the tool can be different.
VVIS prints various information about the compile process to the console. Note that output from older versions of the tool can be different.
; <code>''number'' portalclusters</code>
; <code>''number'' portalclusters</code>
: The effective number of visleaves in the map (visleaves clustered together with [[func_viscluster]] count as one).  
: The effective number of visleaves in the map (visleaves clustered together with {{Ent|func_viscluster}} count as one).  
; <code>''number'' numportals</code>
; <code>''number'' numportals</code>
: The number of portals connecting the the above visleaves.
: The number of portals connecting the the above visleaves.
Line 79: Line 86:


== See also ==
== See also ==
 
* [[PRT]]
* [[Visibility optimization]]
* [[Visibility optimization]]


{{SDKTools}}
{{sdktools}}


[[Category:Level Design]]
[[Category:Official Source Tools]]
[[Category:Glossary]]
[[Category:Source 1 BSP compilers]]

Latest revision as of 14:21, 28 August 2025

English (en)Español (es)Русский (ru)中文 (zh)Translate (Translate)

VBSPVVISVRADBSPZIP

VVIS VVIS is the command-line tool that takes a compiled BSP map and embeds visibility data into it. VVIS tests which visleaves can see each other and which cannot. See Visibility optimization for a more detailed explanation.

VVIS will:

Tip.pngTip:For Team Fortress 2 branch TF2 branch games and Garry's Mod Garry's Mod, VVIS++ is now available, which generates the same results as stock VVIS but at an order of magnitude quicker speed.

Syntax

vvis [options...] <bsp file>

For example:

"Half-Life 2\bin\vvis.exe" -tmpout sdk_trainstation_01

This will generate and embed a visibility chart, writing portal data out to .\tmp\sdk_trainstation_01.prt.

Options

Use these in combination with expert compile mode or a batch file:

Functions

-fast
Only do a quick first pass. Does not actually test visibility.
-radius_override <int>
Force a maximum vis radius, in units, regardless of whether an env_fog_controller specifies one.
-nosort
Don't sort (an optimization) portals.
-tmpin
Read portals from \tmp\<mapname>.
-tmpout
Write portals to \tmp\<mapname>.
-trace <start cluster> <end cluster> (in all games since Source 2007)
Writes a linefile that traces the vis from one cluster to another for debugging map vis.

General

32 vCore machine running VVIS with only 16 cores used (even though 32 threads were specified)
32 vCore machine running VVIS with all cores used (patched vvis used)
-low
Run as an idle-priority process.
-threads
Override the number of CPU threads used. Maximum is 16 threads (32 in Counter-Strike: Global OffensiveSlammin' Source Map ToolsMapbase, unlimited in Team Fortress 2)
PlacementTip.pngWorkaround:With a patched vrad_dll you can use 32 threads. Left 4 Dead 2 fixtoolthreads is a patch for VVIS (and VRAD) that supports unlimited threads and fixes a thread scaling issue.
Note.pngNote:The above mentioned thread scaling issue has been fixed in Team Fortress 2,Counter-Strike: Global Offensive,Left 4 Dead 2,Garry's Mod.
Tip.pngTip: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.
-verbose (-v)
Turn on verbose output
-novconfig
Don't bring up graphical UI on vproject errors.
-mpi
Use VMPI to distribute computations.
-mpi_pw <string>
Use a password to choose a specific set of VMPI workers.
-vproject <string>
-game <string>
Override the VPROJECT environment variable.

Console Output

VVIS prints various information about the compile process to the console. Note that output from older versions of the tool can be different.

number portalclusters
The effective number of visleaves in the map (visleaves clustered together with func_viscluster count as one).
number numportals
The number of portals connecting the the above visleaves.
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (time taken in seconds)
Rough visibility calculations that are used to trivially weed out unseen areas from the final calculations.
PortalFlow: 0...1...2...3...4...5...6...7...8...9...10 (time taken in seconds)
Runs the actual visibility algorithm to determine which visleaves can see each other. Not run with -fast.
Optimized: number visible clusters (percentage)
Compression of the visibility data.
Total clusters visible: number
The total number of occurrences of visleaves being able to see each other in the calculated data.
Average clusters visible: number
The average number of leaves you can potentially see from each visleaf.
Building PAS...
Calculates the Potentially Audible Set.
Average clusters audible: number
The average number of leaves you can potentially hear into from each visleaf.
visdatasize: number compressed from number
Size of the visibility data in bytes. Max size is 16 MB in Source 2013.

See also