Point Visibility in Games

Visibility in Games
Harald Riegler
Visibility in Games
 What do we need it for?
 Increase of rendering speed by removing
unseen scene data from the rendering
pipeline as early as possible
 Reduction of data transfers to the
graphics hardware
 Current games would not be possible
without visibility calculations
Harald Riegler
2 / 18
Visibility methods
 2 very different categories:
 Visibility from a region (Portals, PVS)
 (Quake, Unreal, Severance and co.)
 Visibility from a point (Z-Buffer, BFC,...)
 Racing games, outdoor scenes, sports
games etc.
 We will focus on Point-Visibility here
Harald Riegler
3 / 18
Traditional methods
 Traditionally used:
 Back-Face culling
 Z-Buffering
 View frustum culling (Quad or Octtree)
 New methods are slowly breaking into
games
Harald Riegler
4 / 18
New scientific methods
 Image-space occlusion culling
 Hierarchical Z-Buffering
 Hierarchical Occlusion Maps
 Object-space occlusion culling
 Hierarchical View Frustum culling
 Hierarchical Back-Face culling
 More methods in the paper
Harald Riegler
5 / 18
Hierarchical Z-Buffer
 Z-Buffer is arranged in an image pyramid
 Scene is partitioned in an oct-tree
 Oct-tree nodes are tested against the Z-
Pyramid where pixels have the same size
 Visible nodes serve as input for the next
frame
 Relies on HW visibility query
Harald Riegler
6 / 18
HZB/Hierarchical occlusion maps
Harald Riegler
7 / 18
Hierarchical occlusion maps
 Potential occluders are pre-selected
 These occluders are rendered to the
occlusion map. The hierarchy can be built
with MIP-Mapping HW
 Depth test after occlusion test
 Seperate depth estimation buffer
Harald Riegler
8 / 18
Hierarchical View Frustum Culling
 Speeds up VFC by testing only 2 box
corners of a bounding box first.
 Plane coherency during frame advancing
 Test against VF-octants.
 BB-Child masking
Harald Riegler
9 / 18
Hierarchical Back-Face Culling
 Partitions each model into clusters
 Primitives in one cluster are:
 Facing into similar directions
 Lie close to each other
 If the cluster fails the visibility test, all
primitives in this cluster are culled
Harald Riegler
10 / 18
Hierarchical Back-Face Culling
Harald Riegler
11 / 18
The Real World (1)
 Scientific approaches often too complicated
 Science often uses models with hundreds of
thousands of vertices, games don’t. (LOD)
 Game developers “pick” ideas from different
algorithms
 Research has impact on hardware design!
Harald Riegler
12 / 18
The Real World (2)
 Parts of the HZB are used sometimes
 Runtime-LOD is used as input for a simple
HZB
 VFC is almost always used.
 HOM introduce too much overhead for
games, and the z-buffer is there anyway
 A simplified HBFC can be used
Harald Riegler
13 / 18
The Real World (3)
 PSX-One doesn’t even have a z-buffer
 ATI’s Radeon has parts of a HZB (Called
Hyper-Z)
 GForce2 only has a z-buffer
 GForce3 similar to Radeon, but supports
HZB visibility query
 Dreamcasts Power-VR2 works pretty
different (Infinite planes)
Harald Riegler
14 / 18
A PSX Example
 Iron Soldier 3 on PSX:
 VFC based on a quad-tree
 BFC
 Painters algorithm
Harald Riegler
15 / 18
Conclusions (1)
 Visibility algorithms are used in many
different applications
 Occlusion culling
 Shadow calculations
 Radiosity
 Volumetric lights
 All these fields benefit from advances in
visibility techniques
Harald Riegler
16 / 18
Conclusion (2)
 Occlusion culling will gain importance
 More OC will be implemented in hardware
 Discrepancies between science and gaming
industry will alway exist due to different
goals
Harald Riegler
17 / 18
Hope you enjoyed the ride!