16 |
|
.B octree |
17 |
|
.br |
18 |
|
.B "rtrace [ options ] \-defaults" |
19 |
+ |
.br |
20 |
+ |
.B "rtrace \-features [feat1 ..]" |
21 |
|
.SH DESCRIPTION |
22 |
|
.I Rtrace |
23 |
|
traces rays from the standard input through the RADIANCE scene given by |
32 |
|
If the direction vector is (0,0,0), a bogus record |
33 |
|
is printed and the output is flushed if the |
34 |
|
.I -x |
35 |
< |
value is unset or zero. |
35 |
> |
value is one or zero. |
36 |
|
(See the notes on this option below.)\0 |
37 |
|
This may be useful for programs that run |
38 |
|
.I rtrace |
39 |
|
as a separate process. |
40 |
< |
In the second form, the default values |
40 |
> |
.PP |
41 |
> |
In the second form shown above, the default values |
42 |
|
for the options (modified by those options present) |
43 |
|
are printed with a brief explanation. |
44 |
|
.PP |
45 |
+ |
In the third form, a list of supported features is sent |
46 |
+ |
to the standard output, one per line. |
47 |
+ |
If additional arguments follow, they are checked for presence in |
48 |
+ |
this list. |
49 |
+ |
If a feature includes subfeatures, these may be checked as well by |
50 |
+ |
specifying: |
51 |
+ |
.nf |
52 |
+ |
|
53 |
+ |
rtrace -features FeatName=subfeat1,subfeat2 |
54 |
+ |
|
55 |
+ |
.fi |
56 |
+ |
If any named feature or subfeature is missing, an error is |
57 |
+ |
reported and the program returns an error status. |
58 |
+ |
If all of the named features are present, a zero status is returned. |
59 |
+ |
.PP |
60 |
|
Options may be given on the command line and/or read from the |
61 |
|
environment and/or read from a file. |
62 |
|
A command argument beginning with a dollar sign ('$') is immediately |
86 |
|
ascii, 'f' for single-precision floating point, |
87 |
|
and 'd' for double-precision floating point. |
88 |
|
In addition to these three choices, the character 'c' may be used |
89 |
< |
to denote 4-byte floating point (Radiance) color format |
90 |
< |
for the output of values only |
91 |
< |
.I (\-ov |
92 |
< |
option, below). |
89 |
> |
to denote 4-byte RGBE (Radiance) color format |
90 |
> |
for the output of individual color values only, and the |
91 |
> |
.I \-x |
92 |
> |
and |
93 |
> |
.I \-y |
94 |
> |
options should also be specified to create a valid output picture. |
95 |
|
If the output character is missing, the input format is used. |
96 |
|
.IP |
97 |
|
Note that there is no space between this option and its argument. |
131 |
|
.IP |
132 |
|
M material name |
133 |
|
.IP |
134 |
+ |
r mirrored value contribution |
135 |
+ |
.IP |
136 |
+ |
x unmirrored value contribution |
137 |
+ |
.IP |
138 |
+ |
R mirrored ray length |
139 |
+ |
.IP |
140 |
+ |
X unmirrored ray length |
141 |
+ |
.IP |
142 |
|
~ tilde (end of trace marker) |
143 |
|
.IP |
144 |
|
If the letter 't' appears in |
206 |
|
.I \-dv |
207 |
|
option (below) may be used to override this. |
208 |
|
This option is especially useful in |
209 |
< |
conjunction with ximage(1) for computing illuminance at scene points. |
209 |
> |
conjunction with ximage(1) for computing irradiance at scene points. |
210 |
|
.TP |
211 |
|
.BR \-u |
212 |
|
Boolean switch to control uncorrelated random sampling. |
227 |
|
.I res. |
228 |
|
The output will be flushed after every |
229 |
|
.I res |
230 |
< |
input rays. |
230 |
> |
input rays if |
231 |
> |
.I \-y |
232 |
> |
is set to zero. |
233 |
> |
A value of one means that every ray will be flushed, whatever |
234 |
> |
the setting of |
235 |
> |
.I \-y. |
236 |
|
A value of zero means that no output flushing will take place. |
237 |
|
.TP |
238 |
|
.BI -y \ res |
260 |
|
and for creating valid Radiance picture files using the color output |
261 |
|
format. |
262 |
|
(See the |
263 |
< |
.I \-f |
263 |
> |
.I \-f\* |
264 |
|
option, above.) |
265 |
|
.TP |
266 |
|
.BI -n \ nproc |
267 |
|
Execute in parallel on |
268 |
|
.I nproc |
269 |
|
local processes. |
270 |
< |
This option is incompatible with |
270 |
> |
This option is incompatible with the |
271 |
|
.I \-P |
272 |
|
and |
273 |
|
.I \-PP, |
274 |
< |
and is not currently supported with the |
242 |
< |
.I \-I |
243 |
< |
option. |
274 |
> |
options. |
275 |
|
Multiple processes also do not work properly with ray tree output |
276 |
|
using any of the |
277 |
|
.I \-o*t* |
281 |
|
.I \-x |
282 |
|
setting, which forces a wait at each flush. |
283 |
|
.TP |
284 |
+ |
.BI -f \ source |
285 |
+ |
Load definitions from |
286 |
+ |
.I source |
287 |
+ |
and assign at global level. |
288 |
+ |
.TP |
289 |
+ |
.BI -e \ expr |
290 |
+ |
Set additional definitions from |
291 |
+ |
.I expr. |
292 |
+ |
.TP |
293 |
|
.BI -dj \ frac |
294 |
|
Set the direct jittering to |
295 |
|
.I frac. |
344 |
|
specification will be calculated. |
345 |
|
.TP |
346 |
|
.BI -dr \ N |
347 |
< |
Set the number of relays for secondary sources to |
347 |
> |
Set the number of relays for virtual sources to |
348 |
|
.I N. |
349 |
< |
A value of 0 means that secondary sources will be ignored. |
349 |
> |
A value of 0 means that virtual sources will be ignored. |
350 |
|
A value of 1 means that sources will be made into first generation |
351 |
< |
secondary sources; a value of 2 means that first generation |
352 |
< |
secondary sources will also be made into second generation secondary |
351 |
> |
virtual sources; a value of 2 means that first generation |
352 |
> |
virtual sources will also be made into second generation virtual |
353 |
|
sources, and so on. |
354 |
|
.TP |
355 |
|
.BI -dp \ D |
356 |
< |
Set the secondary source presampling density to D. |
356 |
> |
Set the virtual source presampling density to D. |
357 |
|
This is the number of samples per steradian |
358 |
|
that will be used to determine ahead of time whether or not |
359 |
|
it is worth following shadow rays through all the reflections and/or |
360 |
< |
transmissions associated with a secondary source path. |
361 |
< |
A value of 0 means that the full secondary source path will always |
360 |
> |
transmissions associated with a virtual source path. |
361 |
> |
A value of 0 means that the full virtual source path will always |
362 |
|
be tested for shadows if it is tested at all. |
363 |
|
.TP |
364 |
|
.BR \-dv |
372 |
|
.I \-i |
373 |
|
option. |
374 |
|
.TP |
375 |
< |
.BI -sj \ frac |
376 |
< |
Set the specular sampling jitter to |
377 |
< |
.I frac. |
378 |
< |
This is the degree to which the highlights are sampled |
379 |
< |
for rough specular materials. |
380 |
< |
A value of one means that all highlights will be fully sampled |
381 |
< |
using distributed ray tracing. |
375 |
> |
.BI -ss \ samp |
376 |
> |
Set the specular sampling to |
377 |
> |
.I samp. |
378 |
> |
For values less than 1, this is the degree to which the highlights |
379 |
> |
are sampled for rough specular materials. |
380 |
> |
A value greater than one causes multiple ray samples to be sent |
381 |
> |
to reduce noise at a commmesurate cost. |
382 |
|
A value of zero means that no jittering will take place, and all |
383 |
|
reflections will appear sharp even when they should be diffuse. |
384 |
|
.TP |
398 |
|
.TP |
399 |
|
.BR -bv |
400 |
|
Boolean switch for back face visibility. |
401 |
< |
With this switch off, back faces of opaque objects will be invisible |
402 |
< |
to all rays. |
401 |
> |
With this switch off, back faces of all objects will be invisible |
402 |
> |
to view rays. |
403 |
|
This is dangerous unless the model was constructed such that |
404 |
< |
all surface normals on opaque objects face outward. |
404 |
> |
all surface normals face outward. |
405 |
|
Although turning off back face visibility does not save much |
406 |
|
computation time under most circumstances, it may be useful as a |
407 |
|
tool for scene debugging, or for seeing through one-sided walls from |
408 |
|
the outside. |
369 |
– |
This option has no effect on transparent or translucent materials. |
409 |
|
.TP |
410 |
|
.BI -av " red grn blu" |
411 |
|
Set the ambient value to a radiance of |
438 |
|
.BI -ab \ N |
439 |
|
Set the number of ambient bounces to |
440 |
|
.I N. |
441 |
< |
This is the maximum number of diffuse bounces |
442 |
< |
computed by the indirect calculation. |
443 |
< |
A value of zero implies no indirect calculation. |
441 |
> |
This is the maximum number of diffuse bounces computed by the indirect |
442 |
> |
calculation. A value of zero implies no indirect calculation. |
443 |
> |
.IP |
444 |
> |
This value defaults to 1 in photon mapping mode (see |
445 |
> |
.I -ap |
446 |
> |
below), implying that global photon irradiance is always computed via |
447 |
> |
.I one |
448 |
> |
ambient bounce; this behaviour applies to any positive number of ambient |
449 |
> |
bounces, regardless of the actual value specified. A negative value enables |
450 |
> |
a preview mode that directly visualises the irradiance from the global |
451 |
> |
photon map without any ambient bounces. |
452 |
|
.TP |
453 |
|
.BI -ar \ res |
454 |
|
Set the ambient resolution to |
471 |
|
Set the ambient accuracy to |
472 |
|
.I acc. |
473 |
|
This value will approximately equal the error |
474 |
< |
from indirect illuminance interpolation. |
474 |
> |
from indirect irradiance interpolation. |
475 |
|
A value of zero implies no interpolation. |
476 |
|
.TP |
477 |
|
.BI -ad \ N |
478 |
|
Set the number of ambient divisions to |
479 |
|
.I N. |
480 |
|
The error in the Monte Carlo calculation of indirect |
481 |
< |
illuminance will be inversely proportional to the square |
481 |
> |
irradiance will be inversely proportional to the square |
482 |
|
root of this number. |
483 |
|
A value of zero implies no indirect calculation. |
484 |
|
.TP |
491 |
|
.BI -af \ fname |
492 |
|
Set the ambient file to |
493 |
|
.I fname. |
494 |
< |
This is where indirect illuminance will be stored and retrieved. |
495 |
< |
Normally, indirect illuminance values are kept in memory and |
494 |
> |
This is where indirect irradiance will be stored and retrieved. |
495 |
> |
Normally, indirect irradiance values are kept in memory and |
496 |
|
lost when the program finishes or dies. |
497 |
< |
By using a file, different invocations can share illuminance |
497 |
> |
By using a file, different invocations can share irradiance |
498 |
|
values, saving time in the computation. |
499 |
|
The ambient file is in a machine-independent binary format |
500 |
|
which can be examined with |
554 |
|
except read modifiers to be included from |
555 |
|
.I file. |
556 |
|
.TP |
557 |
+ |
.BI -ap " file [bwidth1 [bwidth2]]" |
558 |
+ |
Enable photon mapping mode. Loads a photon map generated with |
559 |
+ |
.I mkpmap(1) |
560 |
+ |
from |
561 |
+ |
.I file, |
562 |
+ |
and evaluates the indirect irradiance depending on the photon type |
563 |
+ |
(automagically detected) using density estimates with a bandwidth of |
564 |
+ |
.I bwidth1 |
565 |
+ |
photons, or the default bandwidth if none is specified (a warning will be |
566 |
+ |
issued in this case). |
567 |
+ |
.IP |
568 |
+ |
Global photon irradiance is evaluated as part of the ambient calculation (see |
569 |
+ |
.I \-ab |
570 |
+ |
above), caustic photon irradiance is evaluated at primary rays, and |
571 |
+ |
indirect inscattering in |
572 |
+ |
.I mist |
573 |
+ |
is accounted for by volume photons. Contribution photons are treated as |
574 |
+ |
global photons by |
575 |
+ |
.I rtrace. |
576 |
+ |
.IP |
577 |
+ |
Additionally specifying |
578 |
+ |
.I bwidth2 |
579 |
+ |
enables bias compensation for the density estimates with a |
580 |
+ |
minimum and maximum bandwidth of |
581 |
+ |
.I bwidth1 |
582 |
+ |
and |
583 |
+ |
.I bwidth2, |
584 |
+ |
respectively. |
585 |
+ |
.IP |
586 |
+ |
Global photon irradiance may be optionally precomputed by |
587 |
+ |
.I mkpmap(1), |
588 |
+ |
in which case the bandwidth, if specified, is ignored, as the nearest photon |
589 |
+ |
is invariably looked up. |
590 |
+ |
.IP |
591 |
+ |
Using direct photons replaces the direct calculation with density estimates |
592 |
+ |
for debugging and validation of photon emission. |
593 |
+ |
.TP |
594 |
+ |
.BI -am " frac" |
595 |
+ |
Maximum search radius for photon map lookups. Without this option, an |
596 |
+ |
initial maximum search radius is estimated for each photon map from the |
597 |
+ |
average photon distance to the distribution's centre of gravity. It is then |
598 |
+ |
adapted to the photon density in subsequent lookups. This option imposes a |
599 |
+ |
global fixed maximum search radius for |
600 |
+ |
.I all |
601 |
+ |
photon maps, thus defeating the automatic adaptation. It is useful when |
602 |
+ |
multiple warnings about short photon lookups are issued. Note that this |
603 |
+ |
option does not conflict with the bandwidth specified with the |
604 |
+ |
.I \-ap |
605 |
+ |
option; the number of photons found will not exceed the latter, but may be |
606 |
+ |
lower if the maximum search radius contains fewer photons, thus resulting in |
607 |
+ |
short lookups. Setting this radius too large, on the other hand, may |
608 |
+ |
degrade performance. |
609 |
+ |
.TP |
610 |
+ |
.BI -ac " pagesize" |
611 |
+ |
Set the photon cache page size when using out-of-core photon mapping. The |
612 |
+ |
photon cache reduces disk I/O incurred by on-demand loading (paging) of |
613 |
+ |
photons, and thus increases performance. This |
614 |
+ |
is expressed as a (float) multiple of the density estimate bandwidth |
615 |
+ |
specified with |
616 |
+ |
.I \-ap |
617 |
+ |
under the assumption that photon lookups are local to a cache page. Cache |
618 |
+ |
performance is sensitive to this parameter: larger pagesizes will reduce the |
619 |
+ |
paging frequency at the expense of higher latency when paging does occur. |
620 |
+ |
Sensible values are in the range 4 (default) to 16. |
621 |
+ |
.TP |
622 |
+ |
.BI -aC " cachesize" |
623 |
+ |
Set the total number of photons cached when using out-of-core photon |
624 |
+ |
mapping, taking into account the pagesize specified by |
625 |
+ |
.I \-ac. |
626 |
+ |
Note that this is approximate as the number of cache pages is rounded to |
627 |
+ |
the nearest prime. This allows adapting the cache to the available physical |
628 |
+ |
memory. In conjunction with the |
629 |
+ |
.I \-n |
630 |
+ |
option, this is the cache size |
631 |
+ |
.I per parallel process. |
632 |
+ |
Cache performance is less sensitive to this parameter, |
633 |
+ |
and reasonable performance can obtained with as few as 10k photons. The |
634 |
+ |
default is 1M. This option recognises multiplier suffixes (k = 1e3, M = |
635 |
+ |
1e6), both in upper and lower case. |
636 |
+ |
.TP |
637 |
|
.BI -me " rext gext bext" |
638 |
|
Set the global medium extinction coefficient to the indicated color, |
639 |
|
in units of 1/distance (distance in world coordinates). |
672 |
|
.TP |
673 |
|
.BI -lr \ N |
674 |
|
Limit reflections to a maximum of |
675 |
< |
.I N. |
675 |
> |
.I N, |
676 |
> |
if N is a positive integer. |
677 |
|
If |
678 |
|
.I N |
679 |
|
is zero or negative, then Russian roulette is used for ray |
680 |
|
termination, and the |
681 |
|
.I -lw |
682 |
|
setting (below) must be positive. |
683 |
< |
If N is a negative integer, then this sets the upper limit |
684 |
< |
of reflections past which Russian roulette will not be used. |
683 |
> |
If N is a negative integer, then this limits the maximum |
684 |
> |
number of reflections even with Russian roulette. |
685 |
|
In scenes with dielectrics and total internal reflection, |
686 |
|
a setting of 0 (no limit) may cause a stack overflow. |
687 |
|
.TP |
698 |
|
divided by the given |
699 |
|
.I frac. |
700 |
|
.TP |
701 |
< |
.BR -ld |
701 |
> |
.BR \-ld |
702 |
|
Boolean switch to limit ray distance. |
703 |
|
If this option is set, then rays will only be traced as far as the |
704 |
|
magnitude of each direction vector. |
705 |
|
Otherwise, vector magnitude is ignored and rays are traced to infinity. |
706 |
|
.TP |
707 |
+ |
.BI -cs \ Ns |
708 |
+ |
Use |
709 |
+ |
.I Ns |
710 |
+ |
bands for spectral sampling rather than the default RGB calculation space. |
711 |
+ |
The maximum setting is controlled by the compiler macro MAXCSAMP, and |
712 |
+ |
defaults to 24. |
713 |
+ |
Larger values for Ns will be reduced to MAXCSAMP. |
714 |
+ |
.TP |
715 |
+ |
.BI -cw " nmA nmB" |
716 |
+ |
Set extrema to the given wavelengths for spectral sampling. |
717 |
+ |
The default is 380 and 780 nanometers. |
718 |
+ |
The order specified does not matter. |
719 |
+ |
.TP |
720 |
+ |
.BR \-co |
721 |
+ |
Boolean switch turns on spectral data output if selected. |
722 |
+ |
The default is to reduce spectral results to RGB, but see the related |
723 |
+ |
.I \-p* |
724 |
+ |
options, below. |
725 |
+ |
.TP |
726 |
+ |
.BI -pc " xr yr xg yg xb yb xw yw" |
727 |
+ |
Use the specified chromaticity pairs for output primaries and white |
728 |
+ |
point rather than the standard RGB color space. |
729 |
+ |
.TP |
730 |
+ |
.BR \-pRGB |
731 |
+ |
Output standard RGB values (the default). |
732 |
+ |
.TP |
733 |
+ |
.BR \-pXYZ |
734 |
+ |
Output standard CIE XYZ tristimulus values rather than RGB. |
735 |
+ |
.TP |
736 |
+ |
.BR \-pY |
737 |
+ |
Produce a single output channel corresponding to photopic luminance. |
738 |
+ |
.TP |
739 |
+ |
.BR \-pS |
740 |
+ |
Produce a single output channel corresponding to scotopic luminance. |
741 |
+ |
.TP |
742 |
+ |
.BR \-pM |
743 |
+ |
Produce a single output channel corresponding to melanopic luminance. |
744 |
+ |
.TP |
745 |
|
.BI -e \ efile |
746 |
|
Send error messages and progress reports to |
747 |
|
.I efile |
795 |
|
on most multiprocessing platforms, since the |
796 |
|
.I fork(2) |
797 |
|
system call will share memory on a copy-on-write basis. |
798 |
+ |
.SH NOTES |
799 |
+ |
Photons are generally surface bound (an exception are volume photons), thus |
800 |
+ |
the ambient irradiance in photon mapping mode will be biased at positions |
801 |
+ |
which do not lie on a surface. |
802 |
|
.SH EXAMPLES |
803 |
|
To compute radiance values for the rays listed in samples.inp: |
804 |
|
.IP "" .2i |
805 |
|
rtrace \-ov scene.oct < samples.inp > radiance.out |
806 |
|
.PP |
807 |
< |
To compute illuminance values at locations selected with the 't' |
807 |
> |
To compute irradiance values at locations selected with the 't' |
808 |
|
command of |
809 |
|
.I ximage(1): |
810 |
|
.IP "" .2i |
818 |
|
.IP "" .2i |
819 |
|
cnt 480 640 | rcalc \-e 'xr:640;yr:480' \-f unusual_view.cal | rtrace |
820 |
|
\-x 640 \-y 480 \-fac scene.oct > unusual.hdr |
821 |
+ |
.PP |
822 |
+ |
To compute ambient irradiance in photon mapping mode from a global photon |
823 |
+ |
map global.pm via one ambient bounce, and from a caustic photon map |
824 |
+ |
caustic.pm at sensor positions in samples.inp: |
825 |
+ |
.IP "" .2i |
826 |
+ |
rtrace -h -ov -ab 1 -ap global.pm 50 -ap caustic.pm 50 scene.oct < |
827 |
+ |
samples.inp > illum.out |
828 |
|
.SH ENVIRONMENT |
829 |
|
RAYPATH the directories to check for auxiliary files. |
830 |
|
.SH FILES |
842 |
|
.SH AUTHOR |
843 |
|
Greg Ward |
844 |
|
.SH "SEE ALSO" |
845 |
< |
getinfo(1), lookamb(1), oconv(1), pfilt(1), pinterp(1), |
846 |
< |
pvalue(1), rpict(1), rtcontrib(1), rvu(1), vwrays(1), ximage(1) |
845 |
> |
dctimestep(1), getinfo(1), lookamb(1), |
846 |
> |
mkpmap(1), oconv(1), pfilt(1), pinterp(1), |
847 |
> |
pvalue(1), rcalc(1), rcomb(1), rcontrib(1), rcrop(1), |
848 |
> |
rmtxop(1), rsplit(1), |
849 |
> |
rpict(1), rtpict(1), rvu(1), vwrays(1), ximage(1) |