vdlib icon indicating copy to clipboard operation
vdlib copied to clipboard

Visibility Determination Library: hierarchical frustum and occlusion culling algorithms

vdlib

Visibility Determination Library: hierarchical frustum and occlusion culling algorithms

Frustum culling implementation based on the following papers:

Occlusion culling implementation based on the following papers:

The full description of this library is available in this report, paper and poster (all in brazilian portuguese).

External dependencies

The library uses OpenGL for rendering, including functionalities like occlusion queries for acceleration algorithms.

List of dependencies:

  • GLEW: Opengl Extension Wrangler
    • Import OpenGL extensions
  • VrBase: Basic library from Virtual Reality Group at Tecgraf
    • Basic types for Linear Algebra
    • Timer, Random, etc

All external dependencies are inside the folders: /depend /include /lib

Main library

Main source code can be found at: /include /vdlib /src

Entire implementation is under the namespace 'vdlib', organized as follows:

  • Frustum Culling

    • FrustumCuller
  • Occlusion Culling

    • OcclusionCuller
    • OcclusionQueryManager
  • Utilities

    • Distance
    • EigenSolver
    • Intersection
    • Statistics
  • Scene

    • Geometry
    • SceneData
  • Bounding Box

    • Box
    • BoxFactory
  • Hierarchy

    • Node
    • RawNode
    • TreeBuilder
    • PreOrderIterator
  • OpenGL

    • Plane

Example

In addition to main library's dependencies, the example viewer uses GLUT for window management.

The source code is at: /example

Main commands: Camera Move: W, A, S, D, R, F Turn: Mouse1 + Drag, Q, E Reset: Space

Rendering
    Wireframe: Z
    Toggle bounding-box debug: B
        off           - no bounding box
        node          - draw node bounding boxes (green)
        geometry      - draw geometry bounding boxes (blue)
        node+geometry - draw all bounding boxes
        
Algorithms
    No acceleration:   1
    Frustum culling:   2
    Occlusion culling: 3
    Frustum+Occlusion: 4
    
Miscellaneous
    Exit: Esc

Results

Here are some images and times for scene walkthrough:

scenes

Build

Projects for Microsoft Visual Studio 2005 (VC8) are ready to use at: /visualstudio