Difference between revisions of "Visleaf"

From Valve Developer Community
Jump to: navigation, search
m
Line 3: Line 3:
 
[[Image:Opt_pvs_good.jpg|thumb|The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.]]
 
[[Image:Opt_pvs_good.jpg|thumb|The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.]]
  
A visleaf, or a leaf, is a type of volume in a map created by the visibility compile tools. When '''any part''' of a leaf is visible from '''any part''' of the current leaf, '''the entire contents of that leaf are considered for rendering'''.
+
A '''visleaf''' or a '''leaf''' is a volume in a map generated from the [[BSP|BSP tree]] by the [[vvis|VVIS]] compile tool. Visleafs are used primarily by the Rendering Engine (for each rendered frame) to determine which areas of the map might need to be rendered on screen. When ''any part'' of a visleaf is visible from ''any part'' of the current visleaf, ''the entire contents of that leaf are considered for rendering''.
  
 
The [[ConVar|console variable]] "'''<code>[[mat_leafvis]] 1</code>'''" draws a red wireframe box around the Player's current visleaf, which is redrawn each time a new leaf is entered.
 
The [[ConVar|console variable]] "'''<code>[[mat_leafvis]] 1</code>'''" draws a red wireframe box around the Player's current visleaf, which is redrawn each time a new leaf is entered.
Line 12: Line 12:
 
*[[PVS]] (Potentially Visible Set) is a localised 'cluster' of visleafs used as a filter in visibility tests.
 
*[[PVS]] (Potentially Visible Set) is a localised 'cluster' of visleafs used as a filter in visibility tests.
 
*[[PAS]] (Potentially Audible Set)
 
*[[PAS]] (Potentially Audible Set)
*[[vvis|VVIS]] compiler.
+
 
*Visleaf optimisation: [[Hint brush]]es
+
*Visleaf generation:
*Visleaves calculation: [[Optimization (Geometry)#Visibility]]
+
** [[vvis|VVIS]] compiler.
*[[Controlling Geometry Visibility and Compile Times]]
+
** [[Optimization (Geometry)#Visibility]] and
*[http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Ralph van Hoorn's excellent explanation of visleafs].
+
** [[Visibility determination]]
 +
** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Ralph van Hoorn's excellent explanation of visleafs].
 +
 
 +
*Visleaf optimisation:
 +
** [[BSP Map Optimization]]
 +
** [[Controlling Geometry Visibility and Compile Times]]
 +
** [[Hint brush]]es
 +
 
 +
 
 +
 
  
 
[[Category:Level Design]]
 
[[Category:Level Design]]
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Revision as of 16:40, 13 May 2008

A sample scene with two rooms.
The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.

A visleaf or a leaf is a volume in a map generated from the BSP tree by the VVIS compile tool. Visleafs are used primarily by the Rendering Engine (for each rendered frame) to determine which areas of the map might need to be rendered on screen. When any part of a visleaf is visible from any part of the current visleaf, the entire contents of that leaf are considered for rendering.

The console variable "mat_leafvis 1" draws a red wireframe box around the Player's current visleaf, which is redrawn each time a new leaf is entered.

Leaves can also be examined from the desktop with the glview tool.

See also

  • PVS (Potentially Visible Set) is a localised 'cluster' of visleafs used as a filter in visibility tests.
  • PAS (Potentially Audible Set)