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

Revision 2954, 4.7 KB checked in by mattausch, 16 years ago (diff)

implemented sun color

RevLine 
[2806]1GAME ENGINE FRIENDLY OCCLUSION CULLING
[2642]2======================================
3
[2789]4This programn is a demonstration of the CHC++ algorithm
5described in the chapter "Game Engine Friendly Occlusion Culling" of the book ShaderX 7.
[2642]6
7Copyright and Disclaimer:
8
[2789]9This code is copyright Vienna University of Technology, 2008.
[2642]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)
[2789]24Oliver Mattausch (matt@cg.tuwien.ac.at)
25Michael Wimmer (wimmer@cg.tuwien.ac.at)
[2642]26
27
[2789]28Date: June 20, 2008
29
[2642]30----------
31Input
32----------
33
34Help for keybord and mouse is available with F1.
35
[2789]36You can switch between different known occlusion modes using the
37SPACE key (view-frustum culling, hierarchical stop and wait, coherent hierarchical culling, chc++).
[2642]38
[2806]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.
[2642]41
42----------
43The scene
44----------
45
[2789]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.
[2642]47
[2789]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.
[2642]49
[2789]50---------------
51The algorithm
52---------------
[2642]53
[2789]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
[2642]55
[2789]56
57--------------
58The engine
59-------------
60
[2806]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").
[2789]62
63
[2642]64----------
65Installation
66----------
67
[2806]68A binary for Win32 and a solution for visual studio 2005 and 2003 included. The program should work under XP and Windows Vista.
[2642]69
70
71----------
72Structure
73----------
74
[2789]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.
[2642]76
[2789]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.
[2642]78
[2806]79The main routine is implemented in chcdemo.cpp. Also it contains the OpenGl setup code, glut stuff, and setups of the scene hierarchy.
[2642]80
[2806]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).
[2642]82
[2862]83The tool employs some free 3rd party libraries:
[2847]84
[2862]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
[2954]88Thanks to Ralf Habel for providing me the code for computing the sun illumination and Pretham model.
89Thanks to Alexander Kusternig for providing me his code for the SSAO shader.
[2862]90
[2954]91The deferred shading algorithm features a
[2789]92If 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.