source: GTP/trunk/App/Demos/Vis/FriendlyCulling/Readme.txt @ 2878

Revision 2878, 4.6 KB checked in by mattausch, 16 years ago (diff)

for some reasons very slow even in small streets on my home computer!!

Line 
1GAME ENGINE FRIENDLY OCCLUSION CULLING
2======================================
3
4This programn is a demonstration of the CHC++ algorithm
5described in the chapter "Game Engine Friendly Occlusion Culling" of the book ShaderX 7.
6
7Copyright and Disclaimer:
8
9This code is copyright Vienna University of Technology, 2008.
10
11Please feel FREE to COPY and USE the code to include it in your own work,
12provided you include this copyright notice.
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17Author of this demo:
18
19Oliver Mattausch (matt@cg.tuwien.ac.at)
20
21Authors of the book chapter:
22
23Jiri Bittner (bittner@cg.tuwien.ac.at)
24Oliver Mattausch (matt@cg.tuwien.ac.at)
25Michael Wimmer (wimmer@cg.tuwien.ac.at)
26
27
28Date: June 20, 2008
29
30----------
31Input
32----------
33
34Help for keybord and mouse is available with F1.
35
36You can switch between different known occlusion modes using the
37SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling, chc++).
38
39A bird eye view visualization of the culling algorithm from can be shown by pressing 'F2' on the keyboard.
40Pressing 'F8' switches between using / not using the glFinish command, which causes slightly slower frame rates but brings more reliable fps measurements.
41
42----------
43The scene
44----------
45
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.
47
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.
49
50---------------
51The algorithm
52---------------
53
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 format, avoiding the mix of different texture formats, 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
63
64----------
65Installation
66----------
67
68A binary for Win32 and a solution for visual studio 2005 and 2003 included. The program should work under XP and Windows Vista.
69
70
71----------
72Structure
73----------
74
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.
76
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.
78
79The main routine is implemented in chcdemo.cpp. Also it contains the OpenGl setup code, glut stuff, and setups of the scene hierarchy.
80
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 (rendering).
82
83The tool employs some free 3rd party libraries:
84
85DevIL for texture loading / unloading
86glfont2 (http://students.cs.byu.edu/~bfish/glfont2.php) for the antialiased fonts of the HUD. Thanks to the author Brad Fish.
87
88Thanks also to Alexander Kusternig for providing me his code for the SSAO shader.
89
90If you find any problem with the code or have any comments, please feel free to ask us at any time.
Note: See TracBrowser for help on using the repository browser.