source: GTP/trunk/App/Demos/Vis/KdTreeDemo/README.txt @ 1273

Revision 1273, 10.1 KB checked in by szydlowski, 18 years ago (diff)

Added the KdTerrainSceneManager?, a subclass of the KdTreeSceneManager? capable of rendering terrain like the TerrainSceneManager? from Ogre.
All the *Kd*Terrain* classes are identical to their octree counterparts, save prefixing all classes and structures with Kd to avoid namespace clashes.
This was necessary, since the TerrainSceneManager? was hard coded in these classes, and all references had to be replaced with the KdTerrainSceneManager?.
Also added a comprehensive README for the demo application.

Line 
1MANPAGE FOR TestKdTree
2
3NAME
4  TestKdTree.exe
5
6SYNOPSIS
7  TestKdTree [options]
8
9COMMAND LINE OPTIONS
10  -o <filename>, --outfile <filename>
11    Save a recorded demo to file <filename>.
12    See DEMOS for details
13
14  -i <filename>, --infile <filename>
15    Load a demo created by the application from file <filename>.
16    See DEMOS for details.
17
18  -l <filename>, --logfile <filename>
19    Save the FPS log of a demo benchmark in file <filename>. The log is saved
20    as a CSV text file. See DEMOS for details.
21    To have any effect, requires --demomode.
22
23  -d, --demomode
24    Start the application in demomode. See DEMOS for details.
25    Requires --infile, otherwise no benchmark is run.
26
27  -s <sm_id>, --scenemgr <sm_id>
28    Use specified scene manager. So far, the following scene managers are
29    supported:
30      KdTreeSceneManager            sm_id=KDT (DEFAULT)
31      KdTerrainSceneManager         sm_id=KTE
32      OcclusionCullingSceneManager  sm_id=OCM
33      OctreeSceneManager            sm_id=OCT
34      TerrainSceneManager           sm_id=TER
35      DefaultSceneManager           sm_id=GEN
36
37  -r <rm_id>, --rendermode <rm_id>
38    Use specified rendermode within the scene manager, if supported:
39      Internal Frustum Culling      rm_id=INT (KDT, KTE)
40      View Frustum Culling          rm_id=VFC (KDT, KTE, OCM)
41      Stop and Wait Culling         rm_id=SWC (KDT, KTE, OCM)
42      Coherent Hierarchical Culling rm_id=CHC (KDT, KTE, OCM) (DEFAULT)
43    Setting a rendermode for a scene manager that does not support it has
44    no effect. For supported scene managers, render mode switching is also
45    available ingame (see INGAME COMMANDS).
46
47  --comment
48    Append a comment to the logfile. Requires --logfile to have any effect.
49    (see DEMOS).
50
51  The following options apply only to the KDT and KTE scene managers. They have
52  no effect when another scene manager is selected. Besides --enhancevis, they
53  influenc how the KdTree which organizes the scene is built.
54
55  -e, --enhancevis
56    Enable enhanced visibility test (which, sadly, has little or no effect).
57    Only supported with INT render mode.
58    Enhanced visibility tries to abort tree traversal as early as possible by
59    determining if a tree node is fully visible. Then it renders all objects
60    contained within with no further traversal or visibility tests. This
61    setting can also be changed ingame (see INGAME COMMANDS).
62
63  --buildmode <bm_id>
64    Select the mode of building the KdTree.
65      Priority Queue    bm_id=PQ (DEFAULT)
66      Recursive         bm_id=RE
67    This setting can also be changed ingame (see INGAME COMMANDS).
68
69  --maxdepth <n>
70    Limit the maximum depth of the kdtree. The default n is 12. A complete
71    KdTree with depth n has 2^n leaves and 2^(n+1)-1 total nodes. However,
72    depending on the structure of the underying scene, a typical KdTree has
73    far less nodes.
74
75  --kt
76  --ki
77    These parameters define the two "magic numbers" used by the SAH algorithm
78    to determine the cost of splitting a node. In simple terms, KT is the cost
79    of traversing a node on the way down while KI is the cost of intersecting
80    (rendering) a leaf node. KI is multiplied with the number and size of
81    objects within the leaf. The default values are KT=2.0 and KI=1.0, since
82    they seem to produce acceptable trees.
83
84CONFIG FILE
85  The config file must have the name "testKdTree.cfg" and be found in the same
86  directory as the TestKdTree executable. It is used mainly for configuring
87  the simple test scene details. The config file has the following options:
88    scene:  Select the scene which shall be loaded.
89            If the parameter is empty or missing, the simple test scene is
90            loaded (spaceships & robots).
91            If the parameter is "terrain", the application attempts to load
92            the terrain world geometry, which only works with scene managers
93            supporting this kind of geometry (KTE, OCM, TER). Also a file
94            named "terrain.cfg" and holding all the necessary options for
95            the terrain must be in the same directory.
96            All other values are interpreted as a semicolon-separated list of
97            scene files to load. For now, only the .iv format is supported.
98    movespeed, rotatespeed:
99            Set the speed of movement and rotation for the player camera.
100            Movespeed is world units per second, rotatespeed is degrees per
101            second.
102  The following options apply only to the simple test scene:
103    planedim:
104            Size of the base plane
105    randomcount:
106            Number of randomly placed object of each class to generate
107    count, spacing:
108            Number of robots placed in a grid in the center of the scene.
109            Actual number is count^2. Spacing denotes the distance between two
110            robots in a row or column.
111    radius, period:
112            Distance from scene origin and time to complete one circle for the
113            moving robot.
114    shadows:
115            on enables shadows
116    selectentities:
117            Sum up the following numbers to select which entities will appear in
118            the scene:
119              1  robots in grid
120              2  randomly placed robots
121              4  randomly placed spaceships
122              8  moving robot
123              16 base plane
124            So, e.g., 22 is plane with random robots and space ships
125
126INGAME COMMANDS
127
128  ESC   Exit the program
129
130  The following commands can be used from within the game when --demomode
131  is NOT specified:
132
133  Visualisation:
134    F2  Toggle Visualisation camera (lower right): Boxes-Objects-Off-...
135        Works diffently, depending on selected scene manager
136    F3  Toggle Node Visualisation:  Highlighted-All-Off-...
137        Works diffently, depending on selected scene manager
138    F4  Toggle between nodes and bounding box heirarchy (KDT and KTE only)
139    3,4 Decrease/Increase KdTree level which to highlight (KDT and KTE only)
140    B   Show bounding boxes of all objects
141
142  Demos:
143    F5  Start/Stop recoring demo
144    F6  Save recorded demo
145    F9  Start/Stop demo playback
146
147  KdTree building:
148    1,2         Decrease/Increase maximum depth
149    5,6         Decrease/Increase KT
150    7,8         Decrease/Increase KI
151    0           Toggle build mode (Recursive, Priorty Queue)
152    BACKSPACE   Rebuild KdTree with the settings from above.
153
154  Movement:
155    U           Toggle free move, stick to ground
156    W,A,S,D     Forward, Strafe Left, Back, Strafe Right
157    UP,DOWN     Forward, Back
158    LEFT,RIGHT  Turn Left, Turn Right
159    PGUP,PGDOWN Up, Down (when in free move mode)
160    I           Toggle Vis Camera follow, free
161    NUM+,NUM-   Zoom Vis Camera
162    NUM{8,2,4,6}Move vis camera up, down, left right (when free)
163
164  Rendering:
165    SPACE Toggle render mode for (KDT, KTE, OCM), see --rendermode
166    V     Toggle enhanced visibility for (KDT, KTE), see --enhancevis
167    R     Toggle OpenGL/Direct3D render mode (Full, Line, Point)
168    T     Toggle OpenGL/Direct3D texture filtering (Bilinear, Trilinear, Aniso)
169
170  Other:
171    M     Toggle between buffered and unbuffered mouse input
172    K     Toggle between buffered and unbuffered keyboard input
173    F     Show/Hide overlays
174    P     Show/Hide player cam position
175    PRINT Save sceen shot
176
177DEMOS
178  The program has the ability to record, save and load demos, i.e. a path
179  through the scene. The program can save demos in two formats:
180  ASCII (extension .txt) and binary (extension .bin). The file name must
181  have one of these extensions and the format is selected by the program
182  accordingly.
183  Within the program, a demo can be recorded at any time (except when playing
184  back another demo) by pressing the F5 button. A record indicator appears on
185  the top of the screen. By pressing F5 again, the recording is stopped.
186  Pressing F9 will play back the recorded demo and return the player camera to
187  the previous position when it's done. The playback can be stopped by pressing
188  F9.
189  If the demo shall be permanently stored, the program must be launched with
190  the --outfile option, specifying a file to which the demo will be saved. The
191  file name must have on of the above mentioned extensions. If the file allready
192  exists and a demo is saved, it will be overwritten. To save a recorded demo,
193  simply press F6 to store it in the file. If a demo has been allready stored in
194  this session, it will be overwritten.
195  It is recommended to limit the framerate of the application (e.g. by enabling
196  vsync) when recording a demo, since it will produce smaller files.
197  To load a demo from a file, specify it with the --infile command line option.
198  To run a benchmark, a prerecorded demo must be loaded. Also, a logfile has to
199  be specified using the --logfile option. Finally the --demomode option must be
200  set. The program starts with disabled user input and no overlays. After an
201  initial 5 second delay, to stabilize the framerate and preload the scene, the
202  demo is played back and the framerate and other statistics are recored. Then
203  the program exits and writes the stats to the logfile. The benchmark can be
204  interrupted with the ESC key, but then no statistics are recorded.
205  The logfile is in CSV format for easy evaluation in spreadsheet applications.
206  The first row is the header consisting of:
207    The name of the demo file which was used for this benchmark
208    Timestamps of each FPS capture (starting with 0, in seconds)
209    Min, Avg, Max FPS headers
210    Total frames and total time headers
211    Comment header
212  The consecutive rows are filled with demo data, one row per benchmark run,
213  with the settings used for building and rendering in the first column.
214  If the specified logfile does not exist, it is created including the headers.
215  If a log file with the specified name does exists, it is checked if the demo
216  file used in the logfile corresponds with the demo file used in this benchmark
217  run. If the names do not match, or if the logfile cannot be read or written
218  to, the demo is executed but no stats are written. Additionaly, an error
219  message is written in "Ogre.log". However, if the log file exists and the demo
220  name matches, the resulst are appended to the existing logfile, allowing for
221  easy comparison of different settings and options.
222
223BUGS
224  Certainly, but none obvious.
225
226AUTHOR
227  Martin Szydlowski <msz@seclab.tuwien.ac.at>
228 
229LICENSE
230  GPL-ish
Note: See TracBrowser for help on using the repository browser.