Visleaf: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Rewrite Template:Lang to Template:LanguageBar. This action was performed by a bot.)
 
(26 intermediate revisions by 19 users not shown)
Line 1: Line 1:
[[Image:Opt_pvs_blank.jpg|thumb|Образец сцены с двумя комнатами.]]
{{LanguageBar|Visleaf}}
[[File:Opt_pvs_blank.jpg|thumb|A sample scene with two rooms.]]


[[Image:Opt_pvs_good.jpg|thumb|Обычная структура visleaf-ов для сцены выше. Обратите внимание что leaf 2 не может видеть leaf 3.]]
[[File: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-а тоже рисуется движком.
{{Distinguish|VisGroup}}


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


The [[ConVar|Консольная команда]] "'''<code>[[mat_leafvis]] 1</code>'''" красным цветом рисует каркас коробки visleaf-а в котором находится игрок и перерисовывается каждый раз, когда игрок входит в новый visleaf. Visleaf-ы также можно просмотреть с помощью программы [[glview]].
Visleaves 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.  


==See also==
== Examination ==


*[[PVS]] (Potentially Visible Set): 'группа' visleaf-ов которые рисуются движком в данный момент.
There are three ways to inspect visleaves:
*[[PAS]] (Potentially Audible Set): то же что и выше, только для звуков.
*[[Visibility optimization|Оптимизация видимости]]
**[[Leaks]] это зазаоры в BSP геометрии, которые мешают созданию visleaf-ов.
** [[Hint brush]]и сообщают компилятору о необходимости разрезать visleaf-ы.
*Создание visleaf-ов:
** Компилятор [[vvis|VVIS]].
** [http://www.student.ru.nl/rvanhoorn/optimization.php?chapter=visleafs Великолепное объясснение теории visleaf-ов Ральфом ван Хурном].


{{otherlang:ru}}
* From Hammer Editor since [[Orange Box (engine branch)|Orange Box]] (Source 2007 and later), the leaves of the current map can be viewed directly in the 3D view through the menu option ''Map > Load Portal File''. This displays leaf edges that touch other edges as thick blue lines.


[[Category:Glossary:ru]]
* From the desktop, the [[glview]] tool application (located in the ''common\[game]\bin'' folder) can be used.
 
{{tip|For even more clarity use auto [[visgroup]]s to remove objects from your map that don't block visibility – i.e. everything but "World Geometry".}}
 
* From the [[Developer Console]], the [[console variable]] [[mat leafvis]] can be used. (<code>mat_leafvis 3</code> will display all visleaves in the [[PVS]].)
 
{{note|Do not confuse visleaves with the squares outlining worldbrush geography seen if you use <code>[[mat_wireframe]] 3</code>.}}
 
* From 3ds Max using {{wallwormmtools|4}}, the leaves of the current map can be viewed directly in the 3D view through the menu option ''Wall Worm > Wall Worm Level Design > Wall Worm Map Compile Tools > Load PRT File''. This displays leaf edges that touch other edges as thick yellow lines. You can select a line (portal) that will allow you to select or flash the leaves on either side. You can also find more portal and leaf options in the ''Go To Brush'' floater.
 
== 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 brush]]es tell the compiler to split leaves
*Visleaf generation:
** [[vvis|VVIS]] compiler.
** [https://web.archive.org/web/20150527052701/http://rvanhoorn.ruhosting.nl:80/optimization.php?chapter=visleafs Ralph van Hoorn's explanation of visleaves].
* [[Optimization (level design)]]
 
[[Category:Level Design]]
[[Category:Glossary]]

Latest revision as of 17:42, 18 July 2025

English (en)Deutsch (de)Русский (ru)中文 (zh)Translate (Translate)
A sample scene with two rooms.
The default visleaf structure for the above scene. Note how leaf 2 cannot see leaf 3.
Not to be confused with VisGroup.

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. visleaves 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.

Visleaves 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

There are three ways to inspect visleaves:

  • From Hammer Editor since Orange Box (Source 2007 and later), the leaves of the current map can be viewed directly in the 3D view through the menu option Map > Load Portal File. This displays leaf edges that touch other edges as thick blue lines.
  • From the desktop, the glview tool application (located in the common\[game]\bin folder) can be used.
Tip.pngTip:For even more clarity use auto visgroups to remove objects from your map that don't block visibility – i.e. everything but "World Geometry".
Note.pngNote:Do not confuse visleaves with the squares outlining worldbrush geography seen if you use mat_wireframe 3.
  • From 3ds Max using Wall Worm Model Tools Wall Worm Model Tools, the leaves of the current map can be viewed directly in the 3D view through the menu option Wall Worm > Wall Worm Level Design > Wall Worm Map Compile Tools > Load PRT File. This displays leaf edges that touch other edges as thick yellow lines. You can select a line (portal) that will allow you to select or flash the leaves on either side. You can also find more portal and leaf options in the Go To Brush floater.

See also