| 401 |
|
.BI -ab \ N |
| 402 |
|
Set the number of ambient bounces to |
| 403 |
|
.I N. |
| 404 |
< |
This is the maximum number of diffuse bounces |
| 405 |
< |
computed by the indirect calculation. |
| 406 |
< |
A value of zero implies no indirect calculation. |
| 404 |
> |
This is the maximum number of diffuse bounces computed by the indirect |
| 405 |
> |
calculation. A value of zero implies no indirect calculation. |
| 406 |
> |
.IP |
| 407 |
> |
This value defaults to 1 in photon mapping mode (see |
| 408 |
> |
.I -ap |
| 409 |
> |
below), implying that global photon irradiance is always computed via |
| 410 |
> |
.I one |
| 411 |
> |
ambient bounce; this behaviour applies to any positive number of ambient |
| 412 |
> |
bounces, regardless of the actual value specified. A negative value enables |
| 413 |
> |
a preview mode that directly visualises the irradiance from the global |
| 414 |
> |
photon map without any ambient bounces. |
| 415 |
|
.TP |
| 416 |
|
.BI -ar \ res |
| 417 |
|
Set the ambient resolution to |
| 517 |
|
except read modifiers to be included from |
| 518 |
|
.I file. |
| 519 |
|
.TP |
| 520 |
+ |
.BI -ap " file [bwidth1 [bwidth2]]" |
| 521 |
+ |
Enable photon mapping mode. Loads a photon map generated with |
| 522 |
+ |
.I mkpmap(1) |
| 523 |
+ |
from |
| 524 |
+ |
.I file, |
| 525 |
+ |
and evaluates the indirect irradiance depending on the photon type |
| 526 |
+ |
(automagically detected) using density estimates with a bandwidth of |
| 527 |
+ |
.I bwidth1 |
| 528 |
+ |
photons, or the default bandwidth if none is specified (a warning will be |
| 529 |
+ |
issued in this case). |
| 530 |
+ |
.IP |
| 531 |
+ |
Global photon irradiance is evaluated as part of the ambient calculation (see |
| 532 |
+ |
.I \-ab |
| 533 |
+ |
above), caustic photon irradiance is evaluated at primary rays, and |
| 534 |
+ |
indirect inscattering in |
| 535 |
+ |
.I mist |
| 536 |
+ |
is accounted for by volume photons. Contribution photons are treated as |
| 537 |
+ |
global photons by |
| 538 |
+ |
.I rtrace. |
| 539 |
+ |
.IP |
| 540 |
+ |
Additionally specifying |
| 541 |
+ |
.I bwidth2 |
| 542 |
+ |
enables bias compensation for the density estimates with a |
| 543 |
+ |
minimum and maximum bandwidth of |
| 544 |
+ |
.I bwidth1 |
| 545 |
+ |
and |
| 546 |
+ |
.I bwidth2, |
| 547 |
+ |
respectively. |
| 548 |
+ |
.IP |
| 549 |
+ |
Global photon irradiance may be optionally precomputed by |
| 550 |
+ |
.I mkpmap(1), |
| 551 |
+ |
in which case the bandwidth, if specified, is ignored, as the nearest photon |
| 552 |
+ |
is invariably looked up. |
| 553 |
+ |
.IP |
| 554 |
+ |
Using direct photons replaces the direct calculation with density estimates |
| 555 |
+ |
for debugging and validation of photon emission. |
| 556 |
+ |
.TP |
| 557 |
+ |
.BI -am " frac" |
| 558 |
+ |
Maximum search radius for photon map lookups. Without this option, an |
| 559 |
+ |
initial maximum search radius is estimated for each photon map from the |
| 560 |
+ |
average photon distance to the distribution's centre of gravity. It is then |
| 561 |
+ |
adapted to the photon density in subsequent lookups. This option imposes a |
| 562 |
+ |
global fixed maximum search radius for |
| 563 |
+ |
.I all |
| 564 |
+ |
photon maps, thus defeating the automatic adaptation. It is useful when |
| 565 |
+ |
multiple warnings about short photon lookups are issued. Note that this |
| 566 |
+ |
option does not conflict with the bandwidth specified with the |
| 567 |
+ |
.I \-ap |
| 568 |
+ |
option; the number of photons found will not exceed the latter, but may be |
| 569 |
+ |
lower if the maximum search radius contains fewer photons, thus resulting in |
| 570 |
+ |
short lookups. Setting this radius too large, on the other hand, may |
| 571 |
+ |
degrade performance. |
| 572 |
+ |
.TP |
| 573 |
+ |
.BI -ac " pagesize" |
| 574 |
+ |
Set the photon cache page size when using out-of-core photon mapping. The |
| 575 |
+ |
photon cache reduces disk I/O incurred by on-demand loading (paging) of |
| 576 |
+ |
photons, and thus increases performance. This |
| 577 |
+ |
is expressed as a (float) multiple of the density estimate bandwidth |
| 578 |
+ |
specified with |
| 579 |
+ |
.I \-ap |
| 580 |
+ |
under the assumption that photon lookups are local to a cache page. Cache |
| 581 |
+ |
performance is sensitive to this parameter: larger pagesizes will reduce the |
| 582 |
+ |
paging frequency at the expense of higher latency when paging does occur. |
| 583 |
+ |
Sensible values are in the range 4 (default) to 16. |
| 584 |
+ |
.TP |
| 585 |
+ |
.BI -aC " cachesize" |
| 586 |
+ |
Set the total number of photons cached when using out-of-core photon |
| 587 |
+ |
mapping, taking into account the pagesize specified by |
| 588 |
+ |
.I \-ac. |
| 589 |
+ |
Note that this is approximate as the number of cache pages is rounded to |
| 590 |
+ |
the nearest prime. This allows adapting the cache to the available physical |
| 591 |
+ |
memory. In conjunction with the |
| 592 |
+ |
.I \-n |
| 593 |
+ |
option, this is the cache size |
| 594 |
+ |
.I per parallel process. |
| 595 |
+ |
Cache performance is less sensitive to this parameter, |
| 596 |
+ |
and reasonable performance can obtained with as few as 10k photons. The |
| 597 |
+ |
default is 1M. This option recognises multiplier suffixes (k = 1e3, M = |
| 598 |
+ |
1e6), both in upper and lower case. |
| 599 |
+ |
.TP |
| 600 |
|
.BI -me " rext gext bext" |
| 601 |
|
Set the global medium extinction coefficient to the indicated color, |
| 602 |
|
in units of 1/distance (distance in world coordinates). |
| 720 |
|
on most multiprocessing platforms, since the |
| 721 |
|
.I fork(2) |
| 722 |
|
system call will share memory on a copy-on-write basis. |
| 723 |
+ |
.SH NOTES |
| 724 |
+ |
Photons are generally surface bound (an exception are volume photons), thus |
| 725 |
+ |
the ambient irradiance in photon mapping mode will be biased at positions |
| 726 |
+ |
which do not lie on a surface. |
| 727 |
|
.SH EXAMPLES |
| 728 |
|
To compute radiance values for the rays listed in samples.inp: |
| 729 |
|
.IP "" .2i |
| 743 |
|
.IP "" .2i |
| 744 |
|
cnt 480 640 | rcalc \-e 'xr:640;yr:480' \-f unusual_view.cal | rtrace |
| 745 |
|
\-x 640 \-y 480 \-fac scene.oct > unusual.hdr |
| 746 |
+ |
.PP |
| 747 |
+ |
To compute ambient illuminance in photon mapping mode from a global photon |
| 748 |
+ |
map global.pm via one ambient bounce, and from a caustic photon map |
| 749 |
+ |
caustic.pm at sensor positions in samples.inp: |
| 750 |
+ |
.IP "" .2i |
| 751 |
+ |
rtrace -h -ov -ab 1 -ap global.pm 50 -ap caustic.pm 50 scene.oct < |
| 752 |
+ |
samples.inp > illum.out |
| 753 |
|
.SH ENVIRONMENT |
| 754 |
|
RAYPATH the directories to check for auxiliary files. |
| 755 |
|
.SH FILES |
| 767 |
|
.SH AUTHOR |
| 768 |
|
Greg Ward |
| 769 |
|
.SH "SEE ALSO" |
| 770 |
< |
getinfo(1), lookamb(1), oconv(1), pfilt(1), pinterp(1), |
| 771 |
< |
pvalue(1), rpict(1), rcontrib(1), rvu(1), vwrays(1), ximage(1) |
| 770 |
> |
getinfo(1), lookamb(1), mkpmap(1), oconv(1), pfilt(1), pinterp(1), |
| 771 |
> |
pvalue(1), rcontrib(1), rpict(1), rtpict(1), rvu(1), vwrays(1), ximage(1) |