30 |
|
If the direction vector is (0,0,0), a bogus record |
31 |
|
is printed and the output is flushed if the |
32 |
|
.I -x |
33 |
< |
value is unset or zero. |
33 |
> |
value is one or zero. |
34 |
|
(See the notes on this option below.)\0 |
35 |
|
This may be useful for programs that run |
36 |
|
.I rtrace |
87 |
|
.IP |
88 |
|
v value (radiance) |
89 |
|
.IP |
90 |
+ |
V contribution (radiance) |
91 |
+ |
.IP |
92 |
|
w weight |
93 |
|
.IP |
94 |
|
W color coefficient |
180 |
|
This option is especially useful in |
181 |
|
conjunction with ximage(1) for computing illuminance at scene points. |
182 |
|
.TP |
183 |
< |
.BR \-R |
184 |
< |
Boolean switch to control random sampling. |
183 |
> |
.BR \-u |
184 |
> |
Boolean switch to control uncorrelated random sampling. |
185 |
|
When "off", a low-discrepancy sequence is used, which reduces |
186 |
|
variance but can result in a brushed appearance in specular highlights. |
187 |
|
When "on", pure Monte Carlo sampling is used in all calculations. |
199 |
|
.I res. |
200 |
|
The output will be flushed after every |
201 |
|
.I res |
202 |
< |
input rays. |
202 |
> |
input rays if |
203 |
> |
.I \-y |
204 |
> |
is set to zero. |
205 |
> |
A value of one means that every ray will be flushed, whatever |
206 |
> |
the setting of |
207 |
> |
.I \-y. |
208 |
|
A value of zero means that no output flushing will take place. |
209 |
|
.TP |
210 |
|
.BI -y \ res |
235 |
|
.I \-f |
236 |
|
option, above.) |
237 |
|
.TP |
238 |
+ |
.BI -n \ nproc |
239 |
+ |
Execute in parallel on |
240 |
+ |
.I nproc |
241 |
+ |
local processes. |
242 |
+ |
This option is incompatible with the |
243 |
+ |
.I \-P |
244 |
+ |
and |
245 |
+ |
.I \-PP, |
246 |
+ |
options. |
247 |
+ |
Multiple processes also do not work properly with ray tree output |
248 |
+ |
using any of the |
249 |
+ |
.I \-o*t* |
250 |
+ |
options. |
251 |
+ |
There is no benefit from specifying more processes than there are |
252 |
+ |
cores available on the system or the |
253 |
+ |
.I \-x |
254 |
+ |
setting, which forces a wait at each flush. |
255 |
+ |
.TP |
256 |
|
.BI -dj \ frac |
257 |
|
Set the direct jittering to |
258 |
|
.I frac. |
335 |
|
.I \-i |
336 |
|
option. |
337 |
|
.TP |
338 |
< |
.BI -sj \ frac |
339 |
< |
Set the specular sampling jitter to |
340 |
< |
.I frac. |
341 |
< |
This is the degree to which the highlights are sampled |
342 |
< |
for rough specular materials. |
343 |
< |
A value of one means that all highlights will be fully sampled |
344 |
< |
using distributed ray tracing. |
338 |
> |
.BI -ss \ samp |
339 |
> |
Set the specular sampling to |
340 |
> |
.I samp. |
341 |
> |
For values less than 1, this is the degree to which the highlights |
342 |
> |
are sampled for rough specular materials. |
343 |
> |
A value greater than one causes multiple ray samples to be sent |
344 |
> |
to reduce noise at a commmesurate cost. |
345 |
|
A value of zero means that no jittering will take place, and all |
346 |
|
reflections will appear sharp even when they should be diffuse. |
347 |
|
.TP |
361 |
|
.TP |
362 |
|
.BR -bv |
363 |
|
Boolean switch for back face visibility. |
364 |
< |
With this switch off, back faces of opaque objects will be invisible |
365 |
< |
to all rays. |
364 |
> |
With this switch off, back faces of all objects will be invisible |
365 |
> |
to view rays. |
366 |
|
This is dangerous unless the model was constructed such that |
367 |
< |
all surface normals on opaque objects face outward. |
367 |
> |
all surface normals face outward. |
368 |
|
Although turning off back face visibility does not save much |
369 |
|
computation time under most circumstances, it may be useful as a |
370 |
|
tool for scene debugging, or for seeing through one-sided walls from |
371 |
|
the outside. |
347 |
– |
This option has no effect on transparent or translucent materials. |
372 |
|
.TP |
373 |
|
.BI -av " red grn blu" |
374 |
|
Set the ambient value to a radiance of |
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. |
537 |
+ |
.IP |
538 |
+ |
Additionally specifying |
539 |
+ |
.I bwidth2 |
540 |
+ |
enables bias compensation for the density estimates with a |
541 |
+ |
minimum and maximum bandwidth of |
542 |
+ |
.I bwidth1 |
543 |
+ |
and |
544 |
+ |
.I bwidth2, |
545 |
+ |
respectively. |
546 |
+ |
.IP |
547 |
+ |
Global photon irradiance may be optionally precomputed by |
548 |
+ |
.I mkpmap(1), |
549 |
+ |
in which case the bandwidth, if specified, is ignored, as the nearest photon |
550 |
+ |
is invariably looked up. |
551 |
+ |
.IP |
552 |
+ |
Using direct photons replaces the direct calculation with density estimates |
553 |
+ |
for debugging and validation of photon emission. |
554 |
+ |
.TP |
555 |
+ |
.BI -am " frac" |
556 |
+ |
Maximum search radius for photon map lookups. Without this option, an |
557 |
+ |
initial maximum search radius is estimated for each photon map from the |
558 |
+ |
average photon distance to the distribution's centre of gravity. It is then |
559 |
+ |
adapted to the photon density in subsequent lookups. This option imposes a |
560 |
+ |
global fixed maximum search radius for |
561 |
+ |
.I all |
562 |
+ |
photon maps, thus defeating the automatic adaptation. It is useful when |
563 |
+ |
multiple warnings about short photon lookups are issued. Note that this |
564 |
+ |
option does not conflict with the bandwidth specified with the |
565 |
+ |
.I \-ap |
566 |
+ |
option; the number of photons found will not exceed the latter, but may be |
567 |
+ |
lower if the maximum search radius contains fewer photons, thus resulting in |
568 |
+ |
short lookups. Setting this radius too large, on the other hand, may |
569 |
+ |
degrade performance. |
570 |
+ |
.TP |
571 |
+ |
.BI -ac " pagesize" |
572 |
+ |
Set the photon cache page size when using out-of-core photon mapping. The |
573 |
+ |
photon cache reduces disk I/O incurred by on-demand loading (paging) of |
574 |
+ |
photons, and thus increases performance. This |
575 |
+ |
is expressed as a (float) multiple of the density estimate bandwidth |
576 |
+ |
specified with |
577 |
+ |
.I \-ap |
578 |
+ |
under the assumption that photon lookups are local to a cache page. Cache |
579 |
+ |
performance is sensitive to this parameter: larger pagesizes will reduce the |
580 |
+ |
paging frequency at the expense of higher latency when paging does occur. |
581 |
+ |
Sensible values are in the range 4 (default) to 16. |
582 |
+ |
.TP |
583 |
+ |
.BI -aC " cachesize" |
584 |
+ |
Set the total number of photons cached when using out-of-core photon |
585 |
+ |
mapping, taking into account the pagesize specified by |
586 |
+ |
.I \-ac. |
587 |
+ |
Note that this is approximate as the number of cache pages is rounded to |
588 |
+ |
the nearest prime. This allows adapting the cache to the available physical |
589 |
+ |
memory. In conjunction with the |
590 |
+ |
.I \-n |
591 |
+ |
option, this is the cache size |
592 |
+ |
.I per parallel process. |
593 |
+ |
Cache performance is less sensitive to this parameter, |
594 |
+ |
and reasonable performance can obtained with as few as 10k photons. The |
595 |
+ |
default is 1M. This option recognises multiplier suffixes (k = 1e3, M = |
596 |
+ |
1e6), both in upper and lower case. |
597 |
+ |
.TP |
598 |
|
.BI -me " rext gext bext" |
599 |
|
Set the global medium extinction coefficient to the indicated color, |
600 |
|
in units of 1/distance (distance in world coordinates). |
633 |
|
.TP |
634 |
|
.BI -lr \ N |
635 |
|
Limit reflections to a maximum of |
636 |
< |
.I N. |
636 |
> |
.I N, |
637 |
> |
if N is a positive integer. |
638 |
|
If |
639 |
|
.I N |
640 |
|
is zero or negative, then Russian roulette is used for ray |
642 |
|
.I -lw |
643 |
|
setting (below) must be positive. |
644 |
|
If N is a negative integer, then this sets the upper limit |
645 |
< |
of reflections past which Russian roulette will not be used. |
645 |
> |
of reflections past which Russian roulette will be used. |
646 |
|
In scenes with dielectrics and total internal reflection, |
647 |
|
a setting of 0 (no limit) may cause a stack overflow. |
648 |
|
.TP |
718 |
|
on most multiprocessing platforms, since the |
719 |
|
.I fork(2) |
720 |
|
system call will share memory on a copy-on-write basis. |
721 |
+ |
.SH NOTES |
722 |
+ |
Photons are generally surface bound (an exception are volume photons), thus |
723 |
+ |
the ambient irradiance in photon mapping mode will be biased at positions |
724 |
+ |
which do not lie on a surface. |
725 |
|
.SH EXAMPLES |
726 |
|
To compute radiance values for the rays listed in samples.inp: |
727 |
|
.IP "" .2i |
728 |
< |
rtrace -ov scene.oct < samples.inp > radiance.out |
728 |
> |
rtrace \-ov scene.oct < samples.inp > radiance.out |
729 |
|
.PP |
730 |
|
To compute illuminance values at locations selected with the 't' |
731 |
|
command of |
732 |
|
.I ximage(1): |
733 |
|
.IP "" .2i |
734 |
< |
ximage scene.pic | rtrace -h -x 1 -i scene.oct | rcalc -e '$1=47.4*$1+120*$2+11.6*$3' |
734 |
> |
ximage scene.hdr | rtrace \-h \-x 1 \-i scene.oct | rcalc \-e '$1=47.4*$1+120*$2+11.6*$3' |
735 |
|
.PP |
736 |
|
To record the object identifier corresponding to each pixel in an image: |
737 |
|
.IP "" .2i |
738 |
< |
vwrays -fd scene.pic | rtrace -fda `vwrays -d scene.pic` -os scene.oct |
738 |
> |
vwrays \-fd scene.hdr | rtrace \-fda `vwrays \-d scene.hdr` \-os scene.oct |
739 |
|
.PP |
740 |
|
To compute an image with an unusual view mapping: |
741 |
|
.IP "" .2i |
742 |
< |
cnt 640 480 | rcalc -e 'xr:640;yr:480' -f unusual_view.cal | rtrace |
743 |
< |
-x 640 -y 480 -fac scene.oct > unusual.pic |
742 |
> |
cnt 480 640 | rcalc \-e 'xr:640;yr:480' \-f unusual_view.cal | rtrace |
743 |
> |
\-x 640 \-y 480 \-fac scene.oct > unusual.hdr |
744 |
> |
.PP |
745 |
> |
To compute ambient illuminance in photon mapping mode from a global photon |
746 |
> |
map global.pm via one ambient bounce, and from a caustic photon map |
747 |
> |
caustic.pm at sensor positions in samples.inp: |
748 |
> |
.IP "" .2i |
749 |
> |
rtrace -h -ov -ab 1 -ap global.pm 50 -ap caustic.pm 50 scene.oct < |
750 |
> |
samples.inp > illum.out |
751 |
|
.SH ENVIRONMENT |
752 |
|
RAYPATH the directories to check for auxiliary files. |
753 |
|
.SH FILES |
765 |
|
.SH AUTHOR |
766 |
|
Greg Ward |
767 |
|
.SH "SEE ALSO" |
768 |
< |
getinfo(1), lookamb(1), oconv(1), pfilt(1), pinterp(1), |
769 |
< |
pvalue(1), rpict(1), rtcontrib(1), rvu(1), vwrays(1), ximage(1) |
768 |
> |
getinfo(1), lookamb(1), mkpmap(1), oconv(1), pfilt(1), pinterp(1), |
769 |
> |
pvalue(1), rpict(1), rcontrib(1), rvu(1), vwrays(1), ximage(1) |