Difference between revisions of "Visleaf"

From Valve Developer Community
Jump to: navigation, search
Line 5: Line 5:
 
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 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'''.
  
You can view the current leaf in the engine by submitting <code>mat_leafvis 1</code> to the console. A red wireframe box will be drawn, and will redraw 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.
  
 
Leaves can also be examined from the desktop with the [[glview]] tool.
 
Leaves can also be examined from the desktop with the [[glview]] tool.
  
 
==See also==
 
==See also==
 
+
*[[PVS]] (Potentially Visible Set) is a localised 'cluster' of visleafs used as a filter in visibility tests.
 +
*[[PAS]] (Potentially Audible Set)
 +
*[[vvis|VVIS]] compiler.
 
*Visleaf optimisation: [[Hint brush]]es
 
*Visleaf optimisation: [[Hint brush]]es
 
*Visleaves calculation: [[Optimization (Geometry)#Visibility]]
 
*Visleaves calculation: [[Optimization (Geometry)#Visibility]]

Revision as of 19:14, 9 April 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 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.

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