Visleaf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
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|Обычная структура visleaf-ов для сцены выше. Обратите внимание что leaf 2 не может видеть leaf 3.]]
[[Image:Opt_pvs_good.jpg|thumb|The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.]]


Каждый '''visleaf''' (иногда говориться просто '''leaf''') это полый объем на карте, который определяет 'группу' видимых поверхностей. Каждая видимая поверхность на карте является частью того или иного visleaf. Visleaf-ы прежде всего используются <i>Рендером движка</i> для определения (перед прорисовкой каждого кадра) какие области на карте могут нуждаться в прорисовке на экране. Если ''какая-либо часть'' visleaf[[PVS|потенциально видима]] с ''любой части'' текущего visleaf, то содержимое того visleaf-а тоже рисуется движком.  
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.  


Visleaf-ы создаются автоматически из [[BSP|BSP дерева]] компилятором [[vvis|VVIS]]. Каждая (внутренняя) поверхность visleaf-а это либо поверхность [[World brush|Мирового браша]] либо ''Портал'' к соседнему 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.  


The [[ConVar|Консольная команда]] "'''<code>[[mat_leafvis]] 1</code>'''" красным цветом рисует каркас коробки visleaf-а в котором находится игрок и перерисовывается каждый раз, когда игрок входит в новый visleaf. Visleaf-ы также можно просмотреть с помощью программы [[glview]].
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): 'группа' visleaf-ов которые рисуются движком в данный момент.
*[[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]] это зазаоры в BSP геометрии, которые мешают созданию visleaf-ов.
**[[Leaks]] are gaps in the BSP geometry that prevent leaf generation
** [[Hint brush]]и сообщают компилятору о необходимости разрезать visleaf-ы.
** [[Hint brush]]es tell the compiler to split leaves
*Создание visleaf-ов:  
*Visleaf generation:  
** Компилятор [[vvis|VVIS]].
** [[vvis|VVIS]] compiler.
** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Великолепное объясснение теории visleaf-ов Ральфом ван Хурном].
** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Ralph van Hoorn's excellent explanation of visleafs].


{{otherlang:ru}}
[[Category:Level Design]]
 
[[Category:Glossary]]
[[Category:Glossary:ru]]

Revision as of 12:28, 11 January 2010

A sample scene with two rooms.
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 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