1 |
greg |
1.5 |
.\" RCSid "$Id: rad.1,v 1.4 2004/01/01 19:31:45 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 |
|
|
"[Xx]?[Yy]?[Zz]?[vlcah]?". |
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, and 'h' is hemispherical fisheye. |
307 |
|
|
A perspective view from maximum X, minimum Y would be "Xy" or "Xyv". |
308 |
|
|
A parallel view from maximum Z would be "Zl". |
309 |
|
|
If "ZONE" is an interior zone, the standard views will |
310 |
|
|
be inside the perimeter. |
311 |
|
|
If it is an exterior zone, the standard views will be outside. |
312 |
|
|
Note that the standard views are best used as starting points, |
313 |
|
|
and additional arguments may be given after the |
314 |
|
|
identifier to modify a standard view to suit a particular model. |
315 |
|
|
The default view is "X" if no views are specified. |
316 |
|
|
A single specified view of "0" means no views will be automatically |
317 |
|
|
generated. |
318 |
|
|
.TP |
319 |
|
|
.BR UP |
320 |
|
|
The vertical axis for this scene. |
321 |
greg |
1.5 |
A negative axis may be specified with a minus sign (eg. "\-Y"). |
322 |
greg |
1.1 |
There is no default value for this variable, although the standard |
323 |
|
|
views assume Z is up if no other axis is specified. |
324 |
|
|
.TP |
325 |
|
|
.BR RESOLUTION |
326 |
|
|
This variable specifies the desired final picture resolution. |
327 |
|
|
If only a single number is given, this value will be used for both |
328 |
|
|
the horizontal and vertical picture dimensions. |
329 |
|
|
If two numbers are given, the first is the horizontal resolution and |
330 |
|
|
the second is the vertical resolution. |
331 |
|
|
If three numbers are given, the third is taken as the pixel aspect |
332 |
|
|
ratio for the final picture (a real value). |
333 |
|
|
If the pixel aspect ratio is zero, the exact dimensions given will |
334 |
|
|
be those produced. |
335 |
|
|
Otherwise, they will be used as a frame in which the final image |
336 |
|
|
must fit. |
337 |
|
|
The default value for this variable is 512. |
338 |
|
|
.TP |
339 |
|
|
.BR QUALITY |
340 |
|
|
This variable sets the overall rendering quality desired. |
341 |
|
|
It can have one of three values, "LOW", "MEDIUM" or "HIGH". |
342 |
|
|
These may be abbreviated by their first letter, and may be |
343 |
|
|
in upper or lower case. |
344 |
|
|
Most of the rendering options will be affected by this setting. |
345 |
|
|
The default value is "L". |
346 |
|
|
.TP |
347 |
|
|
.BR PENUMBRAS |
348 |
|
|
This is a boolean variable indicating whether or not penumbras are |
349 |
|
|
desired. |
350 |
|
|
A value of "TRUE" will result in penumbras (soft shadows), and a |
351 |
|
|
value of "FALSE" will result in no penumbras (sharp shadows). |
352 |
|
|
True and false may be written in upper or lower case, and may be |
353 |
|
|
abbreviated by a single letter. |
354 |
|
|
Renderings generally proceed much faster without penumbras. |
355 |
|
|
The default value is "F". |
356 |
|
|
.TP |
357 |
|
|
.BR INDIRECT |
358 |
|
|
This variable indicates how many diffuse reflections are important in the |
359 |
|
|
general lighting of this zone. |
360 |
|
|
A direct lighting system (eg. fluorescent troffers recessed in the |
361 |
|
|
ceiling) corresponds to an indirect level of 0. |
362 |
|
|
An indirect lighting system (eg. hanging fluorescents directed at a |
363 |
|
|
reflective ceiling) corresponds to an indirect level of 1. |
364 |
|
|
A diffuse light shelf reflecting sunlight onto the ceiling would |
365 |
|
|
correspond to an indirect level of 2. |
366 |
|
|
The setting of this variable partially determines how many interreflections |
367 |
|
|
will be calculated. |
368 |
|
|
The default value is 0. |
369 |
|
|
.TP |
370 |
|
|
.BR PICTURE |
371 |
|
|
This is the root name of the output picture file(s). |
372 |
|
|
This name will have appended the view identifier (or a number if no |
373 |
|
|
id was used) and a ".pic" suffix. |
374 |
|
|
If a picture corresponding to a specific view exists and is not out |
375 |
|
|
of date with respect to the given octree, it will not be |
376 |
|
|
re-rendered. |
377 |
|
|
The default value for this variable is the root portion of |
378 |
|
|
.I rfile. |
379 |
|
|
.TP |
380 |
|
|
.BR RAWFILE |
381 |
|
|
This is the root name of the finished, raw |
382 |
|
|
.I rpict |
383 |
|
|
output file. |
384 |
|
|
If specified, |
385 |
|
|
.I rad |
386 |
|
|
will rename the original |
387 |
|
|
.I rpict |
388 |
|
|
output file once it is finished and filtered |
389 |
|
|
rather than removing it, which is the default action. |
390 |
|
|
The given root name will be expanded in the same way as the |
391 |
|
|
"PICTURE" variable, and if the "RAWFILE" and "PICTURE" variables |
392 |
|
|
are identical, then no filtering will take place. |
393 |
|
|
.TP |
394 |
|
|
.BR ZFILE |
395 |
|
|
This is the root name of the raw distance file produced by the |
396 |
|
|
.I \-z |
397 |
|
|
option of |
398 |
|
|
.I rpict. |
399 |
|
|
To this root name, an underscore plus the view name plus a ".zbf" |
400 |
|
|
suffix will be added. |
401 |
|
|
If no "ZFILE" is specified, none will be produced. |
402 |
|
|
.TP |
403 |
|
|
.BR AMBFILE |
404 |
|
|
This is the name of the file where "ambient" or diffuse interreflection |
405 |
|
|
values will be stored by |
406 |
|
|
.I rpict |
407 |
|
|
or |
408 |
greg |
1.4 |
.I rvu. |
409 |
greg |
1.1 |
Although it is not required, an ambient file should be given whenever |
410 |
|
|
an interreflection calculation is expected. |
411 |
|
|
This will optimize successive runs and minimize artifacts. |
412 |
|
|
An interreflection calculation will take place when the |
413 |
|
|
"QUALITY" variable is set to HIGH, or when the "QUALITY" |
414 |
|
|
variable is set to MEDIUM and "INDIRECT" is positive. |
415 |
|
|
There is no default value for this variable. |
416 |
|
|
.TP |
417 |
|
|
.BR DETAIL |
418 |
|
|
This variable specifies the level of visual detail in this zone, |
419 |
|
|
and is used to determine image sampling rate, among other things. |
420 |
|
|
If there are few surfaces and simple shading, then this should be set |
421 |
|
|
to LOW. |
422 |
|
|
For a zone with some furniture it might be set to MEDIUM. |
423 |
|
|
If the space is very cluttered or contains a lot of geometric detail |
424 |
|
|
and textures, then it should be set to HIGH. |
425 |
|
|
The default value is "M". |
426 |
|
|
.TP |
427 |
|
|
.BR VARIABILITY |
428 |
|
|
This variable tells |
429 |
|
|
.I rad |
430 |
|
|
how much light varies over the surfaces of this zone, and is |
431 |
|
|
used to determine what level of sampling is necessary in the |
432 |
|
|
indirect calculation. |
433 |
|
|
For an electric lighting system with uniform coverage, the value |
434 |
|
|
should be set to LOW. |
435 |
|
|
For a space with spot lighting or a window with sky illumination |
436 |
|
|
only, it might be set to MEDIUM. |
437 |
|
|
For a space with penetrating sunlight casting bright patches in a |
438 |
|
|
few places, it should be set to HIGH. |
439 |
|
|
The default value is "L". |
440 |
|
|
.TP |
441 |
|
|
.BR OPTFILE |
442 |
|
|
This is the name of a file in which |
443 |
|
|
.I rad |
444 |
|
|
will place the appropriate rendering options. |
445 |
|
|
This file can later be accessed by |
446 |
|
|
.I rpict |
447 |
|
|
or |
448 |
greg |
1.4 |
.I rvu |
449 |
greg |
1.1 |
in subsequent manual runs using the at-sign ('@') file insert option. |
450 |
|
|
(Using an "OPTFILE" also reduces the length of the rendering |
451 |
|
|
command, which improves appearance and may even be necessary on some |
452 |
|
|
systems.)\0 |
453 |
|
|
There is no default value for this variable. |
454 |
|
|
.TP |
455 |
|
|
.BR REPORT |
456 |
|
|
This variable may be used to specify a reporting interval for |
457 |
|
|
batch rendering. |
458 |
|
|
Given in minutes, this value is multiplied by 60 and passed to |
459 |
|
|
.I rpict |
460 |
|
|
with the |
461 |
|
|
.I \-t |
462 |
|
|
option. |
463 |
|
|
If a filename is given after the interval, it will be used as the |
464 |
|
|
error file for reports and error messages instead of the standard error. |
465 |
|
|
(See the |
466 |
|
|
.I \-e |
467 |
|
|
option of |
468 |
|
|
.I rpict(1).\)\0 |
469 |
|
|
There is no default value for this variable. |
470 |
|
|
.TP |
471 |
|
|
.BR oconv |
472 |
|
|
This variable may be used to specify special options to |
473 |
|
|
.I oconv. |
474 |
|
|
See the |
475 |
|
|
.I oconv(1) |
476 |
|
|
manual page for a list of valid options. |
477 |
|
|
.TP |
478 |
|
|
.BR mkillum |
479 |
|
|
This variable may be used to specify additional options to |
480 |
|
|
.I mkillum. |
481 |
|
|
See the |
482 |
|
|
.I rtrace(1) |
483 |
|
|
manual page for a list of valid options. |
484 |
|
|
.TP |
485 |
|
|
.BR render |
486 |
|
|
This variable may be used to specify additional options to |
487 |
|
|
.I rpict |
488 |
|
|
or |
489 |
greg |
1.4 |
.I rvu. |
490 |
greg |
1.1 |
These options will appear after the options set automatically by |
491 |
|
|
.I rad, |
492 |
|
|
and thus will override the default values. |
493 |
|
|
.TP |
494 |
|
|
.BR pfilt |
495 |
|
|
This variable may be used to specify additional options to |
496 |
|
|
.I pfilt. |
497 |
|
|
See the |
498 |
|
|
.I pfilt(1) |
499 |
|
|
manual page for details. |
500 |
|
|
.SH EXAMPLES |
501 |
|
|
A minimal input file for |
502 |
|
|
.I rad |
503 |
|
|
might look like this: |
504 |
|
|
.IP "" .3i |
505 |
|
|
.nf |
506 |
|
|
:::::::::: |
507 |
|
|
sample.rif |
508 |
|
|
:::::::::: |
509 |
|
|
# The octree we want to use: |
510 |
|
|
OCTREE= tutor.oct # w/o this line, name would be "sample.oct" |
511 |
|
|
# Our scene input files: |
512 |
|
|
scene= sky.rad outside.rad room.rad srcwindow.rad |
513 |
|
|
# The interior zone cavity: |
514 |
|
|
ZONE= I 0 3 0 2 0 1.75 # default would be scene bounding cube |
515 |
|
|
# The z-axis is up: |
516 |
|
|
UP= Z # no default - would use view spec. |
517 |
|
|
# Our exposure needs one f-stop boost: |
518 |
|
|
EXPOSURE= +1 # default is computed ex post facto |
519 |
|
|
.fi |
520 |
|
|
.PP |
521 |
|
|
Note that we have not specified any views in the file above. |
522 |
|
|
The standard default view "X" would be used if we were to run |
523 |
|
|
.I rad |
524 |
|
|
on this file. |
525 |
|
|
If we only want to see what default values |
526 |
|
|
.I rad |
527 |
|
|
would use without actually executing anything, we can invoke it thus: |
528 |
|
|
.IP "" .2i |
529 |
greg |
1.5 |
rad \-n \-e sample.rif |
530 |
greg |
1.1 |
.PP |
531 |
|
|
This will print the variables we have given as well as default |
532 |
|
|
values |
533 |
|
|
.I rad |
534 |
|
|
has assigned for us. |
535 |
|
|
Also, we will see the list of commands that |
536 |
|
|
.I rad |
537 |
|
|
would have executed had the |
538 |
|
|
.I \-n |
539 |
|
|
option not been present. |
540 |
|
|
(Note if the octree, "tutor.oct", is not present, an error will |
541 |
|
|
result as it is needed to determine some of the opiton settings.)\0 |
542 |
|
|
.PP |
543 |
|
|
Different option combinations have specific uses, ie: |
544 |
|
|
.IP "" .2i |
545 |
|
|
.br |
546 |
greg |
1.5 |
rad \-v 0 sample.rif OPT=samp.opt # build octree, put options in "sample.opt" |
547 |
greg |
1.1 |
.br |
548 |
greg |
1.5 |
rad \-n \-e \-s sample.rif > full.rif # make a complete rad file |
549 |
greg |
1.1 |
.br |
550 |
greg |
1.5 |
rad \-n sample.rif > script.sh # make a script of commands |
551 |
greg |
1.1 |
.br |
552 |
greg |
1.5 |
rad \-V \-v Zl \-n \-s sample.rif > plan.vf # make a plan view file |
553 |
greg |
1.1 |
.br |
554 |
greg |
1.5 |
rad \-t sample.rif # update files after minor change to input |
555 |
greg |
1.1 |
.br |
556 |
greg |
1.5 |
rad \-s sample.rif & # execute silently in the background |
557 |
greg |
1.1 |
.PP |
558 |
|
|
If we decide that the default values |
559 |
|
|
.I rad |
560 |
|
|
has chosen for our variables are not all appropriate, we can add |
561 |
|
|
some more assignments to the file: |
562 |
|
|
.IP "" .3i |
563 |
|
|
.nf |
564 |
|
|
QUAL= MED # default was low |
565 |
|
|
DET= low # default was medium - our space is almost empty |
566 |
|
|
PEN= True # we want to see soft shadows from our window |
567 |
|
|
VAR= hi # daylight can result in fairly harsh lighting |
568 |
greg |
1.5 |
view= XYa \-vv 120 # let's try a fisheye view |
569 |
greg |
1.1 |
PICT= tutor # our picture name will be "tutor_XYa.pic" |
570 |
|
|
.fi |
571 |
|
|
.PP |
572 |
|
|
Note the use of abbreviations, and the modification of a standard |
573 |
|
|
view. |
574 |
|
|
Now we can invoke |
575 |
|
|
.I rad |
576 |
|
|
to take a look at our scene interactively with |
577 |
greg |
1.4 |
.I rvu: |
578 |
greg |
1.1 |
.IP "" .2i |
579 |
greg |
1.5 |
rad \-o x11 sample.rif |
580 |
greg |
1.1 |
.PP |
581 |
|
|
.I Rad |
582 |
|
|
will run |
583 |
|
|
.I oconv |
584 |
|
|
first to create the octree (assuming it doesn't |
585 |
|
|
already exist), then |
586 |
greg |
1.4 |
.I rvu |
587 |
greg |
1.1 |
with a long list of options. |
588 |
|
|
Let's say that from within |
589 |
greg |
1.4 |
.I rvu, |
590 |
greg |
1.1 |
we wrote out the view files "view1.vp" and "view2.vp". |
591 |
|
|
We could add these to "sample.rif" like so: |
592 |
|
|
.IP "" .2i |
593 |
|
|
.nf |
594 |
greg |
1.5 |
view= vw1 \-vf view1.vp # Our first view |
595 |
|
|
view= vw2 \-vf view2.vp # Our second view |
596 |
greg |
1.1 |
RESOLUTION= 1024 # Let's go for a higher resolution result |
597 |
|
|
.fi |
598 |
|
|
.PP |
599 |
|
|
To start |
600 |
greg |
1.4 |
.I rvu |
601 |
greg |
1.1 |
again using vw2 instead of the default, we use: |
602 |
|
|
.IP "" .2i |
603 |
greg |
1.5 |
rad \-o x11 \-v vw2 sample.rif |
604 |
greg |
1.1 |
.PP |
605 |
|
|
Once we are happy with the variable settings in our file, we can run |
606 |
|
|
.I rad |
607 |
|
|
in the background to produce one image for each view: |
608 |
|
|
.IP "" .2i |
609 |
|
|
rad sample.rif REP=5 >& errfile & |
610 |
|
|
.PP |
611 |
|
|
This will report progress every five minutes to "errfile". |
612 |
|
|
.SH FILES |
613 |
|
|
$(PICTURE)_$(view).unf Unfinished output of |
614 |
|
|
.I rpict |
615 |
|
|
.SH AUTHOR |
616 |
|
|
Greg Ward |
617 |
|
|
.SH BUGS |
618 |
|
|
Incremental building of octrees is not supported as it would add |
619 |
|
|
considerable complexity to |
620 |
|
|
.I rad. |
621 |
|
|
Complicated scene builds should still be left to |
622 |
|
|
.I make(1), |
623 |
|
|
which has a robust mechanism for handling hierarchical |
624 |
|
|
dependencies. |
625 |
|
|
If |
626 |
|
|
.I make |
627 |
|
|
is used in this fashion, then only the |
628 |
|
|
"OCTREE" variable of |
629 |
|
|
.I rad |
630 |
|
|
is needed. |
631 |
|
|
.PP |
632 |
|
|
The use of some |
633 |
|
|
.I pfilt |
634 |
|
|
options is awkward, since the "EXPOSURE" variable results in a |
635 |
|
|
single pass invocation (the |
636 |
|
|
.I \-1 |
637 |
|
|
option of |
638 |
|
|
.I pfilt\) |
639 |
|
|
and two passes are necessary for certain effects, such as star |
640 |
|
|
patterns. |
641 |
|
|
The way around this problem is to specify |
642 |
|
|
a "RAWFILE" that is the same as the "PICTURE" variable so that no |
643 |
|
|
filtering takes place, then call |
644 |
|
|
.I pfilt |
645 |
|
|
manually. |
646 |
|
|
This is preferable to leaving out the |
647 |
|
|
"EXPOSURE" variable, since the exposure level is needed to |
648 |
|
|
accurately determine the ambient value for |
649 |
|
|
.I rpict. |
650 |
|
|
.PP |
651 |
|
|
The use of upper and lower case naming for the standard views may be |
652 |
|
|
problematic on systems that don't distinguish case in filenames. |
653 |
|
|
.SH "SEE ALSO" |
654 |
|
|
glrad(1), make(1), mkillum(1), objview(1), oconv(1), |
655 |
|
|
pfilt(1), raddepend(1), ranimate(1), |
656 |
greg |
1.4 |
rholo(1), rpict(1), rtrace(1), rvu(1), touch(1), vgaimage(1), ximage(1) |