Game Engine Architecture

(Ben Green) #1

462 10. The Rendering Engine


To render a scene with portals, we start by rendering the region that con-
tains the camera. Then, for each portal in the region, we extend a frustum-like
volume consisting of planes extending from the camera’s focal point through
each edge of the portal’s bounding polygon. The contents of the neighboring
region can be culled to this portal volume in exactly the same way geometry is
culled against the camera frustum. This ensures that only the visible geometry
in the adjacent regions will be rendered. Figure 10.44 provides an illustration
of this technique.

Occlusion Volumes (Antiportals)
If we fl ip the portal concept on its head, pyramidal volumes can also be used
to describe regions of the scene that cannot be seen because they are being
occluded by an object. These volumes are known as occlusion volumes or anti-
portals. To construct an occlusion volume, we fi nd the silhouett e edges of each

Figure 10.44. Portals are used to defi ne frustum-like volumes which are used to cull the con-
tents of neighboring regions. In this example, objects A, B, and D will be culled because they
lie outside one of the portals; the other objects will be visible.

A

H
E

D

F

B G

C

Figure 10.45. As a result of the antiportals corresponding to objects A, B, and C, objects D, E,
F, and G are culled. Therefore only A, B, C, and H are visible.
Free download pdf