Visleaf: Difference between revisions
Jump to navigation
Jump to search
Tip: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:Do not confuse visleaves with the squares outlining worldbrush geography seen if you use
m (Converted {{otherlang2}} to {{lang}}.) |
Shawnolson (talk | contribs) m (Added info on how to load visleaves into 3ds Max using Wall Worm.) |
||
Line 23: | Line 23: | ||
{{note|Do not confuse visleaves with the squares outlining worldbrush geography seen if you use <code>[[mat_wireframe]] 3</code>.}} | {{note|Do not confuse visleaves with the squares outlining worldbrush geography seen if you use <code>[[mat_wireframe]] 3</code>.}} | ||
* From 3ds Max using Wall Worm, 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 == | == See also == |
Revision as of 07:27, 2 March 2022
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. 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
There are three ways to inspect visleaves:
- From the Orange Box version of Hammer, 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.

- From the Developer Console, the console variable mat_leafvis can be used. (
mat_leafvis 3
will display all visleaves in the PVS.)

mat_wireframe 3
.- From 3ds Max using Wall Worm, 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 brushes tell the compiler to split leaves
- Visleaf generation:
- VVIS compiler.
- Ralph van Hoorn's explanation of visleafs.
- Optimization (level design)