ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtrace.1
Revision: 1.43
Committed: Fri Jun 27 15:19:58 2025 UTC (2 days, 14 hours ago) by greg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.42: +8 -4 lines
Log Message:
docs(rpict,rtrace): Clarified -f and -e options

File Contents

# Content
1 .\" RCSid "$Id: rtrace.1,v 1.42 2025/04/23 15:09:03 greg Exp $"
2 .TH RTRACE 1 10/17/97 RADIANCE
3 .SH NAME
4 rtrace - trace rays in RADIANCE scene
5 .SH SYNOPSIS
6 .B rtrace
7 [
8 .B options
9 ]
10 [
11 .B $EVAR
12 ]
13 [
14 .B @file
15 ]
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
24 .I octree
25 and sends the results to the standard output.
26 (The octree may be given as the output of a command enclosed in quotes
27 and preceded by a `!'.)\0
28 Input for each ray is:
29
30 xorg yorg zorg xdir ydir zdir
31
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 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 .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
63 replaced by the contents of the given environment variable.
64 A command argument beginning with an at sign ('@') is immediately
65 replaced by the contents of the given file.
66 Most options are followed by one or more arguments, which must be
67 separated from the option and each other by white space.
68 The exceptions to this rule are the boolean options.
69 Normally, the appearance of a boolean option causes a feature to
70 be "toggled", that is switched from off to on or on to off
71 depending on its previous state.
72 Boolean options may also be set
73 explicitly by following them immediately with a '+' or '-', meaning
74 on or off, respectively.
75 Synonyms for '+' are any of the characters "yYtT1", and synonyms
76 for '-' are any of the characters "nNfF0".
77 All other characters will generate an error.
78 .TP 10n
79 .BI -f io
80 Format input according to the character
81 .I i
82 and output according to the character
83 .I o.
84 .I Rtrace
85 understands the following input and output formats: 'a' for
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 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.
98 .TP
99 .BI -o spec
100 Produce output fields according to
101 .I spec.
102 Characters are interpreted as follows:
103 .IP
104 o origin (input)
105 .IP
106 d direction (normalized)
107 .IP
108 v value (radiance)
109 .IP
110 V contribution (radiance)
111 .IP
112 w weight
113 .IP
114 W color coefficient
115 .IP
116 l effective length of ray
117 .IP
118 L first intersection distance
119 .IP
120 c local (u,v) coordinates
121 .IP
122 p point of intersection
123 .IP
124 n normal at intersection (perturbed)
125 .IP
126 N normal at intersection (unperturbed)
127 .IP
128 s surface name
129 .IP
130 m modifier name
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
145 .I spec,
146 then the fields following will be printed for every ray traced,
147 not just the final result.
148 If the capital letter 'T' is given instead of 't', then all rays will
149 be reported, including shadow testing rays to light sources.
150 Spawned rays are indented one tab for each level.
151 The tilde marker ('~') is a handy way of differentiating the final ray
152 value from daughter values in a traced ray tree, and usually appears
153 right before the 't' or 'T' output flags.
154 E.g.,
155 .I \-ov~TmW
156 will emit a tilde followed by a tab at the end of each trace,
157 which can be easily distinguished even in binary output.
158 .IP
159 Note that there is no space between this option and its argument.
160 .TP
161 .BI -te \ mod
162 Append
163 .I mod
164 to the trace exclude list,
165 so that it will not be reported by the trace option
166 .I (\-o*t*).
167 Any ray striking an object having
168 .I mod
169 as its modifier will not be reported to the standard output with
170 the rest of the rays being traced.
171 This option has no effect unless either the 't' or 'T'
172 option has been given as part of the output specifier.
173 Any number of excluded modifiers may be given, but each
174 must appear in a separate option.
175 .TP
176 .BI -ti \ mod
177 Add
178 .I mod
179 to the trace include list,
180 so that it will be reported by the trace option.
181 The program can use either an include list or an exclude
182 list, but not both.
183 .TP
184 .BI -tE \ file
185 Same as
186 .I \-te,
187 except read modifiers to be excluded from
188 .I file.
189 The RAYPATH environment variable determines which directories are
190 searched for this file.
191 The modifier names are separated by white space in the file.
192 .TP
193 .BI -tI \ file
194 Same as
195 .I \-ti,
196 except read modifiers to be included from
197 .I file.
198 .TP
199 .BR \-i
200 Boolean switch to compute irradiance rather than radiance values.
201 This only affects the final result, substituting a Lambertian
202 surface and multiplying the radiance by pi.
203 Glass and other transparent surfaces are ignored during this stage.
204 Light sources still appear with their original radiance values,
205 though the
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 irradiance at scene points.
210 .TP
211 .BR \-u
212 Boolean switch to control uncorrelated random sampling.
213 When "off", a low-discrepancy sequence is used, which reduces
214 variance but can result in a brushed appearance in specular highlights.
215 When "on", pure Monte Carlo sampling is used in all calculations.
216 .TP
217 .BR \-I
218 Boolean switch to compute irradiance rather than radiance,
219 with the input origin and direction interpreted instead
220 as measurement point and orientation.
221 .TP
222 .BR \-h
223 Boolean switch for information header on output.
224 .TP
225 .BI -x \ res
226 Set the x resolution to
227 .I res.
228 The output will be flushed after every
229 .I res
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
239 Set the y resolution to
240 .I res.
241 The program will exit after
242 .I res
243 scanlines have been processed, where a scanline is the number of rays
244 given by the
245 .I \-x
246 option, or 1 if
247 .I \-x
248 is zero.
249 A value of zero means the program will not halt until the end
250 of file is reached.
251 .IP
252 If both
253 .I \-x
254 and
255 .I \-y
256 options are given, a resolution string is printed at the beginning
257 of the output.
258 This is mostly useful for recovering image dimensions with
259 .I pvalue(1),
260 and for creating valid Radiance picture files using the color output
261 format.
262 (See the
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 the
271 .I \-P
272 and
273 .I \-PP,
274 options.
275 Multiple processes also do not work properly with ray tree output
276 using any of the
277 .I \-o*t*
278 options.
279 There is no benefit from specifying more processes than there are
280 cores available on the system or the
281 .I \-x
282 setting, which forces a wait at each flush.
283 .TP
284 .BI -f \ source
285 Load function and variable definitions from the file
286 .I source
287 and assign at the global level.
288 This may be convenient for altering material appearance on a per-run basis.
289 The usual set of library directories is searched based on the
290 .I RAYPATH
291 environment variable.
292 These file definitions will override same-named variables
293 and functions in "rayinit.cal".
294 .TP
295 .BI -e \ expr
296 Set initial definitions from
297 .I expr,
298 which may include constant assignments with the ':' character.
299 .TP
300 .BI -dj \ frac
301 Set the direct jittering to
302 .I frac.
303 A value of zero samples each source at specific sample points
304 (see the
305 .I \-ds
306 option below), giving a smoother but somewhat less accurate
307 rendering.
308 A positive value causes rays to be distributed over each
309 source sample according to its size, resulting in more accurate
310 penumbras.
311 This option should never be greater than 1, and may even
312 cause problems (such as speckle) when the value is smaller.
313 A warning about aiming failure will issued if
314 .I frac
315 is too large.
316 .TP
317 .BI -ds \ frac
318 Set the direct sampling ratio to
319 .I frac.
320 A light source will be subdivided until
321 the width of each sample area divided by the distance
322 to the illuminated point is below this ratio.
323 This assures accuracy in regions close to large area sources
324 at a slight computational expense.
325 A value of zero turns source subdivision off, sending at most one
326 shadow ray to each light source.
327 .TP
328 .BI -dt \ frac
329 Set the direct threshold to
330 .I frac.
331 Shadow testing will stop when the potential contribution of at least
332 the next and at most all remaining light sources is less than
333 this fraction of the accumulated value.
334 (See the
335 .I \-dc
336 option below.)
337 The remaining light source contributions are approximated
338 statistically.
339 A value of zero means that all light sources will be tested for shadow.
340 .TP
341 .BI \-dc \ frac
342 Set the direct certainty to
343 .I frac.
344 A value of one guarantees that the absolute accuracy of the direct calculation
345 will be equal to or better than that given in the
346 .I \-dt
347 specification.
348 A value of zero only insures that all shadow lines resulting in a contrast
349 change greater than the
350 .I \-dt
351 specification will be calculated.
352 .TP
353 .BI -dr \ N
354 Set the number of relays for virtual sources to
355 .I N.
356 A value of 0 means that virtual sources will be ignored.
357 A value of 1 means that sources will be made into first generation
358 virtual sources; a value of 2 means that first generation
359 virtual sources will also be made into second generation virtual
360 sources, and so on.
361 .TP
362 .BI -dp \ D
363 Set the virtual source presampling density to D.
364 This is the number of samples per steradian
365 that will be used to determine ahead of time whether or not
366 it is worth following shadow rays through all the reflections and/or
367 transmissions associated with a virtual source path.
368 A value of 0 means that the full virtual source path will always
369 be tested for shadows if it is tested at all.
370 .TP
371 .BR \-dv
372 Boolean switch for light source visibility.
373 With this switch off, sources will be black when viewed directly
374 although they will still participate in the direct calculation.
375 This option is mostly for the program
376 .I mkillum(1)
377 to avoid inappropriate counting of light sources, but it
378 may also be desirable in conjunction with the
379 .I \-i
380 option.
381 .TP
382 .BI -ss \ samp
383 Set the specular sampling to
384 .I samp.
385 For values less than 1, this is the degree to which the highlights
386 are sampled for rough specular materials.
387 A value greater than one causes multiple ray samples to be sent
388 to reduce noise at a commmesurate cost.
389 A value of zero means that no jittering will take place, and all
390 reflections will appear sharp even when they should be diffuse.
391 .TP
392 .BI -st \ frac
393 Set the specular sampling threshold to
394 .I frac.
395 This is the minimum fraction of reflection or transmission, under which
396 no specular sampling is performed.
397 A value of zero means that highlights will always be sampled by
398 tracing reflected or transmitted rays.
399 A value of one means that specular sampling is never used.
400 Highlights from light sources will always be correct, but
401 reflections from other surfaces will be approximated using an
402 ambient value.
403 A sampling threshold between zero and one offers a compromise between image
404 accuracy and rendering time.
405 .TP
406 .BR -bv
407 Boolean switch for back face visibility.
408 With this switch off, back faces of all objects will be invisible
409 to view rays.
410 This is dangerous unless the model was constructed such that
411 all surface normals face outward.
412 Although turning off back face visibility does not save much
413 computation time under most circumstances, it may be useful as a
414 tool for scene debugging, or for seeing through one-sided walls from
415 the outside.
416 .TP
417 .BI -av " red grn blu"
418 Set the ambient value to a radiance of
419 .I "red grn blu".
420 This is the final value used in place of an
421 indirect light calculation.
422 If the number of ambient bounces is one or greater and the ambient
423 value weight is non-zero (see
424 .I -aw
425 and
426 .I -ab
427 below), this value may be modified by the computed indirect values
428 to improve overall accuracy.
429 .TP
430 .BI -aw \ N
431 Set the relative weight of the ambient value given with the
432 .I -av
433 option to
434 .I N.
435 As new indirect irradiances are computed, they will modify the
436 default ambient value in a moving average, with the specified weight
437 assigned to the initial value given on the command and all other
438 weights set to 1.
439 If a value of 0 is given with this option, then the initial ambient
440 value is never modified.
441 This is the safest value for scenes with large differences in
442 indirect contributions, such as when both indoor and outdoor
443 (daylight) areas are visible.
444 .TP
445 .BI -ab \ N
446 Set the number of ambient bounces to
447 .I N.
448 This is the maximum number of diffuse bounces computed by the indirect
449 calculation. A value of zero implies no indirect calculation.
450 .IP
451 This value defaults to 1 in photon mapping mode (see
452 .I -ap
453 below), implying that global photon irradiance is always computed via
454 .I one
455 ambient bounce; this behaviour applies to any positive number of ambient
456 bounces, regardless of the actual value specified. A negative value enables
457 a preview mode that directly visualises the irradiance from the global
458 photon map without any ambient bounces.
459 .TP
460 .BI -ar \ res
461 Set the ambient resolution to
462 .I res.
463 This number will determine the maximum density of ambient values
464 used in interpolation.
465 Error will start to increase on surfaces spaced closer than
466 the scene size divided by the ambient resolution.
467 The maximum ambient value density is the scene size times the
468 ambient accuracy (see the
469 .I \-aa
470 option below) divided by the ambient resolution.
471 The scene size can be determined using
472 .I getinfo(1)
473 with the
474 .I \-d
475 option on the input octree.
476 .TP
477 .BI -aa \ acc
478 Set the ambient accuracy to
479 .I acc.
480 This value will approximately equal the error
481 from indirect irradiance interpolation.
482 A value of zero implies no interpolation.
483 .TP
484 .BI -ad \ N
485 Set the number of ambient divisions to
486 .I N.
487 The error in the Monte Carlo calculation of indirect
488 irradiance will be inversely proportional to the square
489 root of this number.
490 A value of zero implies no indirect calculation.
491 .TP
492 .BI -as \ N
493 Set the number of ambient super-samples to
494 .I N.
495 Super-samples are applied only to the ambient divisions which
496 show a significant change.
497 .TP
498 .BI -af \ fname
499 Set the ambient file to
500 .I fname.
501 This is where indirect irradiance will be stored and retrieved.
502 Normally, indirect irradiance values are kept in memory and
503 lost when the program finishes or dies.
504 By using a file, different invocations can share irradiance
505 values, saving time in the computation.
506 The ambient file is in a machine-independent binary format
507 which can be examined with
508 .I lookamb(1).
509 .IP
510 The ambient file may also be used as a means of communication and
511 data sharing between simultaneously executing processes.
512 The same file may be used by multiple processes, possibly running on
513 different machines and accessing the file via the network (ie.
514 .I nfs(4)).
515 The network lock manager
516 .I lockd(8)
517 is used to insure that this information is used consistently.
518 .IP
519 If any calculation parameters are changed or the scene
520 is modified, the old ambient file should be removed so that
521 the calculation can start over from scratch.
522 For convenience, the original ambient parameters are listed in the
523 header of the ambient file.
524 .I Getinfo(1)
525 may be used to print out this information.
526 .TP
527 .BI -ae \ mod
528 Append
529 .I mod
530 to the ambient exclude list,
531 so that it will not be considered during the indirect calculation.
532 This is a hack for speeding the indirect computation by
533 ignoring certain objects.
534 Any object having
535 .I mod
536 as its modifier will get the default ambient
537 level rather than a calculated value.
538 Any number of excluded modifiers may be given, but each
539 must appear in a separate option.
540 .TP
541 .BI -ai \ mod
542 Add
543 .I mod
544 to the ambient include list,
545 so that it will be considered during the indirect calculation.
546 The program can use either an include list or an exclude
547 list, but not both.
548 .TP
549 .BI -aE \ file
550 Same as
551 .I \-ae,
552 except read modifiers to be excluded from
553 .I file.
554 The RAYPATH environment variable determines which directories are
555 searched for this file.
556 The modifier names are separated by white space in the file.
557 .TP
558 .BI -aI \ file
559 Same as
560 .I \-ai,
561 except read modifiers to be included from
562 .I file.
563 .TP
564 .BI -ap " file [bwidth1 [bwidth2]]"
565 Enable photon mapping mode. Loads a photon map generated with
566 .I mkpmap(1)
567 from
568 .I file,
569 and evaluates the indirect irradiance depending on the photon type
570 (automagically detected) using density estimates with a bandwidth of
571 .I bwidth1
572 photons, or the default bandwidth if none is specified (a warning will be
573 issued in this case).
574 .IP
575 Global photon irradiance is evaluated as part of the ambient calculation (see
576 .I \-ab
577 above), caustic photon irradiance is evaluated at primary rays, and
578 indirect inscattering in
579 .I mist
580 is accounted for by volume photons. Contribution photons are treated as
581 global photons by
582 .I rtrace.
583 .IP
584 Additionally specifying
585 .I bwidth2
586 enables bias compensation for the density estimates with a
587 minimum and maximum bandwidth of
588 .I bwidth1
589 and
590 .I bwidth2,
591 respectively.
592 .IP
593 Global photon irradiance may be optionally precomputed by
594 .I mkpmap(1),
595 in which case the bandwidth, if specified, is ignored, as the nearest photon
596 is invariably looked up.
597 .IP
598 Using direct photons replaces the direct calculation with density estimates
599 for debugging and validation of photon emission.
600 .TP
601 .BI -am " frac"
602 Maximum search radius for photon map lookups. Without this option, an
603 initial maximum search radius is estimated for each photon map from the
604 average photon distance to the distribution's centre of gravity. It is then
605 adapted to the photon density in subsequent lookups. This option imposes a
606 global fixed maximum search radius for
607 .I all
608 photon maps, thus defeating the automatic adaptation. It is useful when
609 multiple warnings about short photon lookups are issued. Note that this
610 option does not conflict with the bandwidth specified with the
611 .I \-ap
612 option; the number of photons found will not exceed the latter, but may be
613 lower if the maximum search radius contains fewer photons, thus resulting in
614 short lookups. Setting this radius too large, on the other hand, may
615 degrade performance.
616 .TP
617 .BI -ac " pagesize"
618 Set the photon cache page size when using out-of-core photon mapping. The
619 photon cache reduces disk I/O incurred by on-demand loading (paging) of
620 photons, and thus increases performance. This
621 is expressed as a (float) multiple of the density estimate bandwidth
622 specified with
623 .I \-ap
624 under the assumption that photon lookups are local to a cache page. Cache
625 performance is sensitive to this parameter: larger pagesizes will reduce the
626 paging frequency at the expense of higher latency when paging does occur.
627 Sensible values are in the range 4 (default) to 16.
628 .TP
629 .BI -aC " cachesize"
630 Set the total number of photons cached when using out-of-core photon
631 mapping, taking into account the pagesize specified by
632 .I \-ac.
633 Note that this is approximate as the number of cache pages is rounded to
634 the nearest prime. This allows adapting the cache to the available physical
635 memory. In conjunction with the
636 .I \-n
637 option, this is the cache size
638 .I per parallel process.
639 Cache performance is less sensitive to this parameter,
640 and reasonable performance can obtained with as few as 10k photons. The
641 default is 1M. This option recognises multiplier suffixes (k = 1e3, M =
642 1e6), both in upper and lower case.
643 .TP
644 .BI -me " rext gext bext"
645 Set the global medium extinction coefficient to the indicated color,
646 in units of 1/distance (distance in world coordinates).
647 Light will be scattered or absorbed over distance according to
648 this value.
649 The ratio of scattering to total scattering plus absorption is set
650 by the albedo parameter, described below.
651 .TP
652 .BI -ma " ralb galb balb"
653 Set the global medium albedo to the given value between 0\00\00
654 and 1\01\01.
655 A zero value means that all light not transmitted by the medium
656 is absorbed.
657 A unitary value means that all light not transmitted by the medium
658 is scattered in some new direction.
659 The isotropy of scattering is determined by the Heyney-Greenstein
660 parameter, described below.
661 .TP
662 .BI \-mg \ gecc
663 Set the medium Heyney-Greenstein eccentricity parameter to
664 .I gecc.
665 This parameter determines how strongly scattering favors the forward
666 direction.
667 A value of 0 indicates perfectly isotropic scattering.
668 As this parameter approaches 1, scattering tends to prefer the
669 forward direction.
670 .TP
671 .BI \-ms \ sampdist
672 Set the medium sampling distance to
673 .I sampdist,
674 in world coordinate units.
675 During source scattering, this will be the average distance between
676 adjacent samples.
677 A value of 0 means that only one sample will be taken per light
678 source within a given scattering volume.
679 .TP
680 .BI -lr \ N
681 Limit reflections to a maximum of
682 .I N,
683 if N is a positive integer.
684 If
685 .I N
686 is zero or negative, then Russian roulette is used for ray
687 termination, and the
688 .I -lw
689 setting (below) must be positive.
690 If N is a negative integer, then this limits the maximum
691 number of reflections even with Russian roulette.
692 In scenes with dielectrics and total internal reflection,
693 a setting of 0 (no limit) may cause a stack overflow.
694 .TP
695 .BI -lw \ frac
696 Limit the weight of each ray to a minimum of
697 .I frac.
698 During ray-tracing, a record is kept of the estimated contribution
699 (weight) a ray would have in the image.
700 If this weight is less than the specified minimum and the
701 .I -lr
702 setting (above) is positive, the ray is not traced.
703 Otherwise, Russian roulette is used to
704 continue rays with a probability equal to the ray weight
705 divided by the given
706 .I frac.
707 .TP
708 .BR \-ld
709 Boolean switch to limit ray distance.
710 If this option is set, then rays will only be traced as far as the
711 magnitude of each direction vector.
712 Otherwise, vector magnitude is ignored and rays are traced to infinity.
713 .TP
714 .BI -cs \ Ns
715 Use
716 .I Ns
717 bands for spectral sampling rather than the default RGB calculation space.
718 The maximum setting is controlled by the compiler macro MAXCSAMP, and
719 defaults to 24.
720 Larger values for Ns will be reduced to MAXCSAMP.
721 .TP
722 .BI -cw " nmA nmB"
723 Set extrema to the given wavelengths for spectral sampling.
724 The default is 380 and 780 nanometers.
725 The order specified does not matter.
726 .TP
727 .BR \-co
728 Boolean switch turns on spectral data output if selected.
729 The default is to reduce spectral results to RGB, but see the related
730 .I \-p*
731 options, below.
732 .TP
733 .BI -pc " xr yr xg yg xb yb xw yw"
734 Use the specified chromaticity pairs for output primaries and white
735 point rather than the standard RGB color space.
736 .TP
737 .BR \-pRGB
738 Output standard RGB values (the default).
739 .TP
740 .BR \-pXYZ
741 Output standard CIE XYZ tristimulus values rather than RGB.
742 .TP
743 .BR \-pY
744 Produce a single output channel corresponding to photopic luminance.
745 .TP
746 .BR \-pS
747 Produce a single output channel corresponding to scotopic luminance.
748 .TP
749 .BR \-pM
750 Produce a single output channel corresponding to melanopic luminance.
751 .TP
752 .BI -e \ efile
753 Send error messages and progress reports to
754 .I efile
755 instead of the standard error.
756 .TP
757 .BR \-w
758 Boolean switch to suppress warning messages.
759 .TP
760 .BI \-P \ pfile
761 Execute in a persistent mode, using
762 .I pfile
763 as the control file.
764 Persistent execution means that after reaching end-of-file on
765 its input,
766 .I rtrace
767 will fork a child process that will wait for another
768 .I rtrace
769 command with the same
770 .I \-P
771 option to attach to it.
772 (Note that since the rest of the command line options will be those
773 of the original invocation, it is not necessary to give any arguments
774 besides
775 .I \-P
776 for subsequent calls.)
777 Killing the process is achieved with the
778 .I kill(1)
779 command.
780 (The process ID in the first line of
781 .I pfile
782 may be used to identify the waiting
783 .I rtrace
784 process.)
785 This option may be used with the
786 .I \-fr
787 option of
788 .I pinterp(1)
789 to avoid the cost of starting up
790 .I rtrace
791 many times.
792 .TP
793 .BI \-PP \ pfile
794 Execute in continuous-forking persistent mode, using
795 .I pfile
796 as the control file.
797 The difference between this option and the
798 .I \-P
799 option described above is the creation of multiple duplicate
800 processes to handle any number of attaches.
801 This provides a simple and reliable mechanism of memory sharing
802 on most multiprocessing platforms, since the
803 .I fork(2)
804 system call will share memory on a copy-on-write basis.
805 .SH NOTES
806 Photons are generally surface bound (an exception are volume photons), thus
807 the ambient irradiance in photon mapping mode will be biased at positions
808 which do not lie on a surface.
809 .SH EXAMPLES
810 To compute radiance values for the rays listed in samples.inp:
811 .IP "" .2i
812 rtrace \-ov scene.oct < samples.inp > radiance.out
813 .PP
814 To compute irradiance values at locations selected with the 't'
815 command of
816 .I ximage(1):
817 .IP "" .2i
818 ximage scene.hdr | rtrace \-h \-x 1 \-i scene.oct | rcalc \-e '$1=47.4*$1+120*$2+11.6*$3'
819 .PP
820 To record the object identifier corresponding to each pixel in an image:
821 .IP "" .2i
822 vwrays \-fd scene.hdr | rtrace \-fda `vwrays \-d scene.hdr` \-os scene.oct
823 .PP
824 To compute an image with an unusual view mapping:
825 .IP "" .2i
826 cnt 480 640 | rcalc \-e 'xr:640;yr:480' \-f unusual_view.cal | rtrace
827 \-x 640 \-y 480 \-fac scene.oct > unusual.hdr
828 .PP
829 To compute ambient irradiance in photon mapping mode from a global photon
830 map global.pm via one ambient bounce, and from a caustic photon map
831 caustic.pm at sensor positions in samples.inp:
832 .IP "" .2i
833 rtrace -h -ov -ab 1 -ap global.pm 50 -ap caustic.pm 50 scene.oct <
834 samples.inp > illum.out
835 .SH ENVIRONMENT
836 RAYPATH the directories to check for auxiliary files.
837 .SH FILES
838 /tmp/rtXXXXXX common header information for picture sequence
839 .SH DIAGNOSTICS
840 If the program terminates from an input related error, the exit status
841 will be 1.
842 A system related error results in an exit status of 2.
843 If the program receives a signal that is caught, it will exit with a status
844 of 3.
845 In each case, an error message will be printed to the standard error, or
846 to the file designated by the
847 .I \-e
848 option.
849 .SH AUTHOR
850 Greg Ward
851 .SH "SEE ALSO"
852 dctimestep(1), getinfo(1), lookamb(1),
853 mkpmap(1), oconv(1), pfilt(1), pinterp(1),
854 pvalue(1), rcalc(1), rcomb(1), rcontrib(1), rcrop(1),
855 rmtxop(1), rsplit(1),
856 rpict(1), rtpict(1), rvu(1), vwrays(1), ximage(1)