ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rad.1
Revision: 1.6
Committed: Tue Mar 11 02:21:45 2008 UTC (16 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: rad3R9
Changes since 1.5: +4 -3 lines
Log Message:
Added planisphere view type (-vts option) as requested by Axel Jacobs

File Contents

# Content
1 .\" RCSid "$Id: rad.1,v 1.5 2007/09/04 17:36:40 greg Exp $"
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|-N npr"
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 rvu(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 \-N
61 option instructs
62 .I rad
63 to run as many as
64 .I npr
65 rendering processes in parallel.
66 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 .I rvu
135 (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 .I rvu
204 and noting the exposure given by the "exposure =" command.
205 As in
206 .I rvu
207 and
208 .I pfilt,
209 the exposure setting may be given either as a multiplier or as a
210 number of f\-stop adjustments (eg. +2 or \-1.5).
211 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 "[Xx]?[Yy]?[Zz]?[vlcahs]?".
299 (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 'a' is angular fisheye, 'h' is hemispherical fisheye, and 's'
307 is a planisphere (stereographic) fisheye.
308 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 A negative axis may be specified with a minus sign (eg. "\-Y").
323 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 id was used) and a ".pic" suffix.
375 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 .I rvu.
410 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 .I rvu
450 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 See the
476 .I oconv(1)
477 manual page for a list of valid options.
478 .TP
479 .BR mkillum
480 This variable may be used to specify additional options to
481 .I mkillum.
482 See the
483 .I rtrace(1)
484 manual page for a list of valid options.
485 .TP
486 .BR render
487 This variable may be used to specify additional options to
488 .I rpict
489 or
490 .I rvu.
491 These options will appear after the options set automatically by
492 .I rad,
493 and thus will override the default values.
494 .TP
495 .BR pfilt
496 This variable may be used to specify additional options to
497 .I pfilt.
498 See the
499 .I pfilt(1)
500 manual page for details.
501 .SH EXAMPLES
502 A minimal input file for
503 .I rad
504 might look like this:
505 .IP "" .3i
506 .nf
507 ::::::::::
508 sample.rif
509 ::::::::::
510 # The octree we want to use:
511 OCTREE= tutor.oct # w/o this line, name would be "sample.oct"
512 # Our scene input files:
513 scene= sky.rad outside.rad room.rad srcwindow.rad
514 # The interior zone cavity:
515 ZONE= I 0 3 0 2 0 1.75 # default would be scene bounding cube
516 # The z-axis is up:
517 UP= Z # no default - would use view spec.
518 # Our exposure needs one f-stop boost:
519 EXPOSURE= +1 # default is computed ex post facto
520 .fi
521 .PP
522 Note that we have not specified any views in the file above.
523 The standard default view "X" would be used if we were to run
524 .I rad
525 on this file.
526 If we only want to see what default values
527 .I rad
528 would use without actually executing anything, we can invoke it thus:
529 .IP "" .2i
530 rad \-n \-e sample.rif
531 .PP
532 This will print the variables we have given as well as default
533 values
534 .I rad
535 has assigned for us.
536 Also, we will see the list of commands that
537 .I rad
538 would have executed had the
539 .I \-n
540 option not been present.
541 (Note if the octree, "tutor.oct", is not present, an error will
542 result as it is needed to determine some of the opiton settings.)\0
543 .PP
544 Different option combinations have specific uses, ie:
545 .IP "" .2i
546 .br
547 rad \-v 0 sample.rif OPT=samp.opt # build octree, put options in "sample.opt"
548 .br
549 rad \-n \-e \-s sample.rif > full.rif # make a complete rad file
550 .br
551 rad \-n sample.rif > script.sh # make a script of commands
552 .br
553 rad \-V \-v Zl \-n \-s sample.rif > plan.vf # make a plan view file
554 .br
555 rad \-t sample.rif # update files after minor change to input
556 .br
557 rad \-s sample.rif & # execute silently in the background
558 .PP
559 If we decide that the default values
560 .I rad
561 has chosen for our variables are not all appropriate, we can add
562 some more assignments to the file:
563 .IP "" .3i
564 .nf
565 QUAL= MED # default was low
566 DET= low # default was medium - our space is almost empty
567 PEN= True # we want to see soft shadows from our window
568 VAR= hi # daylight can result in fairly harsh lighting
569 view= XYa \-vv 120 # let's try a fisheye view
570 PICT= tutor # our picture name will be "tutor_XYa.pic"
571 .fi
572 .PP
573 Note the use of abbreviations, and the modification of a standard
574 view.
575 Now we can invoke
576 .I rad
577 to take a look at our scene interactively with
578 .I rvu:
579 .IP "" .2i
580 rad \-o x11 sample.rif
581 .PP
582 .I Rad
583 will run
584 .I oconv
585 first to create the octree (assuming it doesn't
586 already exist), then
587 .I rvu
588 with a long list of options.
589 Let's say that from within
590 .I rvu,
591 we wrote out the view files "view1.vp" and "view2.vp".
592 We could add these to "sample.rif" like so:
593 .IP "" .2i
594 .nf
595 view= vw1 \-vf view1.vp # Our first view
596 view= vw2 \-vf view2.vp # Our second view
597 RESOLUTION= 1024 # Let's go for a higher resolution result
598 .fi
599 .PP
600 To start
601 .I rvu
602 again using vw2 instead of the default, we use:
603 .IP "" .2i
604 rad \-o x11 \-v vw2 sample.rif
605 .PP
606 Once we are happy with the variable settings in our file, we can run
607 .I rad
608 in the background to produce one image for each view:
609 .IP "" .2i
610 rad sample.rif REP=5 >& errfile &
611 .PP
612 This will report progress every five minutes to "errfile".
613 .SH FILES
614 $(PICTURE)_$(view).unf Unfinished output of
615 .I rpict
616 .SH AUTHOR
617 Greg Ward
618 .SH BUGS
619 Incremental building of octrees is not supported as it would add
620 considerable complexity to
621 .I rad.
622 Complicated scene builds should still be left to
623 .I make(1),
624 which has a robust mechanism for handling hierarchical
625 dependencies.
626 If
627 .I make
628 is used in this fashion, then only the
629 "OCTREE" variable of
630 .I rad
631 is needed.
632 .PP
633 The use of some
634 .I pfilt
635 options is awkward, since the "EXPOSURE" variable results in a
636 single pass invocation (the
637 .I \-1
638 option of
639 .I pfilt\)
640 and two passes are necessary for certain effects, such as star
641 patterns.
642 The way around this problem is to specify
643 a "RAWFILE" that is the same as the "PICTURE" variable so that no
644 filtering takes place, then call
645 .I pfilt
646 manually.
647 This is preferable to leaving out the
648 "EXPOSURE" variable, since the exposure level is needed to
649 accurately determine the ambient value for
650 .I rpict.
651 .PP
652 The use of upper and lower case naming for the standard views may be
653 problematic on systems that don't distinguish case in filenames.
654 .SH "SEE ALSO"
655 glrad(1), make(1), mkillum(1), objview(1), oconv(1),
656 pfilt(1), raddepend(1), ranimate(1),
657 rholo(1), rpict(1), rtrace(1), rvu(1), touch(1), vgaimage(1), ximage(1)