ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtrace.1
Revision: 1.35
Committed: Wed Oct 19 18:23:14 2022 UTC (2 years, 6 months ago) by greg
Branch: MAIN
Changes since 1.34: +16 -16 lines
Log Message:
docs: made use of "virtual" and "secondary" sources more consistent

File Contents

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