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