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