1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
+ |
|
5 |
|
/* |
6 |
< |
================================================================== |
7 |
< |
Parameters for photon map generation; used by MKPMAP |
8 |
< |
For inclusion in mkpmap.c |
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 |
|
*/ |
23 |
|
#include <ctype.h> |
24 |
|
|
25 |
|
|
26 |
< |
float pdfSamples = 1000, /* PDF samples per steradian */ |
23 |
< |
finalGather = 0.25, /* fraction of global photons for |
24 |
< |
irradiance precomputation */ |
25 |
< |
preDistrib = 0.25, /* fraction of num photons for |
26 |
< |
distribution prepass */ |
27 |
< |
gatherTolerance = 0.5, /* Photon map lookup tolerance; |
28 |
< |
lookups returning fewer than this |
29 |
< |
fraction of minGather/maxGather |
30 |
< |
are restarted with a larger |
31 |
< |
search radius */ |
32 |
< |
maxDistCoeff = 100; /* Coefficient for maximum photon |
33 |
< |
search radius */ |
26 |
> |
float pdfSamples = 1000, /* PDF samples per steradian */ |
27 |
|
|
28 |
+ |
finalGather = 0.25, /* fraction of global photons for |
29 |
+ |
irradiance precomputation */ |
30 |
+ |
|
31 |
+ |
preDistrib = 0.25, /* fraction of num photons for |
32 |
+ |
distribution prepass */ |
33 |
+ |
|
34 |
+ |
gatherTolerance = 0.5, /* Photon map lookup tolerance; |
35 |
+ |
lookups returning fewer than this |
36 |
+ |
fraction of minGather/maxGather |
37 |
+ |
are restarted with a larger |
38 |
+ |
search radius */ |
39 |
+ |
|
40 |
+ |
maxDistFix = 0; /* Static maximum photon search |
41 |
+ |
radius (radius is adaptive if |
42 |
+ |
this is zero) */ |
43 |
+ |
|
44 |
+ |
#ifdef PMAP_OOC |
45 |
+ |
float pmapCachePageSize = 8; /* OOC cache pagesize as multiple |
46 |
+ |
* of maxGather */ |
47 |
+ |
unsigned long pmapCacheSize = 1e6; /* OOC cache size in photons */ |
48 |
+ |
#endif |
49 |
+ |
|
50 |
+ |
|
51 |
|
#ifdef PMAP_ROI |
52 |
< |
/* Region of interest bbox: {xmin, xmax, ymin, ymax, zmin, zmax} */ |
53 |
< |
float pmapROI [6] = {-FHUGE, FHUGE, -FHUGE, FHUGE, -FHUGE, FHUGE}; |
52 |
> |
/* Region of interest bbox: {xmin, xmax, ymin, ymax, zmin, zmax} */ |
53 |
> |
float pmapROI [6] = {-FHUGE, FHUGE, -FHUGE, FHUGE, -FHUGE, FHUGE}; |
54 |
|
#endif |
55 |
|
|
40 |
– |
unsigned long photonHeapSizeInc = 1000, /* Photon heap size increment */ |
41 |
– |
photonMaxBounce = 5000; /* Runaway photon bounce limit */ |
42 |
– |
|
43 |
– |
unsigned photonRepTime = 0, /* Seconds between reports */ |
44 |
– |
maxPreDistrib = 4, /* Max predistrib passes */ |
45 |
– |
defaultGather = 40; /* Default num photons for lookup */ |
56 |
|
|
57 |
+ |
unsigned long photonMaxBounce = 5000; /* Runaway photon bounce limit */ |
58 |
+ |
unsigned photonRepTime = 0, /* Seconds between reports */ |
59 |
+ |
maxPreDistrib = 4, /* Max predistrib passes */ |
60 |
+ |
defaultGather = 40; /* Default num photons for lookup */ |
61 |
+ |
|
62 |
+ |
|
63 |
|
/* Per photon map params */ |
64 |
|
PhotonMapParams pmapParams [NUM_PMAP_TYPES] = { |
65 |
|
{NULL, 0, 0, 0}, {NULL, 0, 0, 0}, {NULL, 0, 0, 0}, {NULL, 0, 0, 0}, |
77 |
|
(*pm) -> minGather = parm -> minGather; |
78 |
|
(*pm) -> maxGather = parm -> maxGather; |
79 |
|
(*pm) -> distribTarget = parm -> distribTarget; |
64 |
– |
(*pm) -> heapSizeInc = photonHeapSizeInc; |
80 |
|
(*pm) -> maxDist0 = FHUGE; |
81 |
|
(*pm) -> srcContrib = NULL; |
82 |
|
|