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