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

Revision 1285, 10.6 KB checked in by szydlowski, 18 years ago (diff)

saving and loading entities to file

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