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

Revision 1296, 11.3 KB checked in by szydlowski, 18 years ago (diff)

Implemented PVS support in kdtree scene manager - not complete, defunct
modified BoundingBoxConverter? to work with KdTreeSceneManager?

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