ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rad.1
Revision: 1.1
Committed: Tue Mar 11 19:20:21 2003 UTC (21 years, 2 months ago) by greg
Branch: MAIN
CVS Tags: rad3R5
Log Message:
Added documentation to repository

File Contents

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