Method for animating ARC/INFO images

Created Nov 7, 1994; Slightly Modified June 4, 1995; Slightly more Feb 26, 1998
This description is particularly for ARC/INFO folks who want to be able to serve mpeg animations to WWW browsers, without increasing the level of technology that they already have (please note that I no longer use mpeg, but use GIF89 animations). (Here at the ISM GIS lab I used Arc/Info Rev. 6.1.1, on an IBM RS6000 with AIX 3.2.4 and a Sun Sparq with some version of SunOS). At the present this description is pretty much the same as I posted to esri-l at the beginning of November, 1994. I now understand that things like this are now build into Arc/Info Rev 7.1.1. As you've probably seen, the results are a little rough, perhaps someone has information on how to smooth the result? If so, let me know ( and I will add the information to this document. The same applys for anything that's not clear, let me know. And finally, if you produce your own, pass the url on to me, I'm interested.

The first step is to produce a series of frames. This is done by drawing a frame in ARCPLOT, and then dumping the image via the SCREENSAVE command. Here is the AML which produced this series of frames.

/* makemovie.aml /* this assumes that arcplot is started and display is set /* make sure that you set the display size small or else you will /* fill up the disk and make a video too big to serve &severity &error &routine exit /* Set some defaults shadeset color.shd surface tin bigmtin &s mt [show surfacelimits ] surfacelimits [calc [extract 1 %mt% ] - 0.5 ] ~ [calc [extract 2 %mt% ] - 0.5 ] ~ [calc [extract 3 %mt% ] + 0.5 ] ~ [calc [extract 4 %mt% ] + 0.5 ] surfacedefaults surfacezscale 0.11 /* Set an initial observer position &s azi 31 &s alt 20 &s dist 3200 &do count = 1 &to 50 &by 1 clear shadesymbol 1 patch 0 0 [show pagesize ] linecolor black /*change observer position &s azi = %azi% + 2 &s alt = %alt% + 1 /* &s dist = %dist% - 50 surfaceobserver relative %azi% %alt% %dist% &type 'Azi:'%azi% 'Alt:'%alt% 'Dist:'%dist% surfacedrape mesh fishnet 20 surfacedrape surfaceshade screensave mm%count%.ras &end &return /* Just a clean way to get out if an error occurs &routine exit &stop &return

Good. Now there is a bunch of files named mm*.ras, were * is 1-50. Weeeell, actually not quite now. It appears that ARCPLOT (rev 6.1.1 on SUN) chokes after 18 or 20 iterations of the

&do count = 1 &to 50 &by 1 loop, so I had to do it in several batches. That's why the shaded relief mpeg has a few "jogs" in it. I've just assumed BUG, and have ignored it.

Of course, this is a case for a 3d-type flyby. A flat map of time-series data would be done with a series of reselects for different time slices. I can't wait to see some examples...

Now, to mpeg_encode it. Get the source code from
This is also a good place to get mpeg_play. It seemed to compile just fine on my IBM RS6000 using gcc, although there were differences between the test mpeg file that is included and one that I encoded. Don't know why.

Now can we encode? Not quite yet. Mpeg_encode expects the input frames to be in ppm, pnm ,or yuv format. You have to get the netpbm toolkit for translating the sunraster screen dumps into ppm. I forget where I got mine, but you can find it in several places, these are from the documentation:

* (,
  directory /graphics/graphics/packages/NetPBM
* (, directory /pub/netpbm.
* ( This site also carries
  binaries for the Amiga.
* (, directory ipa/src/manip
* (, directory /pub/davidsen/source
*, directory /ftp/archive/netpbm
Follow the directions, run make, and install the compiled routines somewhere (I put them in /usr/local/netpbm/). Now you can get ready to run mpeg_encode.

Mpeg_encode uses a parameter file to control what you want it to do. I'm not going to get into this parameter file since the documentation is pretty good. Here is the parameter file I would use to encode the sunraster frames created by makemovie.aml:

OUTPUT          output.mpg
BASE_FILE_FORMAT        PNM                   #(changed)
YUV_SIZE        352x240

INPUT_CONVERT   /usr/local/netpbm/rasttopnm * #(changed)
GOP_SIZE        6
INPUT_DIR       /projects/mound               #(changed)

mm*.ras [1-50]                                #(changed)

PIXEL           HALF
RANGE           10
IQSCALE         8
PQSCALE         10
BQSCALE         25

This looks bad, but all I did was take the template parameter file, and change the lines marked #(changed). Everything else is the default value, and I haven't gotten around to fooling with them.

Now you can run mpeg_play on output.mpg, and if you like what you see, serve it up to the internet.

ISM Welcome Page.