source: GTP/trunk/App/Demos/Illum/Standalone/pathmap [DirectX]/README.txt @ 2197

Revision 2197, 5.1 KB checked in by szirmay, 18 years ago (diff)
Line 
1GameTools standalone tool:
2
3Command line options
4#############################
5> pathmap.exe [s|p/v] -D <media input directory> -L <level file> -M <materials file> -O <mesh output dir>
6-P <prm out put dir> -E <number of entry points> -C <number of clusters> -S <shadow map resolution>
7
8operations
9        s -     Segment input meshes: creates new versions of input meshes, and outputs them to the <mesh output dir>.
10                These processed meshes will contain smaller submeshes, to which PRM textures will be assigned.
11        p - Precompute PRM textures. Outputs textures (hdr format), a new level file (with cluster assigment info),
12                and an entry point file.
13        sp-     Do both of the above.
14        v - Do neither of the above, only visualize results.
15       
16switches
17        D       directory for input files (level file, material file, meshes in .x or OGRE xml format, texture images)
18        L       file name of level file (txt file listing meshes and entities)
19        M       file name for material file (txt file listing material name - color texture pairs)
20        O       output directory for segmented meshes and the new level file
21                (this is also the input directory for the same files if operation 's' is not specified)
22        P       output directory for PRM textures and the entry point file.
23                (this is also the input directory for the same if operation 'p' is not specified)
24        E       number of entry points. Must be 4096*n.
25        C       number of entry point clusters overall. How many of them influences a single entity is given in the level file.
26        S       depth map resolution used for indirect illumination precomputation.
27
28
29File formats
30#############################
31Level file [media\*.level]
32        Lists meshes and entities.
33        Mesh attributes:
34                ogrefile                        Binary OGRE file.       (output as input, not used in tool)
35                ogreXMLfile                     XML OGRE file.          (loaded in tool)
36                xfile                           DirectX mesh file.      (loaded if no OGRE xml specified)
37                patmapresolution        PRM tile resolution. (also influences UV map generation)
38                divide                          Number of desired mesh segments. (a PRM texture is assigned to a segment)
39        Entity attributes
40                mesh                            mesh name
41                transformation          modeling trnasformation as a 4x4 matrix
42                pathmapclusters         number of clusters relevant to subentities of this entity (recommended:32)
43                pathmapfile                     output texture file name stub
44
45Material file [media/*.materials]
46        XML file that describes materials OGRE for the pathmap tool.
47        For every material name, a texture name or a solid color is given.
48
49Entry points file [prm\prmEntryPoints.text]     
50        Lists entry points with position, normal and generation probability,
51        plus number of entry points per cluster.
52       
53
54Real-time global illumination
55#############################
56
57
58Provided effect:
59#################
60
61Indirect illumination with Precomputed Radiance Maps (PRM)
62
63Standalone final rendering (real time GI) application without or with [if
64GENERATE_PATH_MAPS is defined in PathMapEffect.cpp] PRM precomputing
65
66
67Algorithm benefits:
68###################
69Provides real-time indirect illumination. As opposed to static light maps,
70actual lighting conditions influence indirect illumination. The effect is
71achieved by combining multiple 'PRM panes' (partial "light maps") according to
72current illumination of 'entry point clusters'.
73
74As opposed to PRT (precomputed radiance transfer), no tessellation (finite
75elements) is needed, and near light sources are handled. (We do not assume
76infinitely distant
77environment lighting.)
78
79Accuracy of PRMs depends on the number of entry points used, influencing
80preocessing time only.
81
82Final rendering requires a compositing of PRMs, where performance depends on the
83number of 'entry point clusters' considered for an object. As many texture
84fetches as clusters are needed. A lower number of clusters will result in
85indirect illumination which is less responsive to actual lighting, but still
86plausible. (A single cluster would reproduce a static light map which is scaled
87according to the total direct illumination.)
88
89
90Build:
91######
92This is a standalone DirectX 9.0 application, compiles under Visual C++ 2003
93with DirectX SDK April 2006 (identical to June 2006).
94
95Parameters (PRM resolution, shadow map resolution, #entry points, #clusters,
96etc.) are hardcoded as #define directives in PathMapEffect.h.
97
98GENERATE_PATH_MAPS in PathMapEffect.cpp must be defined to perform precomputing,
99outputting textures to the PRM subfolder. Otherwise, PRM textures are loaded
100from the PRM subfolder.
101
102
103Usage notes:
104############
105- as precomputing is used, this tool should be used for static level geometry
106- multiple static objects are supported and encouraged: every object will use a
107set of most important PRM panes
108- models must have unique texture mapping (just like light maps)
109
110- there is no support for any particular 'level geometry' discription format.
111DirectX .x files and referenced textures are loaded from code.
112- To include the method in a particular engine, the level geometry should be
113used to compose the scene which is used to generate the PRM textures. Final
114compositing must be implemented in the shader system of the game engine,
115assigning the computed PRMs to the respective objects as textures.
Note: See TracBrowser for help on using the repository browser.