Editing VIS
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
+ | {{WIP}} | ||
{{need screenshot}} | {{need screenshot}} | ||
− | {{grammar | + | {{grammar}} |
− | VIS | + | VIS stands for visibility. Its a name of map compilation phase, and data created during this phase and used for visibility checking. VIS are one of most notable optimisations for games, it provides opportunity to cull off any stuff that is not visible from a particular position. For large levels, this will cut off from processing more than 90% of stuff. |
− | + | VIS can be estimated as a group of areas called portals with each portal having a link to all other postals visible from it. In real code this is of course not that simple. All map surfaces and objects will have a portal they are standing at. | |
− | VIS portals are | + | |
− | + | ===Building the VIS=== | |
+ | |||
+ | VIS data being created at BSP stage, the first stage of map compilation. During this phase portals are created, but have no links (so they are dont know what portals are visible to them). | ||
+ | |||
+ | All gometry with solid material will define a shape for portals. Defining a shape sometimes called 'breaking VIS' because by nature it is breaking space for visible and not visible zones. All entities (including [[BModel|bmodels]]]) are meant to be changed/removed at any time, so they are always excluded from VIS creation. The only entity that breaks VIS is [[func_group]]. | ||
+ | |||
+ | There is two types of VIS breaking: | ||
+ | * Solid break - a wall that is blocking anything behind it | ||
+ | * Portal break - a corridor corner, creating new portal | ||
====Leak==== | ====Leak==== | ||
− | VIS | + | Stub! |
− | + | ||
− | + | ====VIS stage==== | |
− | + | Second stage of map compilation (called VIS stage) is building links between portals. This could take much time of using full cycle (checking visibility from each portal to each portal). There is faster variant of VIS building, called fast VIS - it only links portal which have common side, giving slightly worse links but just several seconds compile time. | |
− | + | ||
− | + | {{tip|Blood Omnicide is always using fast VIS.}} | |
− | {{tip| | + | |
===Optimizing VIS=== | ===Optimizing VIS=== | ||
− | |||
− | |||
− | |||
− | + | It is important that VIS portal tree should be balanced. It should be detailed enough to make accurate culling, and it should be small enough to have small RAM overhead and small processing time (VIS helps us to save some processing time, we should not allow it to take that time for its own processing). Optimizing VIS tree is one of task map designed should care of. | |
− | + | ||
− | + | Things map designer do during optimization of VIS: | |
− | + | * Mark brushes that should not break VIS as detail | |
− | + | * Place hint brushes in order to make new joint VIS breaks for more accurate culling | |
+ | |||
+ | Optimizing VIS is one of the tasks map designer should care about. | ||
+ | |||
+ | ===Using VIS=== | ||
+ | VIS data is used by engine client part to control [[PVS]], which is used for rendering culling and network culling. | ||
+ | |||
+ | Engine's server part is using VIS for checking AI visibilitry and explosions; | ||
− | + | VIS data is also used during LIGHT stage for faster lightmap tracing. | |
− | + | ||
==See also== | ==See also== | ||
* [[PVS|Potentially visible set]] | * [[PVS|Potentially visible set]] | ||
+ | * [[Network culling]] | ||
− | |||
[[Category:Glossary]] | [[Category:Glossary]] | ||
[[Category:Darkplaces engine]] | [[Category:Darkplaces engine]] | ||
− |