Visleaf: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
MossyBucket (talk | contribs) (Described how to examine visleaves better.) |
||
Line 7: | Line 7: | ||
Visleafs are generated automatically from the [[BSP|BSP tree]] by the [[vvis|VVIS]] compile tool. Each (internal) surface of a visleaf is either a [[World brush]] surface or a ''Portal'' to an adjacent visleaf. | Visleafs are generated automatically from the [[BSP|BSP tree]] by the [[vvis|VVIS]] compile tool. Each (internal) surface of a visleaf is either a [[World brush]] surface or a ''Portal'' to an adjacent visleaf. | ||
==Examination== | |||
You can examine visleaves in the following ways: | |||
* If you own the [[Orange Box]], you can access Hammer's {{key|Map > Load Portal File}} feature. | |||
* You can use the [[glview]] tool. | |||
* You can change [[console variable]]s through the [[Developer Console]]. (Entering "'''<code>[[mat_wireframe]] 3</code>'''" will display all rendered leaves, and "'''<code>[[mat_leafvis]] 1</code>'''" will outline the player's current visleaf.) | |||
==See also== | ==See also== |
Revision as of 14:35, 31 January 2011
Each visleaf (sometimes referred to simply as a leaf) is a hollow volume in a map which defines a 'cluster' of visible surfaces. Every visible surface of a map is part of one visleaf or another. Visleafs are used primarily by the Rendering Engine to determine (before rendering each frame) which areas of the map might need to be rendered on screen. When any part of a visleaf is potentially visible from any part of the current visleaf, the entire contents of that visleaf are considered for rendering.
Visleafs are generated automatically from the BSP tree by the VVIS compile tool. Each (internal) surface of a visleaf is either a World brush surface or a Portal to an adjacent visleaf.
Examination
You can examine visleaves in the following ways:
- If you own the Orange Box, you can access Hammer's Load Portal File">Map > Load Portal File feature.
- You can use the glview tool.
- You can change console variables through the Developer Console. (Entering "
mat_wireframe 3
" will display all rendered leaves, and "mat_leafvis 1
" will outline the player's current visleaf.)
See also
- PVS (Potentially Visible Set): the 'cluster' of visleaves that are currently being drawn
- PAS (Potentially Audible Set): as above, but for sound
- Visibility optimization
- Leaks are gaps in the BSP geometry that prevent leaf generation
- Hint brushes tell the compiler to split leaves
- Visleaf generation: