Changeset 2789 for GTP


Ignore:
Timestamp:
06/20/08 07:00:46 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Readme.txt

    r2785 r2789  
    22====================================== 
    33 
    4 This programn is a demonstration of the Coherent Hierarchical Culling algorithm  
    5 described in the chapter "Hardware Occlusion Queries Made Useful" of the book GPU  
    6 Gems II. Additional information and sample images are available at 
    7  
    8 http://www.cg.tuwien.ac.at/research/vr/chcull/ 
    9  
    10 Updates to this demo can can be found on the same webpage. 
     4This programn is a demonstration of the CHC++ algorithm  
     5described in the chapter "Game Engine Friendly Occlusion Culling" of the book ShaderX 7.  
    116 
    127Copyright and Disclaimer: 
    138 
    14 This code is copyright Vienna University of Technology, 2004. 
    15  
     9This code is copyright Vienna University of Technology, 2008. 
    1610 
    1711Please feel FREE to COPY and USE the code to include it in your own work, 
     
    2721Authors of the book chapter: 
    2822 
     23Jiri Bittner (bittner@cg.tuwien.ac.at) 
     24Oliver Mattausch (matt@cg.tuwien.ac.at) 
    2925Michael Wimmer (wimmer@cg.tuwien.ac.at) 
    30 Jiri Bittner (bittner@cg.tuwien.ac.at) 
    3126 
    32 Date: December 18, 2004 
     27 
     28Date: June 20, 2008 
    3329 
    3430---------- 
     
    3834Help for keybord and mouse is available with F1. 
    3935 
    40 You can switch between the different occlusion modes described in the book chapter using the  
    41 SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling). 
     36You can switch between different known occlusion modes using the  
     37SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling, chc++). 
    4238 
    43 A visualization of the culling algorithm from can be shown by pressing '1' on the keyboard. Note that the  
    44 classification of nodes usually changes in consecutive frames, so that the hierarchy seems to oscillate.  
    45 This is expected, since the classification of previously visible interior nodes is based on the classification  
    46 of their children, which might be more accurate (leading to the interior node to become occluded) than the  
    47 query for the node itself. 
     39A bird eye view visualization of the culling algorithm from can be shown by pressing '1' on the keyboard. 
     40 
    4841 
    4942---------- 
     
    5144---------- 
    5245 
    53 The scene used in this program consists of basic objects randomly placed in a box. The extent of the box and the  
    54 number and size of objects can be changed (see F1). 
     46The scene used in this program is model of the city Vienna, which has a long history in the visibility research comunity as a scene to test and showcase various algorihms.  
    5547 
    56 The hierarchical structure is a kd-tree with objects intersecting a split plane placed into multiple leaf nodes. 
     48The hierarchical structure is a bounding volume hierarchy which was precomputed (using Surface Area Heuristics) in order to not pollute the demo with lenghty construction code not relevant to the algorithm to keep the demo as simple and educationional as possible. Note that the original construction would also not take more than some seconds. 
    5749 
    58 By playing with the parameters and moving around, the user can explore situtations where occlusion culling is extremly  
    59 useful, and where it is not (because the objects are too sparse or there is too much to see from this viewpoint). 
     50--------------- 
     51The algorithm 
     52--------------- 
    6053 
    61 The hierarchical coherent culling algorithm is compared to simple view-frustum culling and the hierarchical stop and wait  
    62 algorithm (which also uses hardware occlusion queries, but in a less sophisticated way). 
     54The CHC ++ algorithm is build on the CHC alorithm and removes most of it's shortcomings while maintaining simplicity. By playing with the parameters and moving around, the user can explore situtations where occlusion culling is extremly useful, and where it is not (because the objects are too sparse or there is too much to see from this viewpoint). One can observe that the CHC++ algorithm provides good frame rates even in these difficult cases, even when the CHC algorithm breaks down and falls behind view frustum culling in terms of performance 
     55 
     56 
     57-------------- 
     58The engine 
     59------------- 
     60 
     61We use a simple OpenGL based engine which was designed to be as simple as possible while providing the necessary feature list to simulate the behaviour of full-fledged game engines like Ogre3D. The engine supports simple material sorting mainly based on the texture size, avoiding the mix of differently sized textures, which according to various sources induces one of the costliest state change. We demonstrate the integration of the culling algorithm into the engine, and show how occlusion cullig and state sorting are possible within one framework, two paradigms that were previously considered to be cancelling out each other ("either you do front-back-sorting or material sorting"). 
     62 
    6363 
    6464---------- 
     
    6666---------- 
    6767 
    68 A binary for Win32 is included. 
     68A binary for Win32 and a solution for visual studio 2005 included. The program should work under XP and Windows Vista. 
    6969 
    70 The program should compile under Windows and Linux, a CMAKE makefile for multi-platform 
    71 compilation is included (see www.cmake.org for details). 
    72  
    73 For Linux, you need to have a working GLUT and GLEW installation. 
    7470 
    7571---------- 
     
    7773---------- 
    7874 
    79 This demo is written in C++ and partly C and uses OpenGL. 
    80 It has few external needs like limits.h, stdlib.h, math.h, string.h, stdio.h, or time.h. 
    81 We also make heavy use of stl classes, like priority_queue. 
     75This demo is written in C++. We make heavy use of stl classes, like priority_queue. The program expects the GL_ARB_occlusion_query extension. 
    8276 
    83 The program expects the GL_ARB_occlusion_query extension. 
     77The rendering core of the engine is provided by the class RenderTraverser, which provides front to back scene traversal based on a priority queue. It's subclasses implement the various culling algorithms. The new algorithm is represented by the class CHCPlusPlusTraverser. 
    8478 
    85 The program and especially the mathematical routines are not designed for speed or 
    86 efficiency, but for simplicity and clarity. 
     79The main routine is implemented in chcdemo.cpp. Also it contains the OpenGl setup code, glut stuff, and sets up of the scene hierarchy. 
    8780 
    88 RenderTraverser.cpp: implements the core algorithm described in the paper 
     81The project is separated into one section containing supportive code (utils), the traversal algorithms (traversal), and the basic engine classes like Camera, Geometry, Material, or RenderState (scene).  
    8982 
    90 occquery.cpp: contains the OpenGl setup code, glut stuff, and sets up of the scene hierarchy 
    91 HierarchyNode.cpp: contains a kd-tree hierarchy implementation, which can be traversed by the culling algorithm 
    92 Geometry.cpp: represents simple drawable geometry, so that we have something to cull for the algorithm 
    93  
    94 Timers.cpp: contains exact timer functions in order to accurately measure the frame render time 
    95 stdafx.cpp: source file that includes just the standard includes 
    96 glInterface.h: includes gl, glut and glew headers 
    97 DataTypes.c: defines basic geometric datatypes 
    98 MathStuff.c: declares some handy mathematical routines 
    99 teapot.h: contains the teapot geometry 
    100  
    101 If you find any problem with the code or have any comments, we would like to hear from you! 
     83If you find any problem with the code or have any comments, please feel free to ask us at any time. 
Note: See TracChangeset for help on using the changeset viewer.