Visleaf: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Image:Opt_pvs_blank.jpg|thumb| | [[Image:Opt_pvs_blank.jpg|thumb|A sample scene with two rooms.]] | ||
[[Image:Opt_pvs_good.jpg|thumb| | [[Image:Opt_pvs_good.jpg|thumb|The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.]] | ||
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 [[PVS|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|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. | |||
The [[ConVar| | 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 visleaf is entered. Visleafs can also be examined from the desktop with the [[glview]] tool. | ||
==See also== | ==See also== | ||
*[[PVS]] (Potentially Visible Set): ' | *[[PVS]] (Potentially Visible Set): the 'cluster' of visleaves that are currently being drawn | ||
*[[PAS]] (Potentially Audible Set): | *[[PAS]] (Potentially Audible Set): as above, but for sound | ||
*[[Visibility optimization | *[[Visibility optimization]] | ||
**[[Leaks]] | **[[Leaks]] are gaps in the BSP geometry that prevent leaf generation | ||
** [[Hint brush]] | ** [[Hint brush]]es tell the compiler to split leaves | ||
* | *Visleaf generation: | ||
** | ** [[vvis|VVIS]] compiler. | ||
** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs | ** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Ralph van Hoorn's excellent explanation of visleafs]. | ||
[[Category:Level Design]] | |||
[[Category:Glossary]] | |||
[[Category:Glossary |
Revision as of 12:28, 11 January 2010
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.
The console variable "mat_leafvis 1
" draws a red wireframe box around the Player's current visleaf, which is redrawn each time a new visleaf is entered. Visleafs can also be examined from the desktop with the glview tool.
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: