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 |
95 |
+ |
.IP |
96 |
|
l effective length of ray |
97 |
|
.IP |
98 |
|
L first intersection distance |
109 |
|
.IP |
110 |
|
m modifier name |
111 |
|
.IP |
112 |
+ |
M material name |
113 |
+ |
.IP |
114 |
+ |
r mirrored value contribution |
115 |
+ |
.IP |
116 |
+ |
x unmirrored value contribution |
117 |
+ |
.IP |
118 |
+ |
R mirrored ray length |
119 |
+ |
.IP |
120 |
+ |
X unmirrored ray length |
121 |
+ |
.IP |
122 |
+ |
~ tilde (end of trace marker) |
123 |
+ |
.IP |
124 |
|
If the letter 't' appears in |
125 |
|
.I spec, |
126 |
|
then the fields following will be printed for every ray traced, |
127 |
|
not just the final result. |
128 |
+ |
If the capital letter 'T' is given instead of 't', then all rays will |
129 |
+ |
be reported, including shadow testing rays to light sources. |
130 |
|
Spawned rays are indented one tab for each level. |
131 |
+ |
The tilde marker ('~') is a handy way of differentiating the final ray |
132 |
+ |
value from daughter values in a traced ray tree, and usually appears |
133 |
+ |
right before the 't' or 'T' output flags. |
134 |
+ |
E.g., |
135 |
+ |
.I \-ov~TmW |
136 |
+ |
will emit a tilde followed by a tab at the end of each trace, |
137 |
+ |
which can be easily distinguished even in binary output. |
138 |
|
.IP |
139 |
|
Note that there is no space between this option and its argument. |
140 |
|
.TP |
141 |
< |
.BI -te \ mat |
141 |
> |
.BI -te \ mod |
142 |
|
Append |
143 |
< |
.I mat |
143 |
> |
.I mod |
144 |
|
to the trace exclude list, |
145 |
|
so that it will not be reported by the trace option |
146 |
|
.I (\-o*t*). |
147 |
|
Any ray striking an object having |
148 |
< |
.I mat |
148 |
> |
.I mod |
149 |
|
as its modifier will not be reported to the standard output with |
150 |
|
the rest of the rays being traced. |
151 |
< |
This option has no effect unless the 't' option has been given as |
152 |
< |
part of the output specifier. |
153 |
< |
Any number of excluded materials may be given, but each |
151 |
> |
This option has no effect unless either the 't' or 'T' |
152 |
> |
option has been given as part of the output specifier. |
153 |
> |
Any number of excluded modifiers may be given, but each |
154 |
|
must appear in a separate option. |
155 |
|
.TP |
156 |
< |
.BI -ti \ mat |
156 |
> |
.BI -ti \ mod |
157 |
|
Add |
158 |
< |
.I mat |
158 |
> |
.I mod |
159 |
|
to the trace include list, |
160 |
< |
so that it will be considered during the indirect calculation. |
160 |
> |
so that it will be reported by the trace option. |
161 |
|
The program can use either an include list or an exclude |
162 |
|
list, but not both. |
163 |
|
.TP |
164 |
|
.BI -tE \ file |
165 |
|
Same as |
166 |
|
.I \-te, |
167 |
< |
except read materials to be excluded from |
167 |
> |
except read modifiers to be excluded from |
168 |
|
.I file. |
169 |
|
The RAYPATH environment variable determines which directories are |
170 |
|
searched for this file. |
171 |
< |
The material names are separated by white space in the file. |
171 |
> |
The modifier names are separated by white space in the file. |
172 |
|
.TP |
173 |
|
.BI -tI \ file |
174 |
|
Same as |
175 |
|
.I \-ti, |
176 |
< |
except read materials to be included from |
176 |
> |
except read modifiers to be included from |
177 |
|
.I file. |
178 |
|
.TP |
179 |
|
.BR \-i |
188 |
|
This option is especially useful in |
189 |
|
conjunction with ximage(1) for computing illuminance at scene points. |
190 |
|
.TP |
191 |
+ |
.BR \-u |
192 |
+ |
Boolean switch to control uncorrelated random sampling. |
193 |
+ |
When "off", a low-discrepancy sequence is used, which reduces |
194 |
+ |
variance but can result in a brushed appearance in specular highlights. |
195 |
+ |
When "on", pure Monte Carlo sampling is used in all calculations. |
196 |
+ |
.TP |
197 |
|
.BR \-I |
198 |
|
Boolean switch to compute irradiance rather than radiance, |
199 |
|
with the input origin and direction interpreted instead |
207 |
|
.I res. |
208 |
|
The output will be flushed after every |
209 |
|
.I res |
210 |
< |
input rays. |
210 |
> |
input rays if |
211 |
> |
.I \-y |
212 |
> |
is set to zero. |
213 |
> |
A value of one means that every ray will be flushed, whatever |
214 |
> |
the setting of |
215 |
> |
.I \-y. |
216 |
|
A value of zero means that no output flushing will take place. |
217 |
|
.TP |
218 |
|
.BI -y \ res |
243 |
|
.I \-f |
244 |
|
option, above.) |
245 |
|
.TP |
246 |
+ |
.BI -n \ nproc |
247 |
+ |
Execute in parallel on |
248 |
+ |
.I nproc |
249 |
+ |
local processes. |
250 |
+ |
This option is incompatible with the |
251 |
+ |
.I \-P |
252 |
+ |
and |
253 |
+ |
.I \-PP, |
254 |
+ |
options. |
255 |
+ |
Multiple processes also do not work properly with ray tree output |
256 |
+ |
using any of the |
257 |
+ |
.I \-o*t* |
258 |
+ |
options. |
259 |
+ |
There is no benefit from specifying more processes than there are |
260 |
+ |
cores available on the system or the |
261 |
+ |
.I \-x |
262 |
+ |
setting, which forces a wait at each flush. |
263 |
+ |
.TP |
264 |
|
.BI -dj \ frac |
265 |
|
Set the direct jittering to |
266 |
|
.I frac. |
343 |
|
.I \-i |
344 |
|
option. |
345 |
|
.TP |
346 |
< |
.BI -sj \ frac |
347 |
< |
Set the specular sampling jitter to |
348 |
< |
.I frac. |
349 |
< |
This is the degree to which the highlights are sampled |
350 |
< |
for rough specular materials. |
351 |
< |
A value of one means that all highlights will be fully sampled |
352 |
< |
using distributed ray tracing. |
346 |
> |
.BI -ss \ samp |
347 |
> |
Set the specular sampling to |
348 |
> |
.I samp. |
349 |
> |
For values less than 1, this is the degree to which the highlights |
350 |
> |
are sampled for rough specular materials. |
351 |
> |
A value greater than one causes multiple ray samples to be sent |
352 |
> |
to reduce noise at a commmesurate cost. |
353 |
|
A value of zero means that no jittering will take place, and all |
354 |
|
reflections will appear sharp even when they should be diffuse. |
355 |
|
.TP |
369 |
|
.TP |
370 |
|
.BR -bv |
371 |
|
Boolean switch for back face visibility. |
372 |
< |
With this switch off, back faces of opaque objects will be invisible |
373 |
< |
to all rays. |
372 |
> |
With this switch off, back faces of all objects will be invisible |
373 |
> |
to view rays. |
374 |
|
This is dangerous unless the model was constructed such that |
375 |
< |
all surface normals on opaque objects face outward. |
375 |
> |
all surface normals face outward. |
376 |
|
Although turning off back face visibility does not save much |
377 |
|
computation time under most circumstances, it may be useful as a |
378 |
|
tool for scene debugging, or for seeing through one-sided walls from |
379 |
|
the outside. |
326 |
– |
This option has no effect on transparent or translucent materials. |
380 |
|
.TP |
381 |
|
.BI -av " red grn blu" |
382 |
|
Set the ambient value to a radiance of |
409 |
|
.BI -ab \ N |
410 |
|
Set the number of ambient bounces to |
411 |
|
.I N. |
412 |
< |
This is the maximum number of diffuse bounces |
413 |
< |
computed by the indirect calculation. |
414 |
< |
A value of zero implies no indirect calculation. |
412 |
> |
This is the maximum number of diffuse bounces computed by the indirect |
413 |
> |
calculation. A value of zero implies no indirect calculation. |
414 |
> |
.IP |
415 |
> |
This value defaults to 1 in photon mapping mode (see |
416 |
> |
.I -ap |
417 |
> |
below), implying that global photon irradiance is always computed via |
418 |
> |
.I one |
419 |
> |
ambient bounce; this behaviour applies to any positive number of ambient |
420 |
> |
bounces, regardless of the actual value specified. A negative value enables |
421 |
> |
a preview mode that directly visualises the irradiance from the global |
422 |
> |
photon map without any ambient bounces. |
423 |
|
.TP |
424 |
|
.BI -ar \ res |
425 |
|
Set the ambient resolution to |
488 |
|
.I Getinfo(1) |
489 |
|
may be used to print out this information. |
490 |
|
.TP |
491 |
< |
.BI -ae \ mat |
491 |
> |
.BI -ae \ mod |
492 |
|
Append |
493 |
< |
.I mat |
493 |
> |
.I mod |
494 |
|
to the ambient exclude list, |
495 |
|
so that it will not be considered during the indirect calculation. |
496 |
|
This is a hack for speeding the indirect computation by |
497 |
|
ignoring certain objects. |
498 |
|
Any object having |
499 |
< |
.I mat |
499 |
> |
.I mod |
500 |
|
as its modifier will get the default ambient |
501 |
|
level rather than a calculated value. |
502 |
< |
Any number of excluded materials may be given, but each |
502 |
> |
Any number of excluded modifiers may be given, but each |
503 |
|
must appear in a separate option. |
504 |
|
.TP |
505 |
< |
.BI -ai \ mat |
505 |
> |
.BI -ai \ mod |
506 |
|
Add |
507 |
< |
.I mat |
507 |
> |
.I mod |
508 |
|
to the ambient include list, |
509 |
|
so that it will be considered during the indirect calculation. |
510 |
|
The program can use either an include list or an exclude |
513 |
|
.BI -aE \ file |
514 |
|
Same as |
515 |
|
.I \-ae, |
516 |
< |
except read materials to be excluded from |
516 |
> |
except read modifiers to be excluded from |
517 |
|
.I file. |
518 |
|
The RAYPATH environment variable determines which directories are |
519 |
|
searched for this file. |
520 |
< |
The material names are separated by white space in the file. |
520 |
> |
The modifier names are separated by white space in the file. |
521 |
|
.TP |
522 |
|
.BI -aI \ file |
523 |
|
Same as |
524 |
|
.I \-ai, |
525 |
< |
except read materials to be included from |
525 |
> |
except read modifiers to be included from |
526 |
|
.I file. |
527 |
|
.TP |
528 |
+ |
.BI -ap " file [bwidth1 [bwidth2]]" |
529 |
+ |
Enable photon mapping mode. Loads a photon map generated with |
530 |
+ |
.I mkpmap(1) |
531 |
+ |
from |
532 |
+ |
.I file, |
533 |
+ |
and evaluates the indirect irradiance depending on the photon type |
534 |
+ |
(automagically detected) using density estimates with a bandwidth of |
535 |
+ |
.I bwidth1 |
536 |
+ |
photons, or the default bandwidth if none is specified (a warning will be |
537 |
+ |
issued in this case). |
538 |
+ |
.IP |
539 |
+ |
Global photon irradiance is evaluated as part of the ambient calculation (see |
540 |
+ |
.I \-ab |
541 |
+ |
above), caustic photon irradiance is evaluated at primary rays, and |
542 |
+ |
indirect inscattering in |
543 |
+ |
.I mist |
544 |
+ |
is accounted for by volume photons. Contribution photons are treated as |
545 |
+ |
global photons by |
546 |
+ |
.I rtrace. |
547 |
+ |
.IP |
548 |
+ |
Additionally specifying |
549 |
+ |
.I bwidth2 |
550 |
+ |
enables bias compensation for the density estimates with a |
551 |
+ |
minimum and maximum bandwidth of |
552 |
+ |
.I bwidth1 |
553 |
+ |
and |
554 |
+ |
.I bwidth2, |
555 |
+ |
respectively. |
556 |
+ |
.IP |
557 |
+ |
Global photon irradiance may be optionally precomputed by |
558 |
+ |
.I mkpmap(1), |
559 |
+ |
in which case the bandwidth, if specified, is ignored, as the nearest photon |
560 |
+ |
is invariably looked up. |
561 |
+ |
.IP |
562 |
+ |
Using direct photons replaces the direct calculation with density estimates |
563 |
+ |
for debugging and validation of photon emission. |
564 |
+ |
.TP |
565 |
+ |
.BI -am " frac" |
566 |
+ |
Maximum search radius for photon map lookups. Without this option, an |
567 |
+ |
initial maximum search radius is estimated for each photon map from the |
568 |
+ |
average photon distance to the distribution's centre of gravity. It is then |
569 |
+ |
adapted to the photon density in subsequent lookups. This option imposes a |
570 |
+ |
global fixed maximum search radius for |
571 |
+ |
.I all |
572 |
+ |
photon maps, thus defeating the automatic adaptation. It is useful when |
573 |
+ |
multiple warnings about short photon lookups are issued. Note that this |
574 |
+ |
option does not conflict with the bandwidth specified with the |
575 |
+ |
.I \-ap |
576 |
+ |
option; the number of photons found will not exceed the latter, but may be |
577 |
+ |
lower if the maximum search radius contains fewer photons, thus resulting in |
578 |
+ |
short lookups. Setting this radius too large, on the other hand, may |
579 |
+ |
degrade performance. |
580 |
+ |
.TP |
581 |
+ |
.BI -ac " pagesize" |
582 |
+ |
Set the photon cache page size when using out-of-core photon mapping. The |
583 |
+ |
photon cache reduces disk I/O incurred by on-demand loading (paging) of |
584 |
+ |
photons, and thus increases performance. This |
585 |
+ |
is expressed as a (float) multiple of the density estimate bandwidth |
586 |
+ |
specified with |
587 |
+ |
.I \-ap |
588 |
+ |
under the assumption that photon lookups are local to a cache page. Cache |
589 |
+ |
performance is sensitive to this parameter: larger pagesizes will reduce the |
590 |
+ |
paging frequency at the expense of higher latency when paging does occur. |
591 |
+ |
Sensible values are in the range 4 (default) to 16. |
592 |
+ |
.TP |
593 |
+ |
.BI -aC " cachesize" |
594 |
+ |
Set the total number of photons cached when using out-of-core photon |
595 |
+ |
mapping, taking into account the pagesize specified by |
596 |
+ |
.I \-ac. |
597 |
+ |
Note that this is approximate as the number of cache pages is rounded to |
598 |
+ |
the nearest prime. This allows adapting the cache to the available physical |
599 |
+ |
memory. In conjunction with the |
600 |
+ |
.I \-n |
601 |
+ |
option, this is the cache size |
602 |
+ |
.I per parallel process. |
603 |
+ |
Cache performance is less sensitive to this parameter, |
604 |
+ |
and reasonable performance can obtained with as few as 10k photons. The |
605 |
+ |
default is 1M. This option recognises multiplier suffixes (k = 1e3, M = |
606 |
+ |
1e6), both in upper and lower case. |
607 |
+ |
.TP |
608 |
|
.BI -me " rext gext bext" |
609 |
|
Set the global medium extinction coefficient to the indicated color, |
610 |
|
in units of 1/distance (distance in world coordinates). |
643 |
|
.TP |
644 |
|
.BI -lr \ N |
645 |
|
Limit reflections to a maximum of |
646 |
< |
.I N. |
646 |
> |
.I N, |
647 |
> |
if N is a positive integer. |
648 |
> |
If |
649 |
> |
.I N |
650 |
> |
is zero or negative, then Russian roulette is used for ray |
651 |
> |
termination, and the |
652 |
> |
.I -lw |
653 |
> |
setting (below) must be positive. |
654 |
> |
If N is a negative integer, then this limits the maximum |
655 |
> |
number of reflections even with Russian roulette. |
656 |
> |
In scenes with dielectrics and total internal reflection, |
657 |
> |
a setting of 0 (no limit) may cause a stack overflow. |
658 |
|
.TP |
659 |
|
.BI -lw \ frac |
660 |
|
Limit the weight of each ray to a minimum of |
661 |
|
.I frac. |
662 |
< |
During ray-tracing, a record is kept of the final contribution |
663 |
< |
a ray would have to the image. |
664 |
< |
If it is less then the specified minimum, the ray is not traced. |
662 |
> |
During ray-tracing, a record is kept of the estimated contribution |
663 |
> |
(weight) a ray would have in the image. |
664 |
> |
If this weight is less than the specified minimum and the |
665 |
> |
.I -lr |
666 |
> |
setting (above) is positive, the ray is not traced. |
667 |
> |
Otherwise, Russian roulette is used to |
668 |
> |
continue rays with a probability equal to the ray weight |
669 |
> |
divided by the given |
670 |
> |
.I frac. |
671 |
|
.TP |
672 |
|
.BR -ld |
673 |
|
Boolean switch to limit ray distance. |
728 |
|
on most multiprocessing platforms, since the |
729 |
|
.I fork(2) |
730 |
|
system call will share memory on a copy-on-write basis. |
731 |
+ |
.SH NOTES |
732 |
+ |
Photons are generally surface bound (an exception are volume photons), thus |
733 |
+ |
the ambient irradiance in photon mapping mode will be biased at positions |
734 |
+ |
which do not lie on a surface. |
735 |
|
.SH EXAMPLES |
736 |
|
To compute radiance values for the rays listed in samples.inp: |
737 |
|
.IP "" .2i |
738 |
< |
rtrace -ov scene.oct < samples.inp > radiance.out |
738 |
> |
rtrace \-ov scene.oct < samples.inp > radiance.out |
739 |
|
.PP |
740 |
|
To compute illuminance values at locations selected with the 't' |
741 |
|
command of |
742 |
|
.I ximage(1): |
743 |
|
.IP "" .2i |
744 |
< |
ximage scene.pic | rtrace -h -x 1 -i scene.oct | rcalc -e '$1=47.4*$1+120*$2+11.6*$3' |
744 |
> |
ximage scene.hdr | rtrace \-h \-x 1 \-i scene.oct | rcalc \-e '$1=47.4*$1+120*$2+11.6*$3' |
745 |
|
.PP |
746 |
|
To record the object identifier corresponding to each pixel in an image: |
747 |
|
.IP "" .2i |
748 |
< |
vwrays -fd scene.pic | rtrace -fda `vwrays -d scene.pic` -os scene.oct |
748 |
> |
vwrays \-fd scene.hdr | rtrace \-fda `vwrays \-d scene.hdr` \-os scene.oct |
749 |
|
.PP |
750 |
|
To compute an image with an unusual view mapping: |
751 |
|
.IP "" .2i |
752 |
< |
cnt 640 480 | rcalc -e 'xr:640;yr:480' -f unusual_view.cal | rtrace |
753 |
< |
-x 640 -y 480 -fac scene.oct > unusual.pic |
752 |
> |
cnt 480 640 | rcalc \-e 'xr:640;yr:480' \-f unusual_view.cal | rtrace |
753 |
> |
\-x 640 \-y 480 \-fac scene.oct > unusual.hdr |
754 |
> |
.PP |
755 |
> |
To compute ambient illuminance in photon mapping mode from a global photon |
756 |
> |
map global.pm via one ambient bounce, and from a caustic photon map |
757 |
> |
caustic.pm at sensor positions in samples.inp: |
758 |
> |
.IP "" .2i |
759 |
> |
rtrace -h -ov -ab 1 -ap global.pm 50 -ap caustic.pm 50 scene.oct < |
760 |
> |
samples.inp > illum.out |
761 |
|
.SH ENVIRONMENT |
762 |
|
RAYPATH the directories to check for auxiliary files. |
763 |
|
.SH FILES |
764 |
< |
/usr/tmp/rtXXXXXX common header information for picture sequence |
764 |
> |
/tmp/rtXXXXXX common header information for picture sequence |
765 |
|
.SH DIAGNOSTICS |
766 |
|
If the program terminates from an input related error, the exit status |
767 |
|
will be 1. |
775 |
|
.SH AUTHOR |
776 |
|
Greg Ward |
777 |
|
.SH "SEE ALSO" |
778 |
< |
getinfo(1), lookamb(1), oconv(1), pfilt(1), pinterp(1), |
779 |
< |
pvalue(1), rpict(1), rview(1), vwrays(1), ximage(1) |
778 |
> |
getinfo(1), lookamb(1), mkpmap(1), oconv(1), pfilt(1), pinterp(1), |
779 |
> |
pvalue(1), rcontrib(1), rpict(1), rtpict(1), rvu(1), vwrays(1), ximage(1) |