Zone Portals
From FleshWorks
Contents |
Intro
A BSP Zone is a subtracted area of a map which is entirely separated from the rest of the map by Zone Portals and/or solid BSP. Zones perform a number of important functions.
- Optimisation. Static meshes and BSP surfaces in a different zone to the one the player is currently in will not be considered for rendering unless a zone portal leading into that zone is visible in the current field-of-view. Careful use of zoning thus allows the engine to increase performance by only rendering those surfaces and objects that can be seen. The corollary to this is that if you do not use zoning, the game engine will in all likelihood be doing a lot more work than it needs to, leading to poor performance.
- Logical division of the map into areas, for such things as ambient sounds, EAX reverb and lighting effects which are applied on a per-zone basis.
- BSP simplification. The addition of zone portals may (but is not guaranteed to) reduce BSP errors by "containing" complex parts of the BSP tree within a zone, so that they do not cause problems elswhere in the map. Zone portals are not a substitute for good BSP design, but may help in some situations.
In contrast to other Unreal-based games, Thief 3 does not support AntiPortals, so don't bother looking for them in the editor.
Creating a Zone Portal
- Select the sheet brushbuilder from the shapes toolbox on the left-hand toolbar.
- Move, rotate and vertex-edit the builder brush into position, so that it completely blocks the doorway, corridor or other location where you wish to place the zone portal (try to keep this small - huge portals covering large corridors or rooms can negate the performance improvement you would otherwise gain from zoning itself).
- Choose the Special Brush build option from the left-hand toolbar. In the dialog box, check Zone Portal and set the solidity to Non-solid.
- Choose OK, then close the dialog.
You will need to Build All before the new zone comes into effect.
Examining zones
The ZoneProperties dialog allows you to visualise where the current zones are being created. This dialog also enables you to add ambient sounds or EAX reverb effects to your zones.
- Move the camera far up above the map (hold down both mouse buttons and drag upwards in the 3D window) and look down on the level.
- From the View menu choose Show ZoneProperties dialog. If a message appears asking whether to create ZoneProperties objects automatically, choose Yes.
- When the dialog appears, select zones in the left-most column to make them appear orange in the 3D window, moving the camera if necessary to see them.
When you have finished examining zones, be sure to deselect all items in the dialog by clicking in one of the columns other than the first. If you do not do this, the orange highlight will remain even after the dialog is closed.
You can also check zoning by using the Unreal renderer: click on the viewport toolbar button that looks like a box with a sheet through it. This mode will illuminate surfaces with different colours depending on which zone they are in.
Zoning tips
- Do not intersect or overlap zone portals with each other. This is quite easy to do, if you click the OK button in the Special Brush dialog more than once (no feedback is provided and the dialog does not close after building), but can cause some very nasty effects in game (giant white sheets appearing, HOM effect etc.).
- Keep zone portal sizes to a minimum.
- There is nothing wrong with looking through more than one portal at once. Having a zone portal at each end of a narrow corridor is a good way to restrict the rendered surfaces to an absolute minimum.
- Zone portals should be tightly snapped to the edges of the volume in which they are placed. If they do not completely cover the passage (i.e. there is a "leak"), they will perform no useful function.
- An area with multiple entrances must be completely sealed with zone portals if you wish it to be in a separate zone. If you create a new passage into an area, use the ZoneProperties dialog to make sure that you have not unintentionally merged two zones into one.
- If you are having difficulty selecting a surface for texturing in the 3D view, because it is behind a zone portal and the portal itself is being selected, right-click on the portal's surface and choose Invisible from the Flags section of the Surface Properties dialog. You should now be able to click through it without problems.
- There is a limit to the number of zones you can have in one level. This is supposedly greater than the old Unreal limit of 64, but having a new zone every two feet is probably unwise. The Limit seems to be 1024 zones - more than enough for almost anything. However, having zones every two feets is still unwise, because that many in one area can become a performance hit, at the junctions between areas or every 256 units is enough.
UDN Section on Zones and Portals
