ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/ranimate.1
Revision: 1.3
Committed: Tue Jan 18 03:59:40 2005 UTC (19 years, 4 months ago) by greg
Branch: MAIN
Changes since 1.2: +22 -7 lines
Log Message:
Created pmdblur script and added DBLUR variable to ranimate

File Contents

# User Rev Content
1 greg 1.3 .\" RCSid "$Id: ranimate.1,v 1.2 2003/12/09 15:59:06 greg Exp $"
2 greg 1.1 .TH RANIMATE 1 6/24/98 RADIANCE
3     .SH NAME
4     ranimate - compute a RADIANCE animation
5     .SH SYNOPSIS
6     .B ranimate
7     [
8     .B \-s
9     ][
10     .B \-n
11     ][
12     .B \-e
13     ][
14     .B \-w
15     ]
16     .B ranfile
17     .SH DESCRIPTION
18     .I Ranimate
19     is an executive program that reads the given
20     .I ranfile
21     and makes appropriate calls to
22     .I rad(1),
23     .I rpict(1),
24     .I pinterp(1),
25     and/or
26     .I pfilt(1)
27     to render an animation.
28     Variables in
29     .I ranfile
30     indicate input files, process servers (execution hosts), output
31     directories and file names, and various other controls and options.
32     .PP
33     Normally, commands are echoed to the standard output as they are
34     executed.
35     The
36     .I \-s
37     option tells
38     .I ranimate
39     to do its work silently.
40     The
41     .I \-n
42     option tells
43     .I ranimate
44     not to take any action (ie. not to actually execute any commands).
45     The
46     .I \-e
47     option tells
48     .I ranimate
49     to explicate all variables used for the animation, including
50     default values not specified in the input file, and print them on
51     the standard output.
52     .PP
53     The
54     .I \-w
55     option turns off warnings about multiply and misassigned variables.
56     .PP
57     Normally,
58     .I ranimate
59     will produce one animation frame for each view given in the specified
60     view file.
61     If an animation has ended or been killed in an incomplete state, however,
62     .I ranimate
63     will attempt to pick up where the earlier process left off.
64     If the process is still running, or was started on another machine,
65     .I ranimate
66     will report this information and exit.
67     .PP
68     Animation variable assignments appear one per line in
69     .I ranfile.
70     The name of the variable is followed by an equals sign
71     ('=') and its value(s).
72     The end of line may be escaped with a backslash ('\\'), though it is
73     not usually necessary since additional variable values may be given
74     in multiple assignments.
75     Variables that should have only one value are given in upper case.
76     Variables that may have multiple values are given in lower case.
77     Variables may be abbreviated by their first three letters, except
78     for "host", which must have all four.
79     Comments in
80     .I ranfile
81     start with a pound sign ('#') and proceed to the end of line.
82     .PP
83     The animation variables, their interpretations and default values
84     are given below.
85     .TP 10n
86     .BR DIRECTORY
87     The name of the animation directory.
88     All temporary files generated during the animation will be placed in
89     this directory, which will be created by
90     .I ranimate
91     if it does not exist.
92     A file named "STATUS" will also be created there, and will contain current
93     information about the animation process.
94     This variable has no default value, and its setting is required.
95     .TP
96     .BR OCTREE
97     The name of the octree file for a static scene walk-through
98     animation.
99     There is no default value for this variable, and any
100     setting will be ignored if the
101     .I ANIMATE
102     variable is also set (see below).
103     .TP
104     .BR ANIMATE
105     The scene generation command for a dynamic animation.
106     This command, if given, will be executed with the frame number as the
107     final argument, and on its standard output it must produce
108     the complete octree for that frame.
109     Care must be taken that this command does not create any temporary files
110     that might collide with same-named files created by other
111     animation commands running in parallel.
112     Also, the command should produce no output to the standard error, unless
113     there is a fatal condition.
114     (I.e., switch all warnings off;
115     see the BUGS section, below.)\0
116     There is no default animation command, and either this variable or the
117     .I OCTREE
118     variable must be set.
119     .TP
120     .BR VIEWFILE
121     This variable names a file from which
122     .I ranimate
123     may extract the view for each frame in the animation.
124     This file should contain one valid view per frame, starting with
125     frame 1 on line 1, regardless of the setting of the
126     .I START
127     variable.
128     An exception is made for a view file with only a single view, which
129     is used for every frame of a dynamic scene animation.
130     This variable is required, and there is no default value.
131     .TP
132     .BR START
133     The initial frame number in this animation sequence.
134     The minimum value is 1, and if a later starting frame is given,
135     .I ranimate
136     assumes that the earlier frames are included in some other
137     .I ranfile,
138     which has been previously executed.
139     (See the
140     .I NEXTANIM
141     variable, below.)\0
142     The default value is 1.
143     .TP
144     .BR END
145     The final frame number in this sequence.
146     The minimum value is equal to the
147     .I START
148     frame,
149     and the default value is computed from the number of views in the
150     given
151     .I VIEWFILE.
152     .TP
153     .BR EXPOSURE
154     This variable tells
155     .I ranimate
156     how to adjust the exposure for each frame.
157     As in
158     .I pfilt,
159     the exposure setting may be given either as a multiplier or as a
160     number of f-stop adjustments (eg. +2 or -1.5).
161     Alternatively, a file name may be given, which
162     .I ranimate
163     will interpret as having one exposure value per line per frame,
164     beginning with frame 1 at line 1.
165     (See also the
166     .I VIEWFILE
167     variable, above.)\0
168     There is no default value for this variable.
169     If it is not given, an average level will be computed by
170     .I pfilt
171     for each frame.
172     .TP
173     .BR BASENAME
174     The base output file name for the final frames.
175     This string will be passed to the
176     .I \-o
177     and
178     .I \-z
179     options of rpict, along with appropriate suffixes,
180     and thus should contain a
181     .I printf(3)
182     style integer field to distinguish one frame number from another.
183     The final frames will use this name with a ".pic" suffix.
184     The default value is the assigned
185     .I DIRECTORY
186     followed by "/frame%03d".
187     .TP
188     .BR host
189     A host to use for command execution.
190     This variable may be assigned a host name, followed by an optional
191     number of parallel processes, followed by an optional
192     directory (relative to the user's home directory on that machine),
193     followed by an alternate user name.
194     Multiple
195     .I host
196     assignments may appear.
197     It is not advisable to specify more than one process on a single-CPU
198     host, as this just tends to slow things down.
199     The default value is "localhost", which starts a single process in
200     the current directory of the local machine.
201     .TP
202     .BR RIF
203     This variable specifies a
204     .I rad
205     input file to use as a source of rendering options and other
206     variable settings.
207     If given,
208     .I ranimate
209     will execute
210     .I rad
211     and create an options file to later pass to
212     .I rpict
213     or
214     .I rtrace.
215     Besides prepending the
216     .I render
217     variable,
218     .I ranimate
219     will also extract default settings for the common variables:
220     .I OCTREE,
221     .I RESOLUTION,
222     .I EXPOSURE
223     and
224     .I pfilt.
225     Following the file name, overriding variable settings may be given,
226     which will be passed to
227     .I rad
228     on the command line.
229     Settings with spaces in them should be enclosed in quotes.
230     The execution of
231     .I rad
232     will also update the contents of the octree, if necessary.
233     There is no default value for this variable.
234     .TP
235     .BR DISKSPACE
236     Specify the amount of disk space (in megabytes) available on the
237     destination file system for temporary file storage.
238     .I Ranimate
239     will coordinate its batch operations based on this amount of storage,
240     assuming that there is either enough additional space for all the
241     final frames, or that the given
242     .I TRANSFER
243     command will move the finished frames to some other location (see
244     below).
245     The default value is 100 megabytes.
246     .TP
247     .BR ARCHIVE
248     After each batch rendering is finished and checked for completeness,
249     .I ranimate
250     will execute the given command, passing the names of all the
251     original pictures and z-buffer files generated by
252     .I rpict.
253     (The command is executed in the destination directory, and file names
254     will be simple.)\0
255     Normally, the archive command copies the original files to a tape device
256     or somewhere that they can be retrieved in the event of failure in
257     the frame interpolation stages.
258     After the archive command has successfully completed, the original
259     renderings are removed.
260     There is no default value for this variable, meaning that the
261     original unfiltered frames will simply be removed.
262     Note that the last one or two rendered frames may not be copied, archived
263     or removed in case there is a another sequence picking up where this
264     one left off.
265     .TP
266     .BR TRANSFER
267     The command to transfer the completed animation frames.
268     The shell changes to the destination directory and appends
269     the names of all the finished frames to this command
270     before it is executed.
271     Normally, the transfer command does something such as convert the
272     frames to another format and/or copy them to tape or some other
273     destination device before removing them.
274     If this variable is not given, the final frames are left where they
275     are.
276     (See
277     .I BASENAME,
278     above.)\0
279     .TP
280     .BR RSH
281     The command to use instead of
282     .I rsh(1)
283     to execute commands remotely on another machine.
284     The arguments and behavior of this program must be identical to the UNIX
285     .I rsh
286     command, except that the
287     .I -l
288     option will always be used to specify an alternate user name rather than the
289     .I "user@host"
290     convention.
291     Th
292     .I -l
293     option may or may not appear, but the
294     .I -n
295     option will always be used, and the expected starting directory will
296     be that of the remote user, just as with
297     .I rsh.
298     .TP
299     .BR NEXTANIM
300     This variable specifies the next
301     .I ranfile
302     to use after this sequence is completed.
303     This offers a convenient means to continue an animation that
304     requires different control options in different segments.
305     It is important in this case to correctly set the
306     .I START
307     and
308     .I END
309     variables in each
310     .I ranfile
311     so that the segments do not overlap frames.
312     .TP
313     .BR OVERSAMPLE
314     This variable sets the multiplier of the original image size
315     relative to the final size given by the
316     .I RESOLUTION
317     variable.
318     This determines the quality of anti-aliasing in the final frames.
319     A value of 1 means no anti-aliasing, and a value of 3 produces very
320     good anti-aliasing.
321     The default value is 2.
322     (A fractional value may be used for previews, causing low
323     resolution frames with large, blocky pixels to be produced.)\0
324     .TP
325     .BR INTERPOLATE
326     This variable sets the number of frames to interpolate between each
327     rendered frame in a static scene walk-through.
328     Z-buffers for each rendered frame will be generated by
329     .I rpict,
330     and
331     .I pinterp
332     will be called to perform the actual "tweening."
333     This results in a potentially large savings in rendering time, but
334     should be used with caution since certain information may be lost or
335     inaccurate, such as specular highlights and reflections, and objects
336     may even break apart if too few renderings are used to interpolate
337     too much motion.
338     The default value for this variable is 0, meaning no interpolation.
339     Interpolation is also switched off if the
340     .I ANIMATE
341     variable is specified.
342     .TP
343     .BR MBLUR
344     This variable specifies the fraction of a frame time that the shutter
345     is simulated as being open for motion blur.
346     A number of samples may be given as a second argument, which
347     controls the number of additional frames computed and averaged
348     together by
349     .I pinterp.
350     If this number is less than 2, then bluring is performed by
351     .I rpict
352     only, resulting in greater noise than the combination of
353     .I rpict
354     and
355 greg 1.3 .I pinterp
356     used otherwise.
357 greg 1.1 (The default value for number of samples is 5.)\0
358 greg 1.3 The default fraction is 0, meaning no motion blurring.
359     This option does not currently work with the
360     .I ANIMATE
361     variable, since pinterp only works for static environments.
362     .TP
363     .BR DBLUR
364     This variable specifies the aperture diameter for depth-of-field blurring,
365     in world units.
366     A number of samples may be given as a second argument, which controls the
367     number of additional frames computed and averaged together by
368     .I pinterp.
369     If this number is less than 2, then blurring is performed by
370     .I rpict
371     only, resulting in greater noise than the combination of
372     .I rpict
373     and
374 greg 1.1 .I pinterp
375 greg 1.3 used otherwise.
376     (The default value for number of samples is 5.)\0
377     The default aperture is 0, meaning no depth-of-field blurring.
378 greg 1.1 This option does not currently work with the
379     .I ANIMATE
380     variable, since pinterp only works for static environments.
381     .TP
382     .BR RTRACE
383     This boolean variable tells
384     .I ranimate
385     whether or not to employ
386     .I rtrace
387     during frame interpolation using the
388     .I \-fr
389     option to
390     .I pinterp.
391     If set to True, then the same rendering options and static octree
392     are passed to
393     .I rtrace
394     as are normally used by
395     .I rpict.
396     The default value is False.
397     Note that this variable only applies to static environment
398     walk-throughs (i.e., no
399     .I ANIMATE
400     command).
401     .TP
402     .BR RESOLUTION
403     This variable specifies the desired final picture resolution.
404     If only a single number is given, this value will be used for both
405     the horizontal and vertical picture dimensions.
406     If two numbers are given, the first is the horizontal resolution and
407     the second is the vertical resolution.
408     If three numbers are given, the third is taken as the pixel aspect
409     ratio for the final picture (a real value).
410     If the pixel aspect ratio is zero, the exact dimensions given will
411     be those produced.
412     Otherwise, they will be used as a frame in which the final image
413     must fit.
414     The default value for this variable is 640.
415     .TP
416     .BR render
417     This variable may be used to specify additional options to
418     .I rpict
419     or
420     .I rtrace.
421     These options will appear after the options set automatically by
422     .I rad,
423     and thus will override the default values.
424     .TP
425     .BR pinterp
426     This variable may be used to specify additional options to
427     .I pinterp,
428     which is used to interpolate frames for a static scene walk-through.
429     (See the
430     .I pinterp
431     man page, and the
432     .I INTERPOLATE
433     variable.)\0
434     Do not use this variable to set the
435     .I pinterp
436     .I \-fr
437     option, but use the
438     .I RTRACE
439     setting instead.
440     .TP
441     .BR pfilt
442     This variable may be used to specify additional options to
443     .I pfilt.
444     If this variable is given in the
445     .I ranfile,
446     then
447     .I pfilt
448     will always be used.
449     (Normally,
450     .I pfilt
451     is called only if
452     .I pinterp
453     is not needed or automatic exposure is required.)\0
454     See the
455     .I pfilt
456     manual page for details.
457     .SH EXAMPLES
458     A minimal input file for
459     .I ranimate
460     might look like this:
461     .IP "" .3i
462     .nf
463     ::::::::::
464     sample.ran
465     ::::::::::
466     # The rad input file for our static scene:
467     RIF= tutor.rif
468     # The spool directory:
469     DIRECTORY= anim1
470     # The view file containing one view per frame:
471     VIEWFILE= anim1.vf
472     # The amount of temporary disk space available:
473     DISKSPACE= 50 # megabytes
474     .fi
475     .PP
476     Note that most of the variables are not set in this file.
477     If we only want to see what default values
478     .I ranimate
479     would use without actually executing anything, we can invoke it
480     thus:
481     .IP "" .2i
482     ranimate -n -e sample.ran
483     .PP
484     This will print the variables we have given as well as default
485     values
486     .I ranimate
487     has assigned for us.
488     Also, we will see the list of commands that
489     .I ranimate
490     would have executed had the
491     .I \-n
492     option not been present.
493     .PP
494     Usually, we execute
495     .I ranimate
496     in the background, redirecting the standard output and standard
497     error to a file:
498     .IP "" .2i
499     ranimate sample.ran >& sample.err &
500     .PP
501     If we decide that the default values
502     .I ranimate
503     has chosen for our variables are not all appropriate, we can add
504     some more assignments to the file:
505     .IP "" .3i
506     .nf
507     host= rays 3 ~greg/obj/tutor ray # execute as ray on multi-host "rays"
508     host= thishost # execute one copy on this host also
509     INTERP= 3 # render every fourth frame
510     RES= 1024 # shoot for 1024x resolution
511     MBLUR= .25 # apply camera motion blur
512     EXP= anim1.exp # adjust exposure according to file
513     pfilt= -r .9 # use Gaussian filtering
514     ARCHIVE= tar cf /dev/nrtape # save original renderings to tape
515     .fi
516     .PP
517     Note the use of abbreviation for variable names.
518     .SH FILES
519     $(DIRECTORY)/STATUS animation status file
520     $(DIRECTORY)/* other temporary files
521     $(BASENAME).pic final animation frames
522     .SH AUTHOR
523     Greg Ward
524     .SH BUGS
525     Due to the difficulty of controlling processes on multiple execution
526     hosts, the
527     .I \-n
528     option of
529     .I ranimate
530     is not useful in the same way as
531     .I rad
532     for generating a script of executable commands to render the
533     sequence.
534     It may give an idea of the sequence of events, but certain temporary
535     files and so forth will not be in the correct state if the user
536     attempts to create a separate batch script.
537     .PP
538     If multiple processors are available on a given host and the
539     .I RTRACE
540     variable is set to True, then the
541     .I \-PP
542     option of
543     .I rtrace
544     should be employed, but it is not.
545     There is no easy way around this problem, but it has only minor
546     consequences in most cases.
547     (The
548     .I \-PP
549     option is used for
550     .I rpict,
551     however.)\0
552     .I
553     .PP
554     The current implementation of the remote shell does not return the
555     exit status of the remote process, which makes it difficult to
556     determine for sure if there has been a serious error or not.
557     Because of this,
558     .I ranimate
559     normally turns off warnings on all rendering processes, and takes
560     any output to standard error from a remote command as a sign that a
561     fatal error has occurred.
562     (This also precludes the use of the
563     .I \-t
564     option to report rendering progress.)\0
565     If the error was caused by a process server going down, the server
566     is removed from the active list and frame recovery takes place.
567     Otherwise,
568     .I ranimate
569     quits at that point in the animation.
570     .PP
571     The current execution environment, in particular the RAYPATH variable,
572     will not be passed during remote command execution, so it is necessary
573     to set whatever variables are important in the remote startup script
574     (e.g., ".cshrc" for the C-shell).
575     This requirement may be circumvented by substituting the
576     .I on(1)
577     command for
578     .I rsh(1)
579     using the
580     .I RSH
581     control variable, or by writing a custom remote execution script.
582     .PP
583     If a different remote user name is used,
584     .I ranimate
585     first attempts to change to the original user's directory with a
586     command of the form
587     .I "cd \~uname".
588     This works under
589     .I csh(1),
590     but may fail under other shells such as
591     .I sh(1).
592     .PP
593     If multiple hosts with different floating point formats are used,
594     .I pinterp
595     will fail because the Z-buffer files will be inconsistent.
596     (Recall that
597     .I pinterp
598     is called if INTERPOLATE > 0 and/or MBLUR is assigned.)\0
599     Since most modern machines use IEEE floating point, this is not
600     usually a problem, but it is something to keep in mind.
601     .SH "SEE ALSO"
602     pfilt(1), pinterp(1), pmblur(1), rad(1),
603     ranimove(1), rpict(1), rsh(1), rtrace(1)