| 121 |
|
|
| 122 |
|
int do_irrad = 0; /* compute irradiance? */ |
| 123 |
|
|
| 124 |
< |
int rand_samp = 0; /* pure Monte Carlo sampling? */ |
| 124 |
> |
int rand_samp = 1; /* pure Monte Carlo sampling? */ |
| 125 |
|
|
| 126 |
|
double dstrsrc = 0.0; /* square source distribution */ |
| 127 |
|
double shadthresh = .03; /* shadow threshold */ |
| 141 |
|
|
| 142 |
|
int backvis = 1; /* back face visibility */ |
| 143 |
|
|
| 144 |
< |
int maxdepth = 8; /* maximum recursion depth */ |
| 145 |
< |
double minweight = 5e-4; /* minimum ray weight */ |
| 144 |
> |
int maxdepth = -10; /* maximum recursion depth */ |
| 145 |
> |
double minweight = 2e-3; /* minimum ray weight */ |
| 146 |
|
|
| 147 |
|
char *ambfile = NULL; /* ambient file name */ |
| 148 |
|
COLOR ambval = BLKCOLOR; /* ambient value */ |
| 238 |
|
if (rp == NULL) |
| 239 |
|
return; |
| 240 |
|
rp->do_irrad = do_irrad; |
| 241 |
+ |
rp->rand_samp = rand_samp; |
| 242 |
|
rp->dstrsrc = dstrsrc; |
| 243 |
|
rp->shadthresh = shadthresh; |
| 244 |
|
rp->shadcert = shadcert; |
| 255 |
|
rp->backvis = backvis; |
| 256 |
|
rp->maxdepth = maxdepth; |
| 257 |
|
rp->minweight = minweight; |
| 257 |
– |
copycolor(rp->ambval, ambval); |
| 258 |
– |
memset(rp->ambfile, '\0', sizeof(rp->ambfile)); |
| 258 |
|
if (ambfile != NULL) |
| 259 |
|
strncpy(rp->ambfile, ambfile, sizeof(rp->ambfile)-1); |
| 260 |
+ |
else |
| 261 |
+ |
memset(rp->ambfile, '\0', sizeof(rp->ambfile)); |
| 262 |
+ |
copycolor(rp->ambval, ambval); |
| 263 |
|
rp->ambvwt = ambvwt; |
| 264 |
|
rp->ambacc = ambacc; |
| 265 |
|
rp->ambres = ambres; |
| 300 |
|
} |
| 301 |
|
/* restore saved settings */ |
| 302 |
|
do_irrad = rp->do_irrad; |
| 303 |
+ |
rand_samp = rp->rand_samp; |
| 304 |
|
dstrsrc = rp->dstrsrc; |
| 305 |
|
shadthresh = rp->shadthresh; |
| 306 |
|
shadcert = rp->shadcert; |
| 368 |
|
return; |
| 369 |
|
|
| 370 |
|
rp->do_irrad = 0; |
| 371 |
+ |
rp->rand_samp = 1; |
| 372 |
|
rp->dstrsrc = 0.0; |
| 373 |
|
rp->shadthresh = .03; |
| 374 |
|
rp->shadcert = .75; |
| 383 |
|
rp->specthresh = .15; |
| 384 |
|
rp->specjitter = 1.; |
| 385 |
|
rp->backvis = 1; |
| 386 |
< |
rp->maxdepth = 8; |
| 386 |
> |
rp->maxdepth = -10; |
| 387 |
|
rp->minweight = 2e-3; |
| 384 |
– |
setcolor(rp->ambval, 0., 0., 0.); |
| 388 |
|
memset(rp->ambfile, '\0', sizeof(rp->ambfile)); |
| 389 |
+ |
setcolor(rp->ambval, 0., 0., 0.); |
| 390 |
|
rp->ambvwt = 0; |
| 391 |
|
rp->ambres = 256; |
| 392 |
|
rp->ambacc = 0.15; |