Description: Movie-making article for Newsletter From: ANDREWS Date: 30-NOV-1987 \magnification=\magstep1 \baselineskip=15pt\parskip=5pt plus 2 pt \centerline{\bf How to Make Movies at PSC \rm or, \it Animation for the Masses} \bigskip One advantage of designing any graphics systems from scratch is the possibility of creating a uniform interface to various output devices. At PSC we have standardised on the CGM format for the interchange of two-dimensional graphics data, a choice that is rapidly becoming prevalent in the supercomputing world. One aim of this approach is to facilitate the routine production of computer animated movies by our users. Plainly speaking, any PSC user should be able to view his graphical output in a movie format by creating a CGM file, containing a series of frames, and having it output at PSC on video tape. The resultant tape, in either UMATIC or VHS format, is then mailed to the user. This process has already been performed on an experimental basis and we would like to encourage more users to participate as we build up our experience in this area. The technical details are simple; GPLOT (our CGM file processor) knows about two different kinds of devices: output devices and controllers. When you use the command GPLOT/DEVICE=PS you are telling GPLOT to produce output for a PostScript printer. If you use GPLOT/SCREEN=4010 you are telling GPLOT three things, to produce output for a Tektronix 4010 compatible terminal, to send that output directly to the user's terminal, and to ``beep'' the user's terminal at the end of each frame and wait for a response before drawing the next frame. The {\it output device} was a Tektronix 4010 and the {\it controlling device} was the user's terminal. Moviemaking works in a similar manner, as the following diagram shows. % all the special stuf to make th diagram work \newdimen\boxht\newdimen\boxwd \def\myspot#1#2#3{\special{cgm 1 #1 #2 #3}} \def\vrulefill{\leaders\vrule\vfill } \def\mybox#1#2#3#4#5{\setbox0=#1\boxht = \ht0\boxwd = \wd0 \advance\boxht by 10pt\advance\boxwd by 10pt \vbox{\hsize=\boxwd \line{\hrulefill #2\hrulefill}\nointerlineskip \line{\vbox to \boxht{\vrulefill #5\vrulefill}\hfil \vbox to \boxht{\vfil\box0\vfil}\hfil \vbox to \boxht{\vrulefill #3\vrulefill}}\nointerlineskip \line{\hrulefill #4\hrulefill }}} % now the actual diagram \vfil\penalty-100\vfilneg % optional break \centerline{{\vbox to 4 true in {\hsize=4truein \font\big=cmr10 scaled \magstep1\big % make the text a little bigger \setbox1=\hbox{FILE} \centerline{\mybox{\vbox{\hsize=\wd1\centerline{CGM}\box1}}\relax\relax {\myspot1 2 1}\relax} \vfill \centerline{\mybox{\hbox{GPLOT}}{\myspot1 2 2}{\myspot2 2 1}\relax {\myspot3 2 1}} \vfill\vfill \line{\mybox{\hbox{PERITEK}}{\myspot3 2 2}\relax{\myspot4 2 1}\relax\hfil \mybox{\hbox{DIAQUEST}}{\myspot2 2 2}\relax{\myspot5 2 1}\relax} \vfill\vfill \setbox1=\hbox{SONY} \centerline{\mybox {\vbox{\hsize=\wd1\box1\centerline{VTR}}}\relax {\myspot5 2 2}{\myspot6 2 1}{\myspot4 2 2}\relax } \vfill\vfill \setbox1=\hbox{UMATIC} \centerline{\mybox {\vbox{\hsize=\wd1\box1\centerline{TAPE}}}{\myspot 6 2 2}\relax{\myspot7 2 1}\relax } \vfill \setbox1=\hbox{TAPE} \centerline{\mybox {\vbox{\hsize=\wd1\centerline{VHS}\box1}}{\myspot 7 2 2}\relax\relax\relax } \vfill }}} %end of diagram \bigskip The PERITEK is a colour frame buffer, with a resolution of 512x512 pixels, the value of each pixel acting as an index into a colour map. Our PERITEK is hosted by a MicroVAX at PSC. The output of the PERITEK is an RGB feed (separate red, green and blue signals) which can be massaged by an external encoder into an NTSC signal suitable for videotape. NTSC is the encoding format used by the television industry. The PERITEK is the {\it output device} for GPLOT in this procedure, however with this configuration we cannot draw the frames quickly enough to send the video directly to a recorder. Instead of a new frame from the CGM file appearing on each frame of the videotape, you would actually see the individual frames being drawn, and the animation effect would be lost. This is because, with a microvax/peritek combination, we cannot process the CGM file and update the screen in the 1/30 of a second the videotape allots for each frame. Typically times of the order of a second are required for such an update. To synchronise our frame production and the recording process of the VTR (video tape recorder) we use a SONY UMATIC recorder together with a DIAQUEST controller. The DIAQUEST is the {\it controlling device} for GPLOT in this case, capable of positioning the VTR at any individual frame position and causing one or more frames to be recorded there. Thus GPLOT will run through the user's CGM file, drawing each frame on the PERITEK frame buffer and causing the DIAQUEST controller to lay down consecutive frames of the CGM file on the UMATIC tape in the SONY VTR. As you might expect the command sequence for GPLOT is GPLOT/DEV=PERITEK/CTR=DIAQUEST filename. Because of the increased overhead in locating the correct frame on the videotape (the recorder must backup and pre-roll to arrive at the correct frame with the tape moving past the heads at the requisite speed) each frame takes roughly 10 seconds to process. When the file is exhausted, the movie can be dubbed to VHS (for those of you who don't have UMATIC tape players) and the tape mailed to the user. Remember that the default video speed is 30 frames/second and use that as your guide to how many frames you should produce. However we can ``pad'' the image by laying down consecutive duplicate frames, though this may lead to jerkiness in the finished animation. We are presently using a dedicated microvax at PSC for this procedure, so one our staff will have to create the tape for you. For more information on how you should go about getting your movie produced send mail on the front ends to WELLING. \bigskip\noindent --Phil Andrews \bye