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.4 by rschregle, Tue May 26 13:31:19 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 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   */
# Line 15 | Line 19
19  
20   #include "pmapparm.h"
21   #include "pmapdata.h"
18 #include "standard.h"
22   #include <ctype.h>
23  
24  
25 < 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 <      maxDistFix = 0;                   /* Static maximum photon search
33 <                                           radius (radius is adaptive if
34 <                                           this is zero) */
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  
41 unsigned long photonHeapSizeInc = 1000, /* Photon heap size increment */
42              photonMaxBounce = 5000;   /* Runaway photon bounce limit */
43              
44 unsigned photonRepTime = 0,             /* Seconds between reports */
45         maxPreDistrib = 4,             /* Max predistrib passes */
46         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 62 | Line 76 | int setPmapParam (PhotonMap** pm, const PhotonMapParam
76        (*pm) -> minGather = parm -> minGather;
77        (*pm) -> maxGather = parm -> maxGather;
78        (*pm) -> distribTarget = parm -> distribTarget;
65      (*pm) -> heapSizeInc = photonHeapSizeInc;      
79        (*pm) -> maxDist0 = FHUGE;
80        (*pm) -> srcContrib = NULL;
81  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines