Vis zoning:

        BSP       

   hullmakers   

      portals     

       demo      



     brushes     

      nosnap     
 
 'office'
 [email protected]

  A good layout (and thus a good Visual BSP) does help a lot to increase the
 framerate, but it doesn't fix all the problems. As I said, there is still
 the hallway issue.
  If you remember, I said that the hallway 'sees' all three rooms' visibility 
 zone. Main problem is that you cannot make an air-tight sealed room. You have
 to put some doors or some sort of access points. Those will 'leak' visibility.
 That means that because of the doors or windows (or any binded brush that is
 part of the walls) a room will see more that it's own visibility zone.
 
  There is a remedy for this; at least, there is a remedy for doors that is:
 portals.  Portals are zero thickness brushes that have the 'Portal' property
 turned TRUE.
 Step-by-step, to create a portal you must do:
 1. Switch to Geometry Mode:

    
 
 2. Using SPACEBAR, draw a rectangle:
 Go to one point, hit space. Move towards the second (future) corner and
 hit it again.

 
Do that until you've completed the rectangle:
3. Switch back to Brush Edit and set the properties to your new brush: Usually I texture my portals with the 'hull' texture (right in the 'WorldTextures' folder), so I can tell the difference. However, you can texture it with any texture; it's the properties that realy matter:

  Usually, keep your brushes solid, 
  until told otherwise.

 Now the portal must be visible


 This is NOT a sky portal


 Now, nobody will see the portal
 so no need for lighting or
 shading it






 This IS a portal
 You'll get an error if you don't
 process this brush nosnapnocsg style









 
Warning! When you have zero thickness brushes in your level, make sure they [zero thickness brushes] all have the 'NoSnap' flag true and that you process your level with the -nosnapnocsg option:
Otherwise you'll get the 'Invalid brush' error. Ok, now you have a portal. How to use it? Well, first place it right in the middle of the door you want to 'fix':
Also, make sure that your portal seals your level. In other words, make sure the portal neatly touches the zero detail brushes that determine the room's visibility zone:
Feel free to strech the portal if needed. So, after streching the portal so it seals the room air-tight, we need to tell the door what portal to use:
As you can see, I've told my door to use a portal named 'SPortal'; If you have a double door, the other one should also use the same portal. Now, all I have to do is to rename my portal to 'SPortal':
And we're done! In theory, portals will allow you to use straight hallways, as long as all the doors have portals. However, it's easy to do a typo when renaming the portal, or not to notice that the portal doesn't seal the room perfectly. That's why I use both BSP-based tricks AND portals. Better safe than sorry, right?
index