ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rad.1
Revision: 1.9
Committed: Tue May 18 00:32:23 2010 UTC (14 years ago) by greg
Branch: MAIN
Changes since 1.8: +18 -2 lines
Log Message:
Added ability to call rpiece with -N >1 on a single view

File Contents

# User Rev Content
1 greg 1.9 .\" RCSid "$Id: rad.1,v 1.8 2008/12/18 23:26:57 greg Exp $"
2 greg 1.1 .TH RAD 1 2/1/99 RADIANCE
3     .SH NAME
4     rad - render a RADIANCE scene
5     .SH SYNOPSIS
6     .B rad
7     [
8     .B \-s
9     ][
10 greg 1.2 .B "-n|-N npr"
11 greg 1.1 ][
12     .B \-t
13     ][
14     .B \-e
15     ][
16     .B \-V
17     ][
18     .B \-w
19     ][
20     .B "\-v view"
21     ][
22     .B "\-o device"
23     ]
24     .B rfile
25     [
26     .B "VAR\=value .."
27     ]
28     .SH DESCRIPTION
29     .I Rad
30     is an executive program that reads the given
31     .I rfile
32     and makes appropriate calls to
33     .I oconv(1),
34     .I mkillum(1),
35     .I rpict(1),
36     .I pfilt(1),
37     and/or
38 greg 1.4 .I rvu(1)
39 greg 1.1 to render a specific scene.
40     Variables in
41     .I rfile
42     give input files and qualitative information about the rendering(s)
43     desired that together enable
44     .I rad
45     to intelligently set parameter values and control the simulation.
46     .PP
47     Normally, commands are echoed to the standard output as they are
48     executed.
49     The
50     .I \-s
51     option tells
52     .I rad
53     to do its work silently.
54     The
55     .I \-n
56     option tells
57     .I rad
58     not to take any action (ie. not to actually execute any commands).
59 greg 1.2 The
60     .I \-N
61     option instructs
62     .I rad
63     to run as many as
64     .I npr
65     rendering processes in parallel.
66 greg 1.1 The
67     .I \-t
68     option tells
69     .I rad
70     to bring rendering files up to date relative to the input
71     (scene description) files, without performing any actual
72     calculations.
73     If no octree exists, it is still necessary to run
74     .I oconv(1)
75     to create one, since the
76     .I \-t
77     option will not create invalid (i.e. empty) files, and
78     a valid octree is necessary for the correct operation of
79     .I rad.
80     The
81     .I \-e
82     option tells
83     .I rad
84     to explicate all variables used for the simulation, including
85     default values not specified in the input file, and print them on
86     the standard output.
87     .PP
88     Normally,
89     .I rad
90     will produce one picture for each view given in
91     .I rfile.
92     The
93     .I \-v
94     option may be used to specify a single desired view.
95     The
96     .I view
97     argument may either be a complete view specification
98     (enclosed in quotes and beginning with an optional identifier)
99     or a number or single-word identifier to match a view defined in
100     .I rfile.
101     If the argument is one of the standard view identifiers,
102     it may or may not be further elaborated in
103     .I rfile.
104     (See "view" variable description, below.)\0
105     If the argument does not match any views in
106     .I rfile
107     and is not one of the standard views, no rendering will take place.
108     This may be convenient when the only action desired of
109     .I rad
110     is the rebuilding of the octree.
111     In particular, the argument "0" will never match a view.
112     .PP
113     If the
114     .I \-V
115     option is given,
116     each view will be printed on the standard output before
117     being applied, in a form suitable for use in a view file or
118     .I rpict
119     rendering sequence.
120     This is helpful as feedback or for accessing the
121     .I rad
122     view assignments without necessarily starting a rendering.
123     .PP
124     By default,
125     .I rad
126     will run
127     .I rpict
128     and
129     .I pfilt
130     to produce a picture for each view.
131     The
132     .I \-o
133     option specifies an output device for
134 greg 1.4 .I rvu
135 greg 1.1 (usually "x11")
136     and runs this interactive program instead, using the first view in
137     .I rfile
138     or the view given with the
139     .I \-v
140     option as the starting point.
141     .PP
142     Additional variable settings may be added or overridden on the
143     command line following
144     .I rfile.
145     Upper case variables specified more than once will result in
146     a warning message (unless the
147     .I \-w
148     option is present),
149     and the last value given will be the one used.
150     .PP
151     The
152     .I \-w
153     option turns off warnings about multiply and misassigned variables.
154     .PP
155     Rendering variable assignments appear one per line in
156     .I rfile.
157     The name of the variable is followed by an equals sign
158     ('=') and its value(s).
159     The end of line may be escaped with a backslash ('\\'), though it is
160     not usually necessary since additional variable values may be given
161     in multiple assignments.
162     Variables that should have only one value are given in upper case.
163     Variables that may have multiple values are given in lower case.
164     Variables may be abbreviated by their first three letters.
165     Comments in
166     .I rfile
167     start with a pound sign ('#') and proceed to the end of line.
168     .PP
169     The rendering variables, their interpretations and default values
170     are given below.
171     .TP 10n
172     .BR OCTREE
173     The name of the octree file.
174     The default name is the same as
175     .I rfile
176     but with any suffix replaced by ".oct".
177     (The octree must be a file --
178     .I rad
179     cannot work with commands that produce octrees.)\0
180     .TP
181     .BR ZONE
182     This variable specifies the volume of interest for this simulation.
183     The first word is either "Interior" or "Exterior", depending on
184     whether the zone is to be observed from the inside or the outside,
185     respectively.
186     (A single letter may be given, and case does not matter.)\0
187     The following six numbers are the minimum and maximum
188     X coordinates, minimum and maximum Y, and minimum and maximum Z
189     for the zone perimeter.
190     It is important to give the zone as it is used to determine many of
191     the rendering parameters.
192     The default exterior zone is the bounding cube for the scene as
193     computed by
194     .I oconv.
195     .TP
196     .BR EXPOSURE
197     This variable tells
198     .I rad
199     how to adjust the exposure for display.
200     It is important to set this variable properly as it is used to
201     determine the ambient value.
202     An appropriate setting may be discovered by running
203 greg 1.4 .I rvu
204 greg 1.1 and noting the exposure given by the "exposure =" command.
205     As in
206 greg 1.4 .I rvu
207 greg 1.1 and
208     .I pfilt,
209     the exposure setting may be given either as a multiplier or as a
210 greg 1.5 number of f\-stop adjustments (eg. +2 or \-1.5).
211 greg 1.1 There is no default value for this variable.
212     If it is not given, an average level will be computed by
213     .I pfilt
214     and the ambient value will be set to 10 for exterior zones
215     and 0.01 for interior zones.
216     .TP
217     .BR EYESEP
218     The interocular spacing for stereo viewing.
219     I.e., the world distance between the pupils of the left and right eyes.
220     The default value is the sum of the three "ZONE" dimensions divided by 100.
221     .TP
222     .BR scene
223     This variable is used to specify one or more scene input files.
224     These files will be given together with the materials file(s)
225     and any options specified by the "oconv" variable to
226     .I oconv
227     to produce the octree given by the "OCTREE" variable.
228     In-line commands may be specified in quotes instead of a file,
229     beginning with an exclamation mark ('!').
230     If the "scene" variable is not present, then the octree must already exist
231     in order for
232     .I rad
233     to work.
234     Even if this variable is given,
235     .I oconv
236     will not be run unless the octree is out of date with respect to
237     the input files.
238     Note that the order of files in this variable is important for
239     .I oconv
240     to work properly, and files given in later variable assignments will
241     appear after previous ones on the
242     .I oconv
243     command line.
244     .TP
245     .BR materials
246     This variable is used to specify files that, although they must
247     appear on the
248     .I oconv
249     command line, do not affect the actual octree itself.
250     Keeping the materials in separate files allows them to be modified
251     without requiring the octree to be rebuilt (a sometimes costly
252     procedure).
253     These files should not contain any geometry, and the
254     .I \-f
255     option must not be given in the "oconv" variable for this to work.
256     .TP
257     .BR illum
258     This variable is used to specify files with surfaces to be converted into
259     illum sources by
260     .I mkillum(1).
261     When this variable is given, additional octree files will be created
262     to contain the scene before and after illum source conversion.
263     These files will be named according to the (default) value of the
264     .I OCTREEE
265     variable, with either a '0' or a '1' appearing just before the file
266     type suffix (usually ".oct").
267     .TP
268     .BR objects
269     This variable is used for files that, although they do not appear
270     on the
271     .I oconv
272     command line, contain geometric information that is referenced
273     indirectly by the scene files.
274     If any of these files is changed, the octree will be rebuilt.
275     (The
276     .I raddepend(1)
277     command may be used to find these dependencies automatically.)\0
278     .TP
279     .BR view
280     This variable is used to specify a desired view for this zone.
281     Any number of "view" lines may be given, and each will result in a
282     rendered picture (unless the
283     .I \-v
284     or
285     .I \-o
286     option is specified).
287     The value for this variable is an optional identifier followed by
288     any number of view options (see
289     .I rpict(1)
290     for a complete listing).
291     The identifier is used in file naming and associating a desired view
292     with the
293     .I \-v
294     command line option.
295     Also, there are several standard view identifiers defined by
296     .I rad.
297     These standard views are specified by strings of the form
298 greg 1.6 "[Xx]?[Yy]?[Zz]?[vlcahs]?".
299 greg 1.1 (That is, an optional upper or lower case X followed by an optional
300     upper or lower case Y followed by an optional upper or lower case Z
301     followed by an optional lower case V, L, C, A or H.)\0
302     The letters indicate the desired view position, where upper case X
303     means maximum X, lower case means minimum and so on.
304     The final letter is the view type, where 'v' is perspective (the
305     default), 'l' is parallel, 'c' is a cylindrical panorama,
306 greg 1.6 'a' is angular fisheye, 'h' is hemispherical fisheye, and 's'
307     is a planisphere (stereographic) fisheye.
308 greg 1.1 A perspective view from maximum X, minimum Y would be "Xy" or "Xyv".
309     A parallel view from maximum Z would be "Zl".
310     If "ZONE" is an interior zone, the standard views will
311     be inside the perimeter.
312     If it is an exterior zone, the standard views will be outside.
313     Note that the standard views are best used as starting points,
314     and additional arguments may be given after the
315     identifier to modify a standard view to suit a particular model.
316     The default view is "X" if no views are specified.
317     A single specified view of "0" means no views will be automatically
318     generated.
319     .TP
320     .BR UP
321     The vertical axis for this scene.
322 greg 1.5 A negative axis may be specified with a minus sign (eg. "\-Y").
323 greg 1.1 There is no default value for this variable, although the standard
324     views assume Z is up if no other axis is specified.
325     .TP
326     .BR RESOLUTION
327     This variable specifies the desired final picture resolution.
328     If only a single number is given, this value will be used for both
329     the horizontal and vertical picture dimensions.
330     If two numbers are given, the first is the horizontal resolution and
331     the second is the vertical resolution.
332     If three numbers are given, the third is taken as the pixel aspect
333     ratio for the final picture (a real value).
334     If the pixel aspect ratio is zero, the exact dimensions given will
335     be those produced.
336     Otherwise, they will be used as a frame in which the final image
337     must fit.
338     The default value for this variable is 512.
339     .TP
340     .BR QUALITY
341     This variable sets the overall rendering quality desired.
342     It can have one of three values, "LOW", "MEDIUM" or "HIGH".
343     These may be abbreviated by their first letter, and may be
344     in upper or lower case.
345     Most of the rendering options will be affected by this setting.
346     The default value is "L".
347     .TP
348     .BR PENUMBRAS
349     This is a boolean variable indicating whether or not penumbras are
350     desired.
351     A value of "TRUE" will result in penumbras (soft shadows), and a
352     value of "FALSE" will result in no penumbras (sharp shadows).
353     True and false may be written in upper or lower case, and may be
354     abbreviated by a single letter.
355     Renderings generally proceed much faster without penumbras.
356     The default value is "F".
357     .TP
358     .BR INDIRECT
359     This variable indicates how many diffuse reflections are important in the
360     general lighting of this zone.
361     A direct lighting system (eg. fluorescent troffers recessed in the
362     ceiling) corresponds to an indirect level of 0.
363     An indirect lighting system (eg. hanging fluorescents directed at a
364     reflective ceiling) corresponds to an indirect level of 1.
365     A diffuse light shelf reflecting sunlight onto the ceiling would
366     correspond to an indirect level of 2.
367     The setting of this variable partially determines how many interreflections
368     will be calculated.
369     The default value is 0.
370     .TP
371     .BR PICTURE
372     This is the root name of the output picture file(s).
373     This name will have appended the view identifier (or a number if no
374 greg 1.7 id was used) and a ".hdr" suffix.
375 greg 1.1 If a picture corresponding to a specific view exists and is not out
376     of date with respect to the given octree, it will not be
377     re-rendered.
378     The default value for this variable is the root portion of
379     .I rfile.
380     .TP
381     .BR RAWFILE
382     This is the root name of the finished, raw
383     .I rpict
384     output file.
385     If specified,
386     .I rad
387     will rename the original
388     .I rpict
389     output file once it is finished and filtered
390     rather than removing it, which is the default action.
391     The given root name will be expanded in the same way as the
392     "PICTURE" variable, and if the "RAWFILE" and "PICTURE" variables
393     are identical, then no filtering will take place.
394     .TP
395     .BR ZFILE
396     This is the root name of the raw distance file produced by the
397     .I \-z
398     option of
399     .I rpict.
400     To this root name, an underscore plus the view name plus a ".zbf"
401     suffix will be added.
402     If no "ZFILE" is specified, none will be produced.
403     .TP
404     .BR AMBFILE
405     This is the name of the file where "ambient" or diffuse interreflection
406     values will be stored by
407     .I rpict
408     or
409 greg 1.4 .I rvu.
410 greg 1.1 Although it is not required, an ambient file should be given whenever
411     an interreflection calculation is expected.
412     This will optimize successive runs and minimize artifacts.
413     An interreflection calculation will take place when the
414     "QUALITY" variable is set to HIGH, or when the "QUALITY"
415     variable is set to MEDIUM and "INDIRECT" is positive.
416     There is no default value for this variable.
417     .TP
418     .BR DETAIL
419     This variable specifies the level of visual detail in this zone,
420     and is used to determine image sampling rate, among other things.
421     If there are few surfaces and simple shading, then this should be set
422     to LOW.
423     For a zone with some furniture it might be set to MEDIUM.
424     If the space is very cluttered or contains a lot of geometric detail
425     and textures, then it should be set to HIGH.
426     The default value is "M".
427     .TP
428     .BR VARIABILITY
429     This variable tells
430     .I rad
431     how much light varies over the surfaces of this zone, and is
432     used to determine what level of sampling is necessary in the
433     indirect calculation.
434     For an electric lighting system with uniform coverage, the value
435     should be set to LOW.
436     For a space with spot lighting or a window with sky illumination
437     only, it might be set to MEDIUM.
438     For a space with penetrating sunlight casting bright patches in a
439     few places, it should be set to HIGH.
440     The default value is "L".
441     .TP
442     .BR OPTFILE
443     This is the name of a file in which
444     .I rad
445     will place the appropriate rendering options.
446     This file can later be accessed by
447     .I rpict
448     or
449 greg 1.4 .I rvu
450 greg 1.1 in subsequent manual runs using the at-sign ('@') file insert option.
451     (Using an "OPTFILE" also reduces the length of the rendering
452     command, which improves appearance and may even be necessary on some
453     systems.)\0
454     There is no default value for this variable.
455     .TP
456     .BR REPORT
457     This variable may be used to specify a reporting interval for
458     batch rendering.
459     Given in minutes, this value is multiplied by 60 and passed to
460     .I rpict
461     with the
462     .I \-t
463     option.
464     If a filename is given after the interval, it will be used as the
465     error file for reports and error messages instead of the standard error.
466     (See the
467     .I \-e
468     option of
469     .I rpict(1).\)\0
470     There is no default value for this variable.
471     .TP
472     .BR oconv
473     This variable may be used to specify special options to
474     .I oconv.
475 greg 1.8 If the first word of the first instance of this variable is not an option,
476     it will be used in place of the default command path, "oconv".
477 greg 1.1 See the
478     .I oconv(1)
479     manual page for a list of valid options.
480     .TP
481     .BR mkillum
482     This variable may be used to specify additional options to
483     .I mkillum.
484 greg 1.8 If the first word of the first instance of this variable is not an option,
485     it will be used in place of the default command path, "mkillum".
486 greg 1.1 See the
487     .I rtrace(1)
488     manual page for a list of valid options.
489     .TP
490     .BR render
491     This variable may be used to specify additional options to
492     .I rpict
493     or
494 greg 1.4 .I rvu.
495 greg 1.1 These options will appear after the options set automatically by
496     .I rad,
497     and thus will override the default values.
498     .TP
499 greg 1.8 .BR rpict
500     This variable may be used to specify overriding options specific to
501     .I rpict.
502     If the first word of the first instance of this variable is not an option,
503     it will be used in place of the default command path, "rpict".
504     See the
505     .I rpict(1)
506     man page for a list of valid options.
507     .TP
508     .BR rvu
509     This variable may be used to specify overriding options specific to
510     .I rvu.
511     If the first word of the first instance of this variable is not an option,
512     it will be used in place of the default command path, "rvu".
513     See the
514     .I rvu(1)
515     man page for a list of valid options.
516     .TP
517 greg 1.1 .BR pfilt
518     This variable may be used to specify additional options to
519     .I pfilt.
520 greg 1.8 If the first word of the first instance of this variable is not an option,
521     it will be used in place of the default command path, "pfilt".
522 greg 1.1 See the
523     .I pfilt(1)
524     manual page for details.
525     .SH EXAMPLES
526     A minimal input file for
527     .I rad
528     might look like this:
529     .IP "" .3i
530     .nf
531     ::::::::::
532     sample.rif
533     ::::::::::
534     # The octree we want to use:
535     OCTREE= tutor.oct # w/o this line, name would be "sample.oct"
536     # Our scene input files:
537     scene= sky.rad outside.rad room.rad srcwindow.rad
538     # The interior zone cavity:
539     ZONE= I 0 3 0 2 0 1.75 # default would be scene bounding cube
540     # The z-axis is up:
541     UP= Z # no default - would use view spec.
542     # Our exposure needs one f-stop boost:
543     EXPOSURE= +1 # default is computed ex post facto
544     .fi
545     .PP
546     Note that we have not specified any views in the file above.
547     The standard default view "X" would be used if we were to run
548     .I rad
549     on this file.
550     If we only want to see what default values
551     .I rad
552     would use without actually executing anything, we can invoke it thus:
553     .IP "" .2i
554 greg 1.5 rad \-n \-e sample.rif
555 greg 1.1 .PP
556     This will print the variables we have given as well as default
557     values
558     .I rad
559     has assigned for us.
560     Also, we will see the list of commands that
561     .I rad
562     would have executed had the
563     .I \-n
564     option not been present.
565     (Note if the octree, "tutor.oct", is not present, an error will
566     result as it is needed to determine some of the opiton settings.)\0
567     .PP
568     Different option combinations have specific uses, ie:
569     .IP "" .2i
570     .br
571 greg 1.5 rad \-v 0 sample.rif OPT=samp.opt # build octree, put options in "sample.opt"
572 greg 1.1 .br
573 greg 1.5 rad \-n \-e \-s sample.rif > full.rif # make a complete rad file
574 greg 1.1 .br
575 greg 1.5 rad \-n sample.rif > script.sh # make a script of commands
576 greg 1.1 .br
577 greg 1.5 rad \-V \-v Zl \-n \-s sample.rif > plan.vf # make a plan view file
578 greg 1.1 .br
579 greg 1.5 rad \-t sample.rif # update files after minor change to input
580 greg 1.1 .br
581 greg 1.5 rad \-s sample.rif & # execute silently in the background
582 greg 1.9 .br
583     rad \-N 2 sample.rif # render views using two parallel rpict calls
584     .br
585     rad \-N 4 -v 1 sample.rif # render first view with four rpiece calls
586 greg 1.1 .PP
587     If we decide that the default values
588     .I rad
589     has chosen for our variables are not all appropriate, we can add
590     some more assignments to the file:
591     .IP "" .3i
592     .nf
593     QUAL= MED # default was low
594     DET= low # default was medium - our space is almost empty
595     PEN= True # we want to see soft shadows from our window
596     VAR= hi # daylight can result in fairly harsh lighting
597 greg 1.5 view= XYa \-vv 120 # let's try a fisheye view
598 greg 1.7 PICT= tutor # our picture name will be "tutor_XYa.hdr"
599 greg 1.1 .fi
600     .PP
601     Note the use of abbreviations, and the modification of a standard
602     view.
603     Now we can invoke
604     .I rad
605     to take a look at our scene interactively with
606 greg 1.4 .I rvu:
607 greg 1.1 .IP "" .2i
608 greg 1.5 rad \-o x11 sample.rif
609 greg 1.1 .PP
610     .I Rad
611     will run
612     .I oconv
613     first to create the octree (assuming it doesn't
614     already exist), then
615 greg 1.4 .I rvu
616 greg 1.1 with a long list of options.
617     Let's say that from within
618 greg 1.4 .I rvu,
619 greg 1.1 we wrote out the view files "view1.vp" and "view2.vp".
620     We could add these to "sample.rif" like so:
621     .IP "" .2i
622     .nf
623 greg 1.5 view= vw1 \-vf view1.vp # Our first view
624     view= vw2 \-vf view2.vp # Our second view
625 greg 1.1 RESOLUTION= 1024 # Let's go for a higher resolution result
626     .fi
627     .PP
628     To start
629 greg 1.4 .I rvu
630 greg 1.1 again using vw2 instead of the default, we use:
631     .IP "" .2i
632 greg 1.5 rad \-o x11 \-v vw2 sample.rif
633 greg 1.1 .PP
634     Once we are happy with the variable settings in our file, we can run
635     .I rad
636     in the background to produce one image for each view:
637     .IP "" .2i
638     rad sample.rif REP=5 >& errfile &
639     .PP
640     This will report progress every five minutes to "errfile".
641     .SH FILES
642     $(PICTURE)_$(view).unf Unfinished output of
643     .I rpict
644     .SH AUTHOR
645     Greg Ward
646     .SH BUGS
647 greg 1.9 You cannot run more than one
648     .I rad
649     process at a time on the same input file,
650     as the second process will attempt to recover the output files
651     of the first process, damaging the results.
652     The exceptions to this are running interactively via the
653     .I \-o
654     option, or rendering different views using the
655     .I \-v
656     option.
657     .PP
658 greg 1.1 Incremental building of octrees is not supported as it would add
659     considerable complexity to
660     .I rad.
661     Complicated scene builds should still be left to
662     .I make(1),
663     which has a robust mechanism for handling hierarchical
664     dependencies.
665     If
666     .I make
667     is used in this fashion, then only the
668     "OCTREE" variable of
669     .I rad
670     is needed.
671     .PP
672     The use of some
673     .I pfilt
674     options is awkward, since the "EXPOSURE" variable results in a
675     single pass invocation (the
676     .I \-1
677     option of
678     .I pfilt\)
679     and two passes are necessary for certain effects, such as star
680     patterns.
681     The way around this problem is to specify
682     a "RAWFILE" that is the same as the "PICTURE" variable so that no
683     filtering takes place, then call
684     .I pfilt
685     manually.
686     This is preferable to leaving out the
687     "EXPOSURE" variable, since the exposure level is needed to
688     accurately determine the ambient value for
689     .I rpict.
690     .PP
691     The use of upper and lower case naming for the standard views may be
692     problematic on systems that don't distinguish case in filenames.
693     .SH "SEE ALSO"
694     glrad(1), make(1), mkillum(1), objview(1), oconv(1),
695     pfilt(1), raddepend(1), ranimate(1),
696 greg 1.9 rholo(1), rpict(1), rpiece(1), rtrace(1), rvu(1),
697     touch(1), vgaimage(1), ximage(1)