ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapparm.c
(Generate patch)

Comparing ray/src/rt/pmapparm.c (file contents):
Revision 2.2 by rschregle, Fri May 8 13:20:23 2015 UTC vs.
Revision 2.8 by rschregle, Mon Aug 14 21:12:10 2017 UTC

# Line 1 | Line 1
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   */
# Line 14 | Line 19
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},
# Line 60 | Line 76 | int setPmapParam (PhotonMap** pm, const PhotonMapParam
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines