1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
+ |
|
5 |
|
/* |
6 |
< |
================================================================== |
7 |
< |
Parameters common to all photon map modules. |
6 |
> |
====================================================================== |
7 |
> |
Parameters for photon map generation and rendering; used by mkpmap |
8 |
> |
and rpict/rvu/rtrace. |
9 |
|
|
10 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com} |
11 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
12 |
|
(c) Lucerne University of Applied Sciences and Arts, |
13 |
< |
supported by the Swiss National Science Foundation (SNSF, #147053) |
14 |
< |
================================================================== |
13 |
> |
supported by the Swiss National Science Foundation (SNSF, #147053) |
14 |
> |
====================================================================== |
15 |
|
|
16 |
|
$Id$ |
17 |
|
*/ |
19 |
|
|
20 |
|
#include "pmapparm.h" |
21 |
|
#include "pmapdata.h" |
17 |
– |
#include "standard.h" |
22 |
|
#include <ctype.h> |
23 |
|
|
24 |
|
|
25 |
< |
float pdfSamples = 1000, /* PDF samples per steradian */ |
22 |
< |
finalGather = 0.25, /* fraction of global photons for |
23 |
< |
irradiance precomputation */ |
24 |
< |
preDistrib = 0.25, /* fraction of num photons for |
25 |
< |
distribution prepass */ |
26 |
< |
gatherTolerance = 0.5, /* Photon map lookup tolerance; |
27 |
< |
lookups returning fewer than this |
28 |
< |
fraction of minGather/maxGather |
29 |
< |
are restarted with a larger |
30 |
< |
search radius */ |
31 |
< |
maxDistCoeff = 100; /* Coefficient for maximum photon |
32 |
< |
search radius */ |
25 |
> |
float pdfSamples = 1000, /* PDF samples per steradian */ |
26 |
|
|
27 |
< |
#ifdef PMAP_ROI |
28 |
< |
/* Region of interest bbox: {xmin, xmax, ymin, ymax, zmin, zmax} */ |
29 |
< |
float pmapROI [6] = {-FHUGE, FHUGE, -FHUGE, FHUGE, -FHUGE, FHUGE}; |
30 |
< |
#endif |
27 |
> |
finalGather = 0.25, /* fraction of global photons for |
28 |
> |
irradiance precomputation */ |
29 |
> |
|
30 |
> |
preDistrib = 0.25, /* fraction of num photons for |
31 |
> |
distribution prepass */ |
32 |
> |
|
33 |
> |
gatherTolerance = 0.5, /* Photon map lookup tolerance; |
34 |
> |
lookups returning fewer than this |
35 |
> |
fraction of minGather/maxGather |
36 |
> |
are restarted with a larger |
37 |
> |
search radius */ |
38 |
> |
|
39 |
> |
maxDistFix = 0; /* Static maximum photon search |
40 |
> |
radius (radius is adaptive if |
41 |
> |
this is zero) */ |
42 |
> |
|
43 |
> |
#ifdef PMAP_OOC |
44 |
> |
float pmapCachePageSize = 8; /* OOC cache pagesize as multiple |
45 |
> |
* of maxGather */ |
46 |
> |
unsigned long pmapCacheSize = 1e6; /* OOC cache size in photons */ |
47 |
> |
#endif |
48 |
|
|
39 |
– |
unsigned long photonHeapSizeInc = 1000, /* Photon heap size increment */ |
40 |
– |
photonMaxBounce = 5000; /* Runaway photon bounce limit */ |
41 |
– |
|
42 |
– |
unsigned photonRepTime = 0, /* Seconds between reports */ |
43 |
– |
maxPreDistrib = 4, /* Max predistrib passes */ |
44 |
– |
defaultGather = 40; /* Default num photons for lookup */ |
49 |
|
|
50 |
+ |
/* Regions of interest */ |
51 |
+ |
unsigned pmapNumROI = 0; |
52 |
+ |
PhotonMapROI *pmapROI = NULL; |
53 |
+ |
|
54 |
+ |
|
55 |
+ |
unsigned verbose = 0; /* Verbose console output */ |
56 |
+ |
unsigned long photonMaxBounce = 5000; /* Runaway photon bounce limit */ |
57 |
+ |
unsigned photonRepTime = 0, /* Seconds between reports */ |
58 |
+ |
maxPreDistrib = 4, /* Max predistrib passes */ |
59 |
+ |
defaultGather = 40; /* Default num photons for lookup */ |
60 |
+ |
|
61 |
+ |
|
62 |
|
/* Per photon map params */ |
63 |
|
PhotonMapParams pmapParams [NUM_PMAP_TYPES] = { |
64 |
|
{NULL, 0, 0, 0}, {NULL, 0, 0, 0}, {NULL, 0, 0, 0}, {NULL, 0, 0, 0}, |
76 |
|
(*pm) -> minGather = parm -> minGather; |
77 |
|
(*pm) -> maxGather = parm -> maxGather; |
78 |
|
(*pm) -> distribTarget = parm -> distribTarget; |
63 |
– |
(*pm) -> heapSizeInc = photonHeapSizeInc; |
79 |
|
(*pm) -> maxDist0 = FHUGE; |
80 |
|
(*pm) -> srcContrib = NULL; |
81 |
|
|