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

File Contents

# User Rev Content
1 greg 1.34 .\" RCSid "$Id: rpict.1,v 1.33 2025/06/04 20:32:24 greg Exp $"
2 greg 1.1 .TH RPICT 1 2/26/99 RADIANCE
3     .SH NAME
4     rpict - generate a RADIANCE picture
5     .SH SYNOPSIS
6     .B rpict
7     [
8     .B options
9     ]
10     [
11     .B $EVAR
12     ]
13     [
14     .B @file
15     ]
16     [
17     .B octree
18     ]
19     .br
20     .B "rpict [ options ] \-defaults"
21 greg 1.28 .br
22     .B "rpict \-features [feat1 ..]"
23 greg 1.1 .SH DESCRIPTION
24     .I Rpict
25     generates a picture from the RADIANCE scene given in
26     .I octree
27     and sends it to the standard output.
28     If no
29     .I octree
30     is given, the standard input is read.
31     (The octree may also be specified as the output of a command
32     enclosed in quotes and preceded by a `!'.)\0
33     Options specify the viewing parameters as well as
34     giving some control over the calculation.
35     Options may be given on the command line and/or read from the
36     environment and/or read from a file.
37     A command argument beginning with a dollar sign ('$') is immediately
38     replaced by the contents of the given environment variable.
39     A command argument beginning with an at sign ('@') is immediately
40     replaced by the contents of the given file.
41     .PP
42     In the second form shown above, the default values
43     for the options (modified by those options present)
44     are printed with a brief explanation.
45     .PP
46 greg 1.28 In the third form, a list of supported features is sent
47     to the standard output, one per line.
48     If additional arguments follow, they are checked for presence in
49     this list.
50     If a feature includes subfeatures, these may be checked as well by
51     specifying:
52     .nf
53    
54     rpict -features FeatName=subfeat1,subfeat2
55    
56     .fi
57     If any named feature or subfeature is missing, an error is
58     reported and the program returns an error status.
59     If all of the named features are present, a zero status is returned.
60     .PP
61 greg 1.1 Most options are followed by one or more arguments, which must be
62     separated from the option and each other by white space.
63     The exceptions to this rule are the
64     .I \-vt
65     option and the boolean options.
66     Normally, the appearance of a boolean option causes a feature to
67     be "toggled", that is switched from off to on or on to off
68     depending on its previous state.
69     Boolean options may also be set
70     explicitly by following them immediately with a '+' or '-', meaning
71     on or off, respectively.
72     Synonyms for '+' are any of the characters "yYtT1", and synonyms
73     for '-' are any of the characters "nNfF0".
74     All other characters will generate an error.
75     .TP 10n
76     .BI -vt t
77     Set view type to
78     .I t.
79     If
80     .I t
81     is 'v', a perspective view is selected.
82     If
83     .I t
84     is 'l', a parallel view is used.
85     A cylindrical panorma may be selected by setting
86     .I t
87     to the letter 'c'.
88     This view is like a standard perspective vertically, but projected
89     on a cylinder horizontally (like a soupcan's-eye view).
90 greg 1.12 Three fisheye views are provided as well; 'h' yields a hemispherical fisheye
91     view, 'a' results in angular fisheye distortion, and 's'
92     results in a planisphere (stereographic) projection.
93 greg 1.1 A hemispherical fisheye is a projection of the hemisphere onto a circle.
94     The maximum view angle for this type is 180 degrees.
95     An angular fisheye view is defined such that distance from the center of
96     the image is proportional to the angle from the central view direction.
97     An angular fisheye can display a full 360 degrees.
98 greg 1.12 A planisphere fisheye view maintains angular relationships between lines,
99     and is commonly used for sun path analysis.
100     This is more commonly known as a
101     "stereographic projection," but we avoid the term here so as not to
102     confuse it with a stereoscopic pair.
103     A planisphere fisheye can display up to (but not including) 360 degrees,
104     although distortion becomes extreme as this limit is approached.
105 greg 1.1 Note that there is no space between the view type
106     option and its single letter argument.
107     .TP
108     .BI -vp " x y z"
109     Set the view point to
110     .I "x y z".
111     This is the focal point of a perspective view or the
112     center of a parallel projection.
113     .TP
114     .BI -vd " xd yd zd"
115     Set the view direction vector to
116     .I "xd yd zd".
117 greg 1.5 The length of this vector indicates the focal distance as needed by the
118     .I \-pd
119     option, described below.
120 greg 1.1 .TP
121     .BI -vu " xd yd zd"
122     Set the view up vector (vertical direction) to
123     .I "xd yd zd".
124     .TP
125     .BI -vh \ val
126     Set the view horizontal size to
127     .I val.
128     For a perspective projection (including fisheye views),
129     .I val
130     is the horizontal field of view (in degrees).
131     For a parallel projection,
132     .I val
133     is the view width in world coordinates.
134     .TP
135     .BI -vv \ val
136     Set the view vertical size to
137     .I val.
138     .TP
139     .BI -vo \ val
140     Set the view fore clipping plane at a distance of
141     .I val
142     from the view point.
143     The plane will be perpendicular to the view direction for
144     perspective and parallel view types.
145     For fisheye view types, the clipping plane is actually a clipping
146     sphere, centered on the view point with radius
147     .I val.
148     Objects in front of this imaginary surface will not be visible.
149     This may be useful for seeing through walls (to get a longer
150     perspective from an exterior view point) or for incremental
151     rendering.
152     A value of zero implies no foreground clipping.
153     A negative value produces some interesting effects, since it creates an
154     inverted image for objects behind the viewpoint.
155     This possibility is provided mostly for the purpose of rendering
156     stereographic holograms.
157     .TP
158     .BI -va \ val
159     Set the view aft clipping plane at a distance of
160     .I val
161     from the view point.
162     Like the view fore plane, it will be perpendicular to the view
163     direction for perspective and parallel view types.
164     For fisheye view types, the clipping plane is actually a clipping
165     sphere, centered on the view point with radius
166     .I val.
167     Objects behind this imaginary surface will not be visible.
168     A value of zero means no aft clipping, and is the only way to see
169     infinitely distant objects such as the sky.
170     .TP
171     .BI -vs \ val
172     Set the view shift to
173     .I val.
174     This is the amount the actual image will be shifted to the right of
175     the specified view.
176     This is option is useful for generating skewed perspectives or
177     rendering an image a piece at a time.
178     A value of 1 means that the rendered image starts just to the right of
179     the normal view.
180 greg 1.11 A value of \-1 would be to the left.
181 greg 1.1 Larger or fractional values are permitted as well.
182     .TP
183     .BI -vl \ val
184     Set the view lift to
185     .I val.
186     This is the amount the actual image will be lifted up from the
187     specified view, similar to the
188     .I \-vs
189     option.
190     .TP
191     .BI -vf \ file
192     Get view parameters from
193     .I file,
194 greg 1.3 which may be a picture or a file created by rvu (with the "view" command).
195 greg 1.1 .TP
196     .BI -x \ res
197     Set the maximum x resolution to
198     .I res.
199     .TP
200     .BI -y \ res
201     Set the maximum y resolution to
202     .I res.
203     .TP
204     .BI -pa \ rat
205     Set the pixel aspect ratio (height over width) to
206     .I rat.
207     Either the x or the y resolution will be reduced so that the pixels have
208     this ratio for the specified view.
209     If
210     .I rat
211     is zero, then the x and y resolutions will adhere to the given maxima.
212     .TP
213     .BI -ps \ size
214     Set the pixel sample spacing to the integer
215     .I size.
216     This specifies the sample spacing (in pixels) for adaptive subdivision
217     on the image plane.
218     .TP
219     .BI -pt \ frac
220     Set the pixel sample tolerance to
221     .I frac.
222     If two samples differ by more than this amount, a third
223     sample is taken between them.
224     .TP
225     .BI -pj \ frac
226     Set the pixel sample jitter to
227     .I frac.
228     Distributed ray-tracing performs anti-aliasing by randomly sampling
229     over pixels.
230     A value of one will randomly distribute samples over full
231 greg 1.26 pixels, and is not really recommended due to the tendency of
232     samples to (nearly) coincide.
233 greg 1.1 A value of zero samples pixel centers only.
234 greg 1.26 A value around 0.5-0.8 is typical.
235 greg 1.1 .TP
236     .BI -pm \ frac
237     Set the pixel motion blur to
238     .I frac.
239     In an animated sequence, the exact view will be blurred between the previous
240     view and the next view as though a shutter were open this fraction of a
241     frame time.
242     (See the
243     .I \-S
244     option regarding animated sequences.)\0
245     The first view will be blurred according to the difference between the
246     initial view set on the command line and the first view taken from the
247     standard input.
248     It is not advisable to use this option in combination with the
249     .I pmblur(1)
250     program, since one takes the place of the other.
251     However, it may improve results with
252     .I pmblur
253     to use a very small fraction with the
254     .I \-pm
255     option, to avoid the ghosting effect of too few time samples.
256     .TP
257 greg 1.4 .BI -pd \ dia
258     Set the pixel depth-of-field aperture to a diameter of
259     .I dia
260     (in world coordinates).
261     This will be used in conjunction with the view focal distance, indicated
262     by the length of the view direction vector given in the
263     .I \-vd
264     option.
265     It is not advisable to use this option in combination with the
266     .I pdfblur(1)
267     program, since one takes the place of the other.
268     However, it may improve results with
269     .I pdfblur
270     to use a very small fraction with the
271     .I \-pd
272     option, to avoid the ghosting effect of too few samples.
273     .TP
274 greg 1.30 .BI -pc " xr yr xg yg xb yb xw yw"
275     Use the specified chromaticity pairs for output primaries and white
276     point rather than the standard RGB color space.
277     .TP
278     .BR \-pRGB
279     Output standard RGB values (the default).
280     .TP
281     .BR \-pXYZ
282     Output standard CIE XYZ tristimulus values rather than RGB.
283     .TP
284 greg 1.31 .BI -f \ source
285 greg 1.34 Load function and variable definitions from the file
286 greg 1.31 .I source
287 greg 1.32 and assign at the global level.
288 greg 1.34 This may be convenient for altering material appearance on a per-run basis.
289 greg 1.32 The usual set of library directories is searched based on the
290     .I RAYPATH
291     environment variable.
292 greg 1.34 These file definitions will override same-named variables
293     and functions in "rayinit.cal".
294 greg 1.31 .TP
295     .BI -e \ expr
296 greg 1.34 Set initial definitions from
297     .I expr,
298     which may include constant assignments with the ':' character.
299 greg 1.31 .TP
300 greg 1.1 .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     It is usually wise to turn off image sampling when using
317 greg 1.11 direct jitter by setting \-ps to 1.
318 greg 1.1 .TP
319     .BI -ds \ frac
320     Set the direct sampling ratio to
321     .I frac.
322     A light source will be subdivided until
323     the width of each sample area divided by the distance
324     to the illuminated point is below this ratio.
325     This assures accuracy in regions close to large area sources
326     at a slight computational expense.
327     A value of zero turns source subdivision off, sending at most one
328     shadow ray to each light source.
329     .TP
330     .BI -dt \ frac
331     Set the direct threshold to
332     .I frac.
333     Shadow testing will stop when the potential contribution of at least
334     the next and at most all remaining light source samples is less than
335     this fraction of the accumulated value.
336     (See the
337     .I \-dc
338     option below.)\0
339     The remaining light source contributions are approximated
340     statistically.
341     A value of zero means that all light source samples will be tested for shadow.
342     .TP
343     .BI \-dc \ frac
344     Set the direct certainty to
345     .I frac.
346     A value of one guarantees that the absolute accuracy of the direct calculation
347     will be equal to or better than that given in the
348     .I \-dt
349     specification.
350     A value of zero only insures that all shadow lines resulting in a contrast
351     change greater than the
352     .I \-dt
353     specification will be calculated.
354     .TP
355     .BI -dr \ N
356 greg 1.27 Set the number of relays for virtual sources to
357 greg 1.1 .I N.
358 greg 1.27 A value of 0 means that virtual sources will be ignored.
359 greg 1.1 A value of 1 means that sources will be made into first generation
360 greg 1.27 virtual sources; a value of 2 means that first generation
361     virtual sources will also be made into second generation virtual
362 greg 1.1 sources, and so on.
363     .TP
364     .BI -dp \ D
365 greg 1.27 Set the virtual source presampling density to D.
366 greg 1.1 This is the number of samples per steradian
367     that will be used to determine ahead of time whether or not
368     it is worth following shadow rays through all the reflections and/or
369 greg 1.27 transmissions associated with a virtual source path.
370     A value of 0 means that the full virtual source path will always
371 greg 1.1 be tested for shadows if it is tested at all.
372     .TP
373     .BR \-dv
374     Boolean switch for light source visibility.
375     With this switch off, sources will be black when viewed directly
376     although they will still participate in the direct calculation.
377     This option may be desirable in conjunction with the
378     .I \-i
379     option so that light sources do not appear in the output.
380     .TP
381 greg 1.15 .BI -ss \ samp
382     Set the specular sampling to
383     .I samp.
384     For values less than 1, this is the degree to which the highlights
385     are sampled for rough specular materials.
386     A value greater than one causes multiple ray samples to be sent
387     to reduce noise at a commmesurate cost.
388 greg 1.1 A value of zero means that no jittering will take place, and all
389     reflections will appear sharp even when they should be diffuse.
390     This may be desirable when used in combination with image sampling
391     (see
392     .I \-ps
393     option above) to obtain faster renderings.
394     .TP
395     .BI -st \ frac
396     Set the specular sampling threshold to
397     .I frac.
398     This is the minimum fraction of reflection or transmission, under which
399     no specular sampling is performed.
400     A value of zero means that highlights will always be sampled by
401     tracing reflected or transmitted rays.
402     A value of one means that specular sampling is never used.
403     Highlights from light sources will always be correct, but
404     reflections from other surfaces will be approximated using an
405     ambient value.
406     A sampling threshold between zero and one offers a compromise between image
407     accuracy and rendering time.
408     .TP
409     .BR -bv
410     Boolean switch for back face visibility.
411 greg 1.16 With this switch off, back faces of all objects will be invisible
412     to view rays.
413 greg 1.1 This is dangerous unless the model was constructed such that
414 greg 1.16 all surface normals face outward.
415 greg 1.1 Although turning off back face visibility does not save much
416     computation time under most circumstances, it may be useful as a
417     tool for scene debugging, or for seeing through one-sided walls from
418     the outside.
419     .TP
420     .BI -av " red grn blu"
421     Set the ambient value to a radiance of
422     .I "red grn blu".
423     This is the final value used in place of an
424     indirect light calculation.
425     If the number of ambient bounces is one or greater and the ambient
426     value weight is non-zero (see
427     .I -aw
428     and
429     .I -ab
430     below), this value may be modified by the computed indirect values
431     to improve overall accuracy.
432     .TP
433     .BI -aw \ N
434     Set the relative weight of the ambient value given with the
435     .I -av
436     option to
437     .I N.
438     As new indirect irradiances are computed, they will modify the
439     default ambient value in a moving average, with the specified weight
440     assigned to the initial value given on the command and all other
441     weights set to 1.
442     If a value of 0 is given with this option, then the initial ambient
443     value is never modified.
444     This is the safest value for scenes with large differences in
445     indirect contributions, such as when both indoor and outdoor
446     (daylight) areas are visible.
447     .TP
448     .BI -ab \ N
449     Set the number of ambient bounces to
450     .I N.
451 greg 1.18 This is the maximum number of diffuse bounces computed by the indirect
452     calculation. A value of zero implies no indirect calculation.
453     .IP
454 rschregle 1.20 This value defaults to 1 in photon mapping mode (see
455 greg 1.18 .I -ap
456 rschregle 1.20 below), implying that global photon irradiance is always computed via
457 greg 1.18 .I one
458 rschregle 1.20 ambient bounce; this behaviour applies to any positive number of ambient
459     bounces, regardless of the actual value specified. A negative value enables
460     a preview mode that directly visualises the irradiance from the global
461     photon map without any ambient bounces.
462 greg 1.1 .TP
463     .BI -ar \ res
464     Set the ambient resolution to
465     .I res.
466     This number will determine the maximum density of ambient values
467     used in interpolation.
468     Error will start to increase on surfaces spaced closer than
469     the scene size divided by the ambient resolution.
470     The maximum ambient value density is the scene size times the
471     ambient accuracy (see the
472     .I \-aa
473     option below) divided by the ambient resolution.
474     The scene size can be determined using
475     .I getinfo(1)
476     with the
477     .I \-d
478     option on the input octree.
479     A value of zero is interpreted as unlimited resolution.
480     .TP
481     .BI -aa \ acc
482     Set the ambient accuracy to
483     .I acc.
484     This value will approximately equal the error
485 greg 1.27 from indirect irradiance interpolation.
486 greg 1.1 A value of zero implies no interpolation.
487     .TP
488     .BI -ad \ N
489     Set the number of ambient divisions to
490     .I N.
491     The error in the Monte Carlo calculation of indirect
492 greg 1.27 irradiance will be inversely proportional to the square
493 greg 1.1 root of this number.
494     A value of zero implies no indirect calculation.
495     .TP
496     .BI -as \ N
497     Set the number of ambient super-samples to
498     .I N.
499     Super-samples are applied only to the ambient divisions which
500     show a significant change.
501     .TP
502     .BI -af \ fname
503     Set the ambient file to
504     .I fname.
505 greg 1.27 This is where indirect irradiance will be stored and retrieved.
506     Normally, indirect irradiance values are kept in memory and
507 greg 1.1 lost when the program finishes or dies.
508 greg 1.27 By using a file, different invocations can share irradiance
509 greg 1.1 values, saving time in the computation.
510 greg 1.26 Also, by creating an ambient file during a low-resolution rendering,
511     better results can be obtained in a second high-resolution pass.
512     (It is a good idea to keep all of the calculation parameters the same,
513     changing only the dimensions of the output picture.)\0
514 greg 1.1 The ambient file is in a machine-independent binary format
515     which may be examined with
516     .I lookamb(1).
517     .IP
518     The ambient file may also be used as a means of communication and
519     data sharing between simultaneously executing processes.
520     The same file may be used by multiple processes, possibly running on
521     different machines and accessing the file via the network (ie.
522     .I nfs(4)).
523     The network lock manager
524     .I lockd(8)
525     is used to insure that this information is used consistently.
526     .IP
527     If any calculation parameters are changed or the scene
528     is modified, the old ambient file should be removed so that
529     the calculation can start over from scratch.
530     For convenience, the original ambient parameters are listed in the
531     header of the ambient file.
532     .I Getinfo(1)
533     may be used to print out this information.
534     .TP
535 greg 1.7 .BI -ae \ mod
536 greg 1.1 Append
537 greg 1.7 .I mod
538 greg 1.1 to the ambient exclude list,
539     so that it will not be considered during the indirect calculation.
540     This is a hack for speeding the indirect computation by
541     ignoring certain objects.
542     Any object having
543 greg 1.7 .I mod
544 greg 1.1 as its modifier will get the default ambient
545     level rather than a calculated value.
546 greg 1.7 Any number of excluded modifiers may be given, but each
547 greg 1.1 must appear in a separate option.
548     .TP
549 greg 1.7 .BI -ai \ mod
550 greg 1.1 Add
551 greg 1.7 .I mod
552 greg 1.1 to the ambient include list,
553     so that it will be considered during the indirect calculation.
554     The program can use either an include list or an exclude
555     list, but not both.
556     .TP
557     .BI -aE \ file
558     Same as
559     .I \-ae,
560 greg 1.7 except read modifiers to be excluded from
561 greg 1.1 .I file.
562     The RAYPATH environment variable determines which directories are
563     searched for this file.
564 greg 1.7 The modifier names are separated by white space in the file.
565 greg 1.1 .TP
566     .BI -aI \ file
567     Same as
568     .I \-ai,
569 greg 1.7 except read modifiers to be included from
570 greg 1.1 .I file.
571     .TP
572 greg 1.18 .BI -ap " file [bwidth1 [bwidth2]]"
573     Enable photon mapping mode. Loads a photon map generated with
574     .I mkpmap(1)
575     from
576     .I file,
577     and evaluates the indirect irradiance depending on the photon type
578     (automagically detected) using density estimates with a bandwidth of
579     .I bwidth1
580     photons, or the default bandwidth if none is specified (a warning will be
581     issued in this case).
582     .IP
583     Global photon irradiance is evaluated as part of the ambient calculation (see
584     .I \-ab
585     above), caustic photon irradiance is evaluated at primary rays, and
586     indirect inscattering in
587     .I mist
588 rschregle 1.22 is accounted for by volume photons. Contribution photons are treated as
589     global photons by
590     .I rpict.
591 greg 1.18 .IP
592     Additionally specifying
593     .I bwidth2
594     enables bias compensation for the density estimates with a
595     minimum and maximum bandwidth of
596     .I bwidth1
597     and
598     .I bwidth2,
599     respectively.
600     .IP
601     Global photon irradiance may be optionally precomputed by
602     .I mkpmap(1),
603     in which case the bandwidth, if specified, is ignored, as the nearest photon
604     is invariably looked up.
605     .IP
606     Using direct photons replaces the direct calculation with density estimates
607 rschregle 1.22 for debugging and validation of photon emission.
608 greg 1.18 .TP
609     .BI -am " frac"
610 rschregle 1.20 Maximum search radius for photon map lookups. Without this option, an
611     initial maximum search radius is estimated for each photon map from the
612     average photon distance to the distribution's centre of gravity. It is then
613     adapted to the photon density in subsequent lookups. This option imposes a
614     global fixed maximum search radius for
615     .I all
616     photon maps, thus defeating the automatic adaptation. It is useful when
617     multiple warnings about short photon lookups are issued. Note that this
618     option does not conflict with the bandwidth specified with the
619     .I \-ap
620     option; the number of photons found will not exceed the latter, but may be
621     lower if the maximum search radius contains fewer photons, thus resulting in
622     short lookups. Setting this radius too large, on the other hand, may
623     degrade performance.
624 greg 1.18 .TP
625 rschregle 1.21 .BI -ac " pagesize"
626     Set the photon cache page size when using out-of-core photon mapping. The
627     photon cache reduces disk I/O incurred by on-demand loading (paging) of
628     photons, and thus increases performance. This
629     is expressed as a (float) multiple of the density estimate bandwidth
630     specified with
631     .I \-ap
632     under the assumption that photon lookups are local to a cache page. Cache
633     performance is sensitive to this parameter: larger pagesizes will reduce the
634     paging frequency at the expense of higher latency when paging does occur.
635     Sensible values are in the range 4 (default) to 16.
636     .TP
637     .BI -aC " cachesize"
638     Set the total number of photons cached when using out-of-core photon
639     mapping, taking into account the pagesize specified by
640     .I \-ac.
641     Note that this is approximate as the number of cache pages is rounded to
642     the nearest prime. This allows adapting the cache to the available physical
643 rschregle 1.25 memory. Cache performance is less sensitive to this parameter, and reasonable
644     performance can obtained with as few as 10k photons. The default is 1M. This
645     option recognises multiplier suffixes (k = 1e3, M = 1e6), both in upper and
646     lower case.
647 rschregle 1.21 .TP
648 greg 1.1 .BI -me " rext gext bext"
649     Set the global medium extinction coefficient to the indicated color,
650     in units of 1/distance (distance in world coordinates).
651     Light will be scattered or absorbed over distance according to
652     this value.
653     The ratio of scattering to total scattering plus absorption is set
654     by the albedo parameter, described below.
655     .TP
656     .BI -ma " ralb galb balb"
657     Set the global medium albedo to the given value between 0\00\00
658     and 1\01\01.
659     A zero value means that all light not transmitted by the medium
660     is absorbed.
661     A unitary value means that all light not transmitted by the medium
662     is scattered in some new direction.
663     The isotropy of scattering is determined by the Heyney-Greenstein
664     parameter, described below.
665     .TP
666     .BI \-mg \ gecc
667     Set the medium Heyney-Greenstein eccentricity parameter to
668     .I gecc.
669     This parameter determines how strongly scattering favors the forward
670     direction.
671     A value of 0 indicates perfectly isotropic scattering.
672     As this parameter approaches 1, scattering tends to prefer the
673     forward direction.
674     .TP
675     .BI \-ms \ sampdist
676     Set the medium sampling distance to
677     .I sampdist,
678     in world coordinate units.
679     During source scattering, this will be the average distance between
680     adjacent samples.
681     A value of 0 means that only one sample will be taken per light
682     source within a given scattering volume.
683     .TP
684     .BR \-i
685     Boolean switch to compute irradiance rather than radiance values.
686     This only affects the final result, substituting a Lambertian
687     surface and multiplying the radiance by pi.
688     Glass and other transparent surfaces are ignored during this stage.
689     Light sources still appear with their original radiance values,
690     though the
691     .I \-dv
692     option (above) may be used to override this.
693     .TP
694 greg 1.10 .BR \-u
695     Boolean switch to control uncorrelated random sampling.
696 greg 1.9 When "off", a low-discrepancy sequence is used, which reduces
697 greg 1.17 variance but can result in a dithered appearance in specular highlights.
698 greg 1.9 When "on", pure Monte Carlo sampling is used in all calculations.
699     .TP
700 greg 1.1 .BI -lr \ N
701     Limit reflections to a maximum of
702 greg 1.14 .I N,
703     if N is a positive integer.
704 greg 1.8 If
705     .I N
706     is zero, then Russian roulette is used for ray
707     termination, and the
708     .I -lw
709     setting (below) must be positive.
710 greg 1.24 If N is a negative integer, then this limits the maximum
711     number of reflections even with Russian roulette.
712 greg 1.8 In scenes with dielectrics and total internal reflection,
713     a setting of 0 (no limit) may cause a stack overflow.
714 greg 1.1 .TP
715     .BI -lw \ frac
716     Limit the weight of each ray to a minimum of
717     .I frac.
718 greg 1.8 During ray-tracing, a record is kept of the estimated contribution
719     (weight) a ray would have in the image.
720     If this weight is less than the specified minimum and the
721     .I -lr
722     setting (above) is positive, the ray is not traced.
723     Otherwise, Russian roulette is used to
724     continue rays with a probability equal to the ray weight
725     divided by the given
726     .I frac.
727 greg 1.1 .TP
728 greg 1.29 .BI -cs \ Ns
729     Use
730     .I Ns
731     bands for spectral sampling rather than the default RGB calculation space.
732     The maximum setting is controlled by the compiler macro MAXCSAMP, and
733     defaults to 24.
734     Larger values for Ns will be reduced to MAXCSAMP.
735     .TP
736     .BI -cw " nmA nmB"
737     Set extrema to the given wavelengths for spectral sampling.
738     The default is 380 and 780 nanometers.
739     The order specified does not matter.
740     .TP
741 greg 1.1 .BI -S \ seqstart
742     Instead of generating a single picture based only on the view
743     parameters given on the command line, this option causes
744     .I rpict
745     to read view options from the standard input and for each line
746     containing a valid view specification, generate a corresponding
747     picture.
748     This option is most useful for generating animated sequences, though
749     it may also be used to control rpict from a remote process for
750     network-distributed rendering.
751     .I Seqstart
752     is a positive integer that will be associated with the first output
753     frame, and incremented for successive output frames.
754     By default, each frame is concatenated to the output stream, but it
755     is possible to change this action using the
756     .I \-o
757     option (described below).
758     Multiple frames may be later extracted from the output using
759     .I ra_rgbe(1).
760     .IP
761     Note that the octree may not be read from the standard input when
762     using this option.
763     .TP
764     .BI -o \ fspec
765     Send the picture(s) to the file(s) given by
766     .I fspec
767     instead of the standard output.
768     If this option is used in combination with
769     .I \-S
770     and
771     .I fspec
772     contains an integer field for
773     .I printf(3)
774     (eg. "%03d") then the actual output file name will include
775     the current frame number.
776     .I Rpict
777     will not allow a picture file to be clobbered (overwritten)
778     with this option.
779     If an image in a sequence already exists
780     .I (\-S
781     option),
782     .I rpict
783     will skip until it reaches an image that doesn't, or the end of
784     the sequence.
785     This is useful for running rpict on multiple machines or processors
786     to render the same sequence, as each process will skip to the next
787     frame that needs rendering.
788     .TP
789     .BI -r \ fn
790     Recover pixel information from the file
791     .I fn.
792     If the program gets killed during picture generation, the information
793     may be recovered using this option.
794     The view parameters and picture dimensions are also recovered from
795     .I fn
796     if possible.
797     The other options should be identical to those which created
798     .I fn,
799     or an inconsistent picture may result.
800     If
801     .I fn
802     is identical to the file specification given with the
803     .I \-o
804     option,
805     .I rpict
806     will rename the file prior to copying its contents.
807     This insures that the old file is not overwritten accidentally.
808     (See also the
809     .I \-ro
810     option, below.)\0
811     .IP
812     If
813     .I fn
814     is an integer and the recover option is used in combination with the
815     .I \-S
816     option, then
817     .I rpict
818     skips a number of view specifications on its input equal to the
819     difference between
820     .I fn
821     and
822     .I seqstart.
823     .I Rpict
824     then performs a recovery operation on the file constructed from the
825     frame number
826     .I fn
827     and the output file specification given with the
828     .I \-o
829     option.
830     This provides a convenient mechanism for recovering in the middle of
831     an aborted picture sequence.
832     .IP
833     The recovered file
834     will be removed if the operation is successful.
835     If the recover operation fails (due to lack of disk space)
836     and the output file and recover file specifications
837     are the same, then the original information may be left in a
838     renamed temporary file.
839     (See FILES section, below.)\0
840     .TP
841     .BI -ro \ fspec
842     This option causes pixel information to be recovered from and
843     subsequently returned to the picture file
844     .I fspec.
845     The effect is the same as specifying identical recover and output
846     file names with the
847     .I \-r
848     and
849     .I \-o
850     options.
851     .TP
852     .BI -z \ fspec
853     Write pixel distances out to the file
854     .I fspec.
855     The values are written as short floats, one per pixel in scanline order,
856     as required by
857     .I pinterp(1).
858     Similar to the
859     .I \-o
860     option, the actual file name will be constructed using
861     .I printf
862     and the frame number from the
863     .I \-S
864     option.
865     If used with the
866     .I \-r
867     option,
868     .I \-z
869     also recovers information from an aborted rendering.
870     .TP
871     .BI \-P \ pfile
872     Execute in a persistent mode, using
873     .I pfile
874     as the control file.
875     This option must be used together with
876     .I \-S,
877     and is incompatible with the recover option
878     .I (\-r).
879     Persistent execution means that after reaching end-of-file on
880     its input,
881     .I rpict
882     will fork a child process that will wait for another
883     .I rpict
884     command with the same
885     .I \-P
886     option to attach to it.
887     (Note that since the rest of the command line options will be those
888     of the original invocation, it is not necessary to give any arguments
889     besides
890     .I \-P
891     for subsequent calls.)
892     Killing the process is achieved with the
893     .I kill(1)
894     command.
895     (The process ID in the first line of
896     .I pfile
897     may be used to identify the waiting
898     .I rpict
899     process.)
900     This option may be less useful than the
901     .I \-PP
902     variation, explained below.
903     .TP
904     .BI \-PP \ pfile
905     Execute in continuous-forking persistent mode, using
906     .I pfile
907     as the control file.
908     The difference between this option and the
909     .I \-P
910     option described above is the creation of multiple duplicate
911     processes to handle any number of attaches.
912     This provides a simple and reliable mechanism of memory sharing
913     on most multiprocessing platforms, since the
914     .I fork(2)
915     system call will share memory on a copy-on-write basis.
916     This option may be used with
917     .I rpiece(1)
918     to efficiently render a single image using multiple processors
919     on the same host.
920     .TP
921     .BI -t \ sec
922     Set the time between progress reports to
923     .I sec.
924     A progress report writes the number of rays traced, the percentage
925     completed, and the CPU usage to the standard error.
926     Reports are given either automatically after the specified interval,
927 greg 1.11 or when the process receives a continue (\-CONT) signal (see
928 greg 1.1 .I kill(1)).
929     A value of zero turns automatic reporting off.
930     .TP
931     .BI -e \ efile
932     Send error messages and progress reports to
933     .I efile
934     instead of the standard error.
935 greg 1.31 (Note this option overlaps with "-e expr" above, so file paths
936     with '=' or ':' in them are not allowed on this option.)
937 greg 1.1 .TP
938     .BR \-w
939     Boolean switch for warning messages.
940     The default is to print warnings, so the first appearance of
941     this option turns them off.
942     .SH EXAMPLE
943 greg 1.13 rpict \-vp 10 5 3 \-vd 1 \-.5 0 scene.oct > scene.hdr
944 greg 1.1 .PP
945 greg 1.13 rpict \-S 1 \-o frame%02d.hdr scene.oct < keyframes.vf
946 greg 1.18 .PP
947 greg 1.27 To render ambient irradiance in photon mapping mode from a global photon
948 greg 1.18 map global.pm via one ambient bounce, and from a caustic photon map
949     caustic.pm:
950     .IP "" .2i
951     rpict -ab 1 -ap global.pm 50 -ap caustic.pm 50 -vf scene.vf scene.oct >
952     scene.hdr
953 greg 1.1 .SH ENVIRONMENT
954     RAYPATH the directories to check for auxiliary files.
955     .SH FILES
956 greg 1.6 /tmp/rtXXXXXX common header information for picture sequence
957 greg 1.1 .br
958     rfXXXXXX temporary name for recover file
959     .SH DIAGNOSTICS
960     If the program terminates from an input related error, the exit status
961     will be 1.
962     A system related error results in an exit status of 2.
963     If the program receives a signal that is caught, it will exit with a status
964     of 3.
965     In each case, an error message will be printed to the standard error, or
966     to the file designated by the
967     .I \-e
968     option.
969     .SH AUTHOR
970     Greg Ward
971     .SH "SEE ALSO"
972 greg 1.18 getinfo(1), lookamb(1), mkpmap(1), oconv(1), pdfblur(1), pfilt(1),
973 greg 1.33 pinterp(1), pmblur(1), printf(3), ra_rgbe(1), rad(1), rpiece(1), rtpict(1), rtrace(1), rvu(1), rxpiece(1)