Computing Video Frames

With the animation tables used in the moving ellipsoid example from Section 3, we can create all the frames for a full-speed videotape recording. It is important to avoid file name conflicts between the images created for the postage stamp animation and the frames for the video. Either tell rt to create frames with different names, or the postage stamp frames must be renamed or removed before computing the video frames. Failure to do so will cause rt to believe that the postage stamp frames are completed frames for the video animation. In the following example, the frames will be created with the name ``ell_vid.pix'' to avoid conflict.

The arguments to the ``times'' command of tabinterp is slightly different from the previous example. The difference is the number of frames per integer time step (seconds) is increased from 3 to 30.

% tabinterp << EOF > chans.all
file chans.vsize 0;
file chans.eyept 1 2 3;
file chans.orient 4 5 6 7;
file chans.ellanim 8 9 10;
times 0 8 30;
interp spline 0 1 2 3 4 5 6 7;
interp linear 8 9 10;
EOF
cmd: file chans.vsize 0
chan 0:  File 'chans.vsize', Column 1
cmd: file chans.eyept 1 2 3
chan 1:  File 'chans.eyept', Column 1
chan 2:  File 'chans.eyept', Column 2
chan 3:  File 'chans.eyept', Column 3
cmd: file chans.orient 4 5 6 7
chan 4:  File 'chans.orient', Column 1
chan 5:  File 'chans.orient', Column 2
chan 6:  File 'chans.orient', Column 3
chan 7:  File 'chans.orient', Column 4
cmd: file chans.ellanim 8 9 10
chan 8:  File 'chans.ellanim', Column 1
chan 9:  File 'chans.ellanim', Column 2
chan 10:  File 'chans.ellanim', Column 3
cmd: times 0 8 30
cmd: interp spline 0 1 2 3 4 5 6 7
cmd: interp linear 8 9 10
performing interpolations
writing output
The new prototype contains an invocation of the ``framedone.sh'' script to process each image as it is completed.
% cat ell.proto.2
viewsize @0;
eye_pt @1 @2 @3;
orientation @4 @5 @6 @7;
start @(line);
clean;
anim all.g/ellipse.r matrix rmul
	1 0 0 @8
	0 1 0 @9
	0 0 1 @10
	0 0 0 1;
end;
! framedone.sh ell_vid.pix @(line);

% tabsub ell.proto.2 chans.all > ell.rtanim
It is likely to be quite a while before all the images are computed. The rendering should be done as a batch job or detached process using a script similar to the ``ell2.rt'' script below.
% cat ell2.rt
#!/bin/sh
rt -M -w1440 -n 972 -V1440:972 -J1 -o ell_vid.pix moss.g all.g 2>> ell.log < ell.rtanim


% ell2.rt &
For instance it took almost ten hours to compute and process the 241 1440x972 images of our trivial geometry for an 8 second animation on a Silicon Graphics 4D/280. The final compressed images occupied approximately 39 MB of disk space.

Next Section
Index