Getting Started with Surveyor: Concepts

Terrain Data, or Surface

In Surveyor, terrain data is used to describe the basic data set which is to be explored. A complete set of terrain data in Surveyor is also referred to as your surface. The data generally consists of two parts: elevation data and image data. Both elevation data and image data are regular two-dimensional grids of values which can be viewed as images. Surveyor can only read images in the VICAR format, but utilities are provided to do the conversion for you.

An elevation data set can be thought of as an image where the brightness represents elevation. The pixels can be any of the VICAR supported formats.

The image data must be the same resolution and size as the elevation data, and can only be in BYTE (8 bit unsigned) format. For gray-scale, you would have a single image file matching the elevation data. For color, you would have three images: one each for red, green, and blue.

Once you have a terrain data set prepared with your favorite image processing system, you should convert it to VICAR format if necessary and make an image pyramid from it as described under Image Pyramids below.

Image pyramids

An image pyramid is simply a series of scaled down copies of an image. We refer to the original image as level 0 of the pyramid (size nl x ns), level 1 is a quarter resolution version of the original (size nl/2 x ns/2), level 2 is a sixteenth the original (size nl/4 x ns/4), etc. When you create a large number of levels, you are adding about 1/3 of the size of your original to the required storage space of your map.

In this release of Surveyor, you will need to create a pyramid out of your elevation and image maps with the makepyr command. While Surveyor will function without a pyramid, the use of a pyramid is highly recommended for two reasons. First of all, it speeds up the rendering process significantly when you have very large data sets. Secondly, when you are rendering with the ray casting renderer for high quality output, an image pyramid helps significantly with anti-aliasing, reducing sparkling in the final animation.

A pyramid is created with the following command:

makepyr image-file nlevels [filter-type]
In the above command, image-file is the name of the image file you want a pyramid made from, nlevels is the number of levels you want in the pyramid, and filter-type is the filter method you wish used when scaling the data. The filter method determines how the pixels are averaged when scaling down the image. It is recommended that you use the default value of ``sd'' for most animations and analysis. ``sd'' indicates what we call a simple ``sizedown'' filter, which is a two by two average of the pixels in the original image. While this simple box filter can slightly increase the aliasing or sparkling you may see, it provides a sharper picture than the other filters. As an example of creating a pyramid, let us say you have an image file (in VICAR format) of the greater Kathmandu area, called kathmandu.img. You could create a 10 level pyramid from the image with the command:

makepyr kathmandu.img 10
The makepyr script calls either the program sizedown (if sd) or gaussdown (all other filter types). For a summary of the currently available filters other than ``sd,'' type the command gaussdown with no arguments.

Surveyor Files

Surveyor saves all information into ASCII (human-readable) files. Each file starts with a description of its version number (a version of Surveyor can read files corresponding to its own version or older, but not newer versions), and the file type. Multiple files can be concatenated together to store different types of information in a single file. For example, you can concatenate your world file and path file into a single file to allow easy reloading into surveyor.

The Surveyor World

The Surveyor world is a description of your terrain data set. It includes the path names of your data sets, their size (in pixels), their resolutions (X scale, Y scale, and Z scale), vertical exaggeration, and pyramid information. The world is sometimes called a surface.

The Surveyor Path

The Surveyor path is a description of an animation flight path. It contains a description of each of the splined curves which make up your animation.

The Surveyor State

The Surveyor state consists of all information necessary for Surveyor to recreate a user session. It stores the world, animation flight paths, window positions, and so forth. When the state is saved, you should be able to exit Surveyor, get back in the next day, and it should look like you never left. Surveyor writes a description of its state in a human-readable (ASCII) file, called the state description file or state file. Previously generated states may be recovered by loading the state files associated with them.

Some care should be used when saving and restoring states. For example, the hosts you have selected for rendering your views are stored as part of your state. When loading a state, it is possible to get what may seem to be strange error messages about renderers not being available, because it may be trying to use another host than the one you think you are using. To avoid this sort of problem, you may want to load only the information you really want to have been saved (for example your world and path). See also Surveyor Files.

VICAR Image Files

VICAR (Video Image Communication and Retrieval) is the primary image processing system used at NASA's Jet Propulsion Laboratory for both planetary and general image processing. The original VICAR system was developed by IBM under contract to JPL starting in 1962. Since then, VICAR has undergone significant evolution under the auspices of JPL's Multimission Image Processing Laboratory (these days they call themselves a ``system'' instead of a laboratory, but that will pass). For detailed information on VICAR, see the VICAR home page supported by MIPL.

The VICAR image file format is quite simple. It consists of an ASCII header followed by an uncompressed array of pixel values. The utility program raw2vicwill convert a raw image file to a VICAR image. Detailed information on the VICAR file format can be found in the VICAR File Format memo.

For information regarding the conversion of your rendered frames to another format for recording or viewing, see Converting Your Output Frames.

A Surveyor Animation

A Surveyor animation is made by defining a flight path together with a world. The flight path is a sequence of views, which consist of a position (the [x,y,z] coordinates of your eye), an orientation (an [x,y,z] point where you are looking, and a camera roll), and a field of view (the horizontal angle subtended by your frame, in degrees). Each view in this sequence is called a key frame.

A mathematical curve or interpolant is passed through a sequence of key frames, so that each of the view parameters changes smoothly with time. The speed and shape of the curve can be changed not only by changing the view parameters for a given key frame, but also by changing the time at which that key frame is defined to occur.

Only cubic splines are supported in this version of Surveyor, thus the shape of the path and the speed along the path change together. That is, changing the time at which a key frame occurs will not only change your speed, but also the shape of the curve.


Surveyor Copyright (C) 1991-1994, California Institute of Technology
All rights reserved. U.S. Government Sponsership under NASA Contract NAS7-918 is acknowledged.