Copyright: 3DEM60 Copyright 1994 - 1997 by R. S. Horne


CONCEPT OF OPERATION

      3DEM will render 3D terrain scenes and MPEG flyby animations from USGS Digital Elevation Model (DEM) files, USGS Global 30 Arc Second Elevation Data Set (GTOPO30 DEM) files, NASA Mars Digital Topographic Map (DTM) files, or any topographic data file which is organized by rows and columns of elevation data.  3DEM will also produce realistic fractal landscape scenes.  3DEM uses the SGI/Microsoft OpenGL libraries for high speed 3D rendering.

      3DEM will render 16 or 24 bit color three dimensional projections, red-blue projections requiring red-blue 3D glasses for viewing, or color 3D projections requiring Liquid Crystal (LCD) electronic shutter glasses for viewing.  Completed scenes can be saved as Windows bitmaps for transfer to other applications or as 16 bit height field bitmaps for use with the POV-Ray ray tracing software.   Flybys can be saved as mpeg animation files (*.mpg) which can be played back with freely available Windows 95 mpeg player software, or as special animation files for LCD shutter glasses (*.fly) which can be played back from within the 3DEM program.


EQUIPMENT AND SOFTWARE REQUIRED

      3DEM is designed to run under Win95 or WinNT with 24 bit color graphics.  A 133 MHz Pentium or better microprocessor and fast graphics card are recommended.

      A minimum of 16 MBytes of memory is also required.  However, less than 32 MBytes of memory will limit the usefullness of the high resolution modes of OpenGL rendering.

      For Win95 you will need the Microsoft OpenGL dynamic link libraries (opengl32.dll and glu32.dll) available for download from http://www.microsoft.com/hwdev/devdes/opengl.htm if these files are not already  installed on your system. These file can also be downloaded from the 3DEM home page at http://www.monumental.com/rshorne/3dem.html .

      To install 3DEM, just copy 3dem60.exe, 3dem60.hlp, 3dem60.cnt, and zlib.dll to a convenient directory on your hard drive.  You can run 3dem60.exe directly from this location or create a shortcut to 3dem60.exe for your desktop.  Opengl32.dll and glu32.dll should reside in your Windows/System directory.

CONTACTING THE AUTHOR

      Programs are only improved by the incorporation of new ideas.  Your ideas are welcome.  Please report any bugs or send any questions, comments, or ideas to rshorne@mnsinc.com, or visit the 3DEM web page at http://www.monumental.com/rshorne/3dem.html for the latest program update.


3D TERRAIN RENDERING

      To produce a three dimensional scene you must perform four operations in sequence with the 3DEM software as follows:

      STEP 1 - Load a new DEM, GTOPO30 DEM, DTM, or Data Matrix file and draw an overhead map of scaled altitude data.  Choose "File - Open - Digital Map." If the file is of the correct type, 3DEM will draw an overhead map of the entire geographical area with color scaled to the altitude at each point on the map.

      STEP 2 - Select an area from the overhead map for conversion into a three dimensional scene.  Click the left mouse button at the location on the overhead map which interests you.  The area to be viewed will be outlined by a black rectangle.  The observer's location and direction of view are indicated by a notch in one side of the outline rectangle.  Move the outline rectangle while holding down the left mouse button.  Rotate the outline rectangle while holding down the right mouse button and moving the mouse left or right at the bottom of the display window.  You can also make fine adjustments to the rotation of the outline rectangle using the left and right arrow keys.  Choose "Area - One" or "Area - Four" or "Area - Sixteen" to select the size of the scene.  Choose "Scale - Show Scale" to display an indication of the horizontal and vertical scale (in kilometers) of the selected area.

      STEP 3 - Once you are satisfied with the selected area, compute and display a three dimensional landscape scene.  Choose "Operation - View Scene" and 3DEM will give you a choice of terrain projection parameters as explained in the following paragraphs.  Initially, you can just accept the default values and 3DEM will proceed to compute the selected projection using OpenGL.  Depending on the size of the scene and the speed of your computer, this operation can take a few minutes.  Relax and be patient.  Once the scene is complete, you can save the image as a windows bitmap by choosing "File - Save - Color Bitmap."


3D FLYBY ANIMATION

      A flyby animation is a stored series of 3D scenes (or frames) which are played back rapidly in sequence to produce the appearance of a flyby.  3DEM compresses these frames into an mpeg file which can be played back with most any commercial or freeware mpeg animation player.  To produce a flyby animation you must perform four operations in sequence with the 3DEM software as follows:

      STEP 1 - Load a new DEM, GTOPO30 DEM, DTM, or Data Matrix file and draw an overhead map of scaled altitude data.  Choose "File - Open - Digital Map." If the file is of the correct type, 3DEM will draw an overhead map of the entire geographical area with color scaled to the altitude at each point on the map.

      STEP 2 - Select an area from the overhead map as the starting point for a flyby.  Click the left mouse button at the location on the overhead map which interests you.  The area to be viewed will be outlined by a black rectangle.  The observer's location and direction of view are indicated by a notch in one side of the outline rectangle.  Move the outline rectangle while holding down the left mouse button.  Rotate the outline rectangle while holding down the right mouse button and moving the mouse left or right at the bottom of the display window.  You can also make fine adjustments to the rotation of the outline rectangle using the left and right arrow keys.  Choose "Area - One" or "Area - Four" or "Area - Sixteen" to select the size of the scene.

      STEP 3 - Select "Operation - View Flyby" and 3DEM will give you a choice of flyby projection parameters as explained in the following paragraphs.  Initially you can just accept the default values, and 3DEM will render a real-time animated view of a flyby of the DEM landscape.  The speed of this animation will depend on the speed of your computer and graphics card, and memory available.  A fast machine will allow a frame rate of up to 10 frames per second.  If you are fortunate to have OpenGL hardware acceleration, faster frame rates are possible.  The primary purpose of this operation is to record a flight path through space over the DEM surface for subsequent conversion into a full resolution mpeg animation.  Use the keyboard arrow keys to turn, climb, and dive.  A cross mark cursor at the center of the view indicates your current flyby attitude, whether turning left or right, climbing, or diving.

      STEP 4 - Once you are satisfied with the flight path through space, you may record a high resolution flyby animation using 16 or 24 bit color, red-blue color for viewing with red-blue lens 3D glasses, or interlaced color for viewing with Liquid Crystal (LCD) electronic shutter glasses.

Color and red-blue animations are saved as mpeg-1 files which may be played back with freeware mpeg players such as VMPEG or Hyper MPEG Player.  Choose “Operation - Animate Flyby - Color” or “Operation - Animate Flyby - R/B” to create a color or red-blue mpeg-1 animation.

Interlaced LCD animations are saved as *.fly files which may be played back from within 3DEM. Choose “Operation - Animate Flyby - LCD” to create an animation for LCD electronic shutter glasses.  To play back this animation, choose “File - Open - LCD Flyby.”


FLYBY ANIMATION PLAYBACK

      Color and red-blue animations are saved as mpeg-1 files which may be played back with freeware mpeg players such as VMPEG or Hyper MPEG Player.  These players are available for download from the 3DEM home page at http://www.monumental.com/rshorne/3dem.html and at many other sites on the Internet.

      Animations for Liquid Crystal (LCD) electronic shutter glasses are saved as *.fly files which may be played back from within 3DEM.  Choose “File - Open - LCD Flyby” to load and playback and LCD animation.  3DEM will loop through the recorded animation continuously until you choose “Operation - Stop Operation” from the 3DEM menu.


TEXTURE APPLICATION

      3DEM allows you to apply bitmap textures to the terrain, ocean, and sky.  This allows more realistic textured land and ocean surfaces, and allows the sky to be rendered with clouds or other atmospheric effects.  Textures are added using the Scene Textures dialog box.  To add a texture to your scene, take the following steps in sequence.

      STEP 1 - Create a suitable bitmap texture for the terrain, ocean, or sky.  Thousands of textures are available for free download via the Internet.  Browse for a collection of textures that fit the scenery which you are rendering.  Generally the textures available on-line are either *.jpg or *.gif format.  Use Lview or a similar utility to convert these textures to Windows 8 bit or 24 bit color bitmaps.  Texture bitmaps should have dimensions of at least 128 by 128, but no larger than 1024 by 1024.  OpenGL textures must be square with sides equal to a power of two (128, 256, 512, 1024).  If your texture is an odd size, 3DEM will automatically expand its dimensions as necessary.  However, this expansion will introduce some distortion in the texture.  If distortion is a concern, be certain that the texture dimensions meet the OpenGL criteria.

      STEP 2 - After you have loaded a digital map into 3DEM, select the “Operation - Modify Textures” menu item to bring up the Scene Textures dialog box.  Press the “Load” button under Terrain, Ocean, or Sky texture as appropriate to select and load the bitmap texture.  3DEM will automatically adjust the texture to have an equal x and y dimension which is a power of 2 (i.e. 128, 256, 512, or 1024) and will then load the modified texture into your scene.

      STEP 3 - Choose the method of texture application to your scene.  Textures can either “Blend” with the underlying terrain color, or “Replace” the terrain color entirely.  Texture patterns can also either “Repeat” many times across the chosen surface or “Stretch” so that the texture image is only repeated once across the entire width and height of the chosen surface.  Choose “Blend” and “Repeat” where you wish to apply a very fine pattern across an entire surface.  Choose “Replace” and “Stretch” where you have a large texture image that you wish to apply as a fixed background (such as clouds for the sky).  Note that if you plan to use textures in generating a flyby animation that you must use the “Stretch” option to fix the texture to the underlying terrain surface.  Otherwise, the texture image will move and flicker from frame to frame during the animation.

      STEP 4 - Once your textures are chosen, exit the Scene Textures dialog box and then choose “Operation - View Scene” to render an image in the normal manner.  You should plan on experimenting with a number of different textures to get the best results.


MAP OVERLAY APPLICATION

      3DEM allows you to overlay surface maps showing roads, cities, lakes and rivers, and other features over the 3D terrain image.  Overlay maps are applied as texture bitmaps which are fixed to the geographical coordinates of the underlying DEM.  To apply a map overlay, take the following steps in sequence.

      STEP 1 - Locate a source of DEMs and corresponding surface maps which cover the same geographical area at about the same scale.  For the United States, a good match are the DEMs provided by the US Geological Survey at

http://edcwww.cr.usgs.gov/glis/hyper/guide/1_dgr_demfig/index1m.html

and the surface maps available from the US Census Bureau Tiger Map Server at

http://tiger.census.gov/cgi-bin/mapbrowser.

The following instructions assume that this is the combination you are using.  The principles will be the same for application of all surface map textures.

      STEP 2 - Connect with the TIGER map server and select a square surface map of no more than about 0.5 degrees extent in latitude and longitude centered on the area you wish to view.  The latitude and longitude boundaries you select will define the DEM area for viewing.  Generally, you should choose boundaries that lie on exact tenths of a degree in order to simplify generation of a surface map.  The map server will produce a *.gif file from these coordinates.  It is mandatory that this *.gif  be square with sides which are a power of two (i.e. 128, 256, 512, or 1024 pixels).  Specify a maximum dimension of 1024 by 1024 pixels in order to obtain the highest possible resolution.  It will also help if you specify that latitude and longitude lines be drawn on the surface map by the map server.  Once you have downloaded this *.gif, use Lview or a similar utility to convert it to a windows bitmap.  The end result is a 1024 by 1024 surface bitmap which can now be used as a texture overlay to show map details on the DEM projection.

      STEP 3 - The surface bitmap will be matched to the underlying DEM at a common southwest corner.  Because of map borders and scaling, the desired DEM area will not fill the entire 1024 by 1024 surface bitmap, and it is necessary to measure the border widths so that 3DEM can compensate.  Using Lview or a similar utility, measure the distance in pixels (xoff) from the left edge of the surface bitmap to the west longitude boundary of the DEM area.  Next measure the distance in pixels (yoff) from the bottom edge of the surface bitmap to the south latitude boundary of the DEM area.  Finally measure the width (wth) in pixels and height (ht) in pixels between the longitude and latitude boundaries of the DEM area respectively.  Note that these measurements are best made using latitude and longitude lines drawn on the surface bitmap by the map server.

      STEP 4 - Connect with the USGS web site and locate the USGS DEM which covers the DEM area you have selected in Step 2.  Download the appropriate DEM file and decompress it using WinZip or a similar utility.  Be sure that you add the “.dem” file extension to the decompressed DEM if it is not already present.  Load this DEM file into the 3DEM program.  Then choose “Operation - Reduce Area” from the menu and use the mouse to drag select an area with EXACTLY the same latitude and longitude boundaries as DEM area defined in  Step 2.  Press “Return” to load this selected area into 3DEM.

      STEP 5 - Choose the “Operation - Modify Textures” menu item and load the surface bitmap you have created as a Terrain texture.  Choose to “Stretch” the bitmap texture over the entire DEM surface, and enter the values of “xoff,” “yoff,” “wth,” and “ht” that you have measured.  Choose to either “Blend” the underlying DEM colors with the surface map, or “Replace” the DEM colors with the colors of the surface map.  Then exit the Scene Textures dialog box and then choose “Operation - View Scene” to render an image in the normal manner.

      STEP 6 - Examine the resulting image to see that there is a good match between the surface map and the underlying DEM features.  It may be necessary to adjust “xoff,” and “yoff” by a few pixels in either direction to get a perfect match since measurement of these offsets is subject to errors of a few pixels.


Terrain projection parameters are selected using this dialog box.  Click on any control to see a description of its use in rendering a three dimensional scene.


Flyby projection parameters are selected using this dialog box.  Click on any control to see a description of its use in rendering a flyby animation.


LEGEND

      The Legend is text which will appear at the top of your finished three dimensional scene.  Initially, this legend is read from the DEM file header.  Legends in Flyby are printed at the bottom of the screen and are only displayed for the first 50 frames of the animation.  Adjust the legend words to your own preference.

 ALTITUDE AND FLYBY ALTITUDE

      Altitude can be adjusted to improve the appearance of a scene or flyby.  The initial value will be a high altitude above the landscape surface.  Lower values may be chosen depending on the terrain.  For flybys, terrain tilt is determined by the altitude so that the surface of the DEM fills the field of view.  For fixed scenes, you may adjust tilt to your own preference to give the best balance of terrain and sky in the finished scene.

 FLYBY SPEED

      Flyby speed is the distance in meters over the terrain between each animation frame.  You will probably need large flyby speeds for very high altitude flybys and lower speeds for flybys close to the terrain surface.  Experiment with flyby speed during real-time flyby to choose a speed that is matched to the altitude and scale of the terrain below.


PROJECTION TYPE

      The type of 3D projection for either single scenes or for flyby projections is determined here.  The "Color" selection provides a color 3D projection with surface colors determined by terrain height and the direction of illumination.  The “LCD” selection provides a color 3D projection for viewing with Liquid Crystal (LCD) electronic shutter glasses.  The “R/B” or “Red Blue” selection provides a 3D projection for viewing with red-blue lens 3D glasses.   See the illustrations of projection type below.


PROJECTION POSITION

      "Foreground" and "Background" options are provided for projection of fixed 3D scenes.  A foreground projection is centered at the surface of your CRT screen and projects into the space in front of the screen, giving an image that you can literally reach out and touch.  This effect is best seen using either Red Blue or LCD projection type and 3D glasses.  A background projection is a more conventional projection behind the surface of your CRT screen and is more suitable for large scale scenery views.  See the illustrations of projection position below.


PROJECTION SIZE

      For 3D terrain rendering, you have a choice of projection sizes of 400 by 300, 640 by 480, and 800 by 600 pixels.  3D flyby animation will always be rendered in a 400 by 300 pixel window.

 PATH INDICATOR

      For flybys, the path indicator is a cross mark cursor at the center of the real-time animation which indicates current flight attitude (turning, climbing, or diving).  Here you have the option to turn this indicator on or off.

TERRAIN TILT

      The scene can be tilted to the observer's line of sight by a value of 10 to 80 degrees.  A tilt of 0 indicates that the observer's line of sight is parallel to the base of the scene.  The default value of 26 degrees usually gives a suitable result for a foreground projection.  Use a larger value for a background projection.  See the previous descriptions of foreground and background projection position.  When computing flybys, the combination of terrain tilt and flyby altitude determine the appearance of the scene.  See the previous description of flyby altitude.


TERRAIN VERT MAGNIFICATION

      Large scale DEMs and DTMs often show very low relief features.  Vertical magnification increases the height of surface features to make them more visible in the three dimensional projection.  Don't hesitate to use magnifications of 200% to 300% to improve the appearance of your scene.  The default value of vertical magnification is 100%, but you should change this value if you are not satisfied with the appearance of the 3D projection.

TERRAIN ILLUMINATION

      OpenGL rendering uses one source of illumination at the azimuth and elevation angles chosen here.  These directions are relative to the geographic north at all times.  Zero degrees azimuth indicates a source directly from the north, while 180 degrees azimuth indicates a source directly from the south.  Zero degrees elevation indicates a source on the horizon, while 90 degrees elevation indicates a source directly overhead.  Thus the default values of 240 degrees azimuth and 60 degrees elevation indicate an illumination source from the south west.  Experiment with these values if you find a need to change the appearance of light and shadow in your three dimensional projection.


TERRAIN RESOLULTION
TERRAIN RESOLUTION

      3DEM creates a 3D landscape scene by constructing a grid of elevation data from the DEM map.  The density of points in this grid determines the final scene resolution produced by OpenGL.  A resolution of one indicates that every adjacent point from the DEM map is used in constructing the OpenGL grid.  This is the highest resolution possible and will require the longest time to compute.  Faster computation can be achieved at the expense of scene resolution.  A resolution of four indicates that every fourth point from the DEM map is used giving a low resolution scene which can be computed quickly.

      The combination of terrain resolution and scene area determine the amount of memory required by OpenGL.  Be cautious in selection of terrain area and resolution in order to limit memory usage.  If you have selected "Area - One" for viewing, a terrain resolution of one will require about two MBytes of RAM for internal vertex, vector, and color lists used by OpenGL.  Seven MBytes are required for "Area-Two" scenes, and 28 MBytes are required for "Area-Four" scenes at a terrain resolution of one.  Choose lower resolution (two or four) and smaller scene areas in order to keep memory use lower and to shorten computation time.


TERRAIN RESOLUTION (REAL-TIME FLYBY)
TERRAIN RESOLUTION  (VIEW FLYBY)

      Choose here the resolution of the OpenGL terrain rendering for viewing a flyby in real time.  Choice of resolution will depend almost entirely on the speed of your computer graphics hardware.  A resolution of 8 indicates that OpenGL creates a terrain scene using every 8th point from the DEM elevation map.  This is a very low resolution that should be used with slower machines or with software only implementations of OpenGL.  A resolution of two uses every 2nd point from the DEM elevation map.  This is a high resolution that can only be supported in real time by the very fastest hardware implementations of OpenGL.

TERRAIN RESOLUTION (ANIMATE FLYBY)

      Choose here the resolution of the OpenGL terrain rendering to be used in creating the MPEG animation of the DEM flyby.  A resolution of four indicates that OpenGL creates each MPEG frame using every 4th point from the DEM elevation map.  This will give a low resolution animation which can be computed very quickly.  The higest resolution of one uses every point from the DEM elevation map for the highest quality images.  However, memory use and computation time will increase exponentially.


TERRAIN TYPE

      Normally, terrain is a combination of mountains and plains with lighting determined by the azimuth and elevation of the illumination source.  However, if you are developing a scene containing the ocean's surface you may want the sea to appear as a uniform ocean color rather than appear as a brightly lighted plane.  Choose "Mountain/Plain" for normal scenery, or "Island/Ocean" for scenery including the ocean's surface.  You can also use the "Island/Ocean" setting for scenes in which there are rivers or lakes.

      If you are developing an island and ocean scene, the shape of the shore line may be adjusted by selection of a "Sea Level" value.  You may need to experiment by raising or lowering the sea level to achieve the proper shore line or river bank.  This setting is ignored for a mountain and plain scene.  See the illustrations of terrain type below.


SCENE TEXTURES DIALOG BOX

      3DEM allows you to apply texture bitmaps to the surfaces of the terrain, ocean, and sky.  Choose “Operation - Modify Textures” to bring up the Scene Textures Dialog Box for choosing texture bitmaps.  Click on any control on the dialog box above for an explanation of each function.


BLEND OR REPLACE

      Textures can be applied so that their colors either blend with the underlying terrain, or replace the colors of the underlying terrain.  The “Blend” and “Replace” buttons are used to make this selection.  In either case, the resulting surface is deformed and shaded to match the peaks and valleys of the underlying terrain.

REPEAT OR STRETCH

      Textures can either repeat many times across a surface, or stretch so that the texture exactly matches the surface and is only repeated once.  The “Repeat” and “Stretch” buttons are used to make this selection.  Choose  “Repeat” where you wish to apply a very fine pattern across an entire surface.  Choose “Stretch” where you have a large texture image that you wish to apply as a fixed background (such as clouds for the sky or a surface map overlay for the terrain).  Note that if you plan to use textures in generating a flyby animation that you must use the stretch option to fix the texture to the underlying terrain surface.  Otherwise, the texture image will move and flicker from frame to frame during the animation.

LOAD AND UNLOAD

      Use the “Load” and “Unload” buttons to choose a texture or discard a texture for either the terrain, ocean, or sky.  The texture you choose will be previewed in the small window above the selection buttons.  OpenGL textures must be square with sides equal to a power of two (128, 256, 512, 1024).  If your texture is an odd size, 3DEM will automatically expand its dimensions as necessary.  However, this expansion will introduce some distortion in the texture.  If distortion is a concern, be certain that the texture dimensions meet the OpenGL criteria.


TEXTURE OFFSETS

      Texture offsets are used to specify the coordinates in pixels of a surface map overlay which will be applied to the DEM as a texture in exact alignment with the underlying terrain features.  A surface map overlay is a bitmap which overlaps the same area as the underlying DEM.  The surface map and the DEM are aligned by specifying the coordinates (in pixels) of the southwest corner of the DEM as seen on the surface map, and by specifying the width and height (in pixels) of the DEM as seen on the surface map.  Both the DEM and surface map must be North-South aligned with no rotation.

      Xoff is the distance in pixels from the left edge of the surface map to the west longitude boundary of the DEM as seen on the surface map.   Yoff is the distance in pixels from the bottom edge of the surface map to the south latitude boundary of DEM as seen on the surface map.

      Wth is the width in pixels of the DEM as seen on the surface map, and Ht is the height in pixels of the DEM as seen on the surface map.

      These values must be measured as precisely as possible by loading the surface bitmap into a graphics utility such as Lview or Microsoft Paint and moving the cursor to each position.  They are then entered using the Scene Textures Dialog Box before rendering the scene.


COLOR ADJUSTMENTS
 SCENE COLORS DIALOG BOX

      You can adjust the colors of many features of either the overhead map or the 3D scene.  Choose "Operation - Modify Colors" to bring up the Scene Colors dialog box for selection of the terrain color scale.  Here you can select the terrain color at each of fourteen altitude steps.  Select an altitude using its button in Terrain Colors, and adjust its color using the Color Controls RGB sliders.

      You can also copy a color from one altitude to another, or create a smooth transition (or Spread) between colors at different altitudes.  To copy a color, choose its altitude button in Terrain Colors, press the "Copy To" button, and then select the altitude button at the point you wish to copy the color.  To spread colors, choose a starting point from the altitude buttons in Terrain Colors, press the "Spread To" button, and then select the desired end point from the altitude buttons to create a smooth transition of colors.

      You also have the option of adjusting the colors of the sky, the ocean, the edge of a foreground projection, or the text of the scene legend using the Other Colors buttons.

      And finally, you can select the Terrain Type for the 3D Scene.  Normally, terrain is a combination of mountains and plains with lighting determined by the azimuth and elevation of the illumination source.  However, if you are developing a scene containing the ocean's surface you may want the sea to appear as a uniform ocean color rather than appear as a brightly lighted plane.  Choose "Mountain/Plain" for normal scenery, or "Island/Ocean" for scenery including the ocean's surface.  You can also use the "Island/Ocean" setting for scenes in which there are rivers or lakes.


FRACTAL LANDSCAPE SCENES

      3DEM can produce 3D projections and flyby animations from random fractal landscapes.  Choose "File - Open - Fractal Surface" to generate a random fractal landscape.  You will be presented with a dialog box for choosing the "Seed" value for the computer's random number generator and the number of random elements (from 64 to 512) used in synthesis of the fractal surface.  Each Seed value will result in a unique surface.  Increasing the number of elements increases the roughness of the surface.  Experiment with these two controls to see the effect that they have on the surface produced.

SAVING IMAGES AS BITMAPS

      3DEM has several options for saving images as bitmaps.  The overhead map image can be saved in entirety as a Windows bitmap.  Choose "File - Save - Color Bitmap" from the overhead map display.  Enter a *.bmp filename, and the entire overhead map will be saved as a windows bitmap.

      The overhead map can also be saved as a 16 bit targa bitmap or height field which will allow you to import elevation data into the POV-Ray 3D ray tracing software.  Choose "File - Save - Height Field." First you will be presented with a dialog box for selection of the amplitude scale of the height field data.  Amplitude may be scaled to a maximum value of 65535.  After selecting the amplitude scale, a file save dialog box will appear.  Enter a *.tga filename, and the entire overhead map will be saved as a 16 bit targa height field.  Experiment with the choice of amplitude scale to obtain the best height field data for use in POV-Ray.

      Similarly, any 3D projection in either color or red-blue imaging, can be saved as a Windows bitmap.  After rendering a landscape scene, choose "File - Save - Color Bitmap." Enter a *.bmp filename, and the 3D scene will be saved as a Windows bitmap.


USGS DIGITAL ELEVATION MODEL (DEM) FILES

SOURCES OF DATA - DEM files are available via ftp for most of the United States and many other areas of the globe. A good selection of high resolution 7.5' DEM files for ftp download from

 ftp://spectrum.xerox.com/pub/map/dem/

The USGS offers a large selection of 1 degree DEM files at

http://edcwww.cr.usgs.gov/glis/hyper/guide/1_dgr_demfig/states.html.

A good choice is Grand Canyon East in the Arizona listing.  Be sure to download the compressed version.  The uncompressed DEM is about 10 MB.  You will need gzip (or winzip) to decompress these files.

Bruce M.  Gittings maintains a comprehensive listing of DEM data available world wide at

http://www.geo.ed.ac.uk/home/ded.html.

USING DEM FILES - Choose "File Open - Digital Map" and then choose the "USGS DEM" file type.  DEM files must be named *.dem to be recognized by the program.


USGS GTOPO30 DEM FILES

SOURCES OF DATA - Global 30 Arc Second Elevation Data Sets consisting of elevation measurements at intervals of 30 by 30 arc seconds (about 1KM) are available for the entire globe from

http://edcwww.cr.usgs.gov/landdaac/gtopo30/gtopo30.html

GTOPO30 DEMs are downloaded in compressed .tar.z format.  You can use Winzip 6.3 to decompress these files.  However, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.  You only need to decompress the *.dem and *.hdr files from the compressed archive file.  Winzip 6.3 can be downloaded from http://www.winzip.com/.

USING GTOPO30 DEM FILES - Choose "File - Open - Digital Map" and then choose the "USGS GTOPO30 DEM" file type.  Each GTOPO30 DEM file must be named *.dem to be recognized by the program.  In addition, each GTOPO30 DEM file has an associated header file named *.hdr containing

information about the number of rows and columns, the latitude and longitude limits etc.  This header file must be present in the same directory as the DEM file in order for 3DEM to determine these parameters.

SCENE LATITUDE AND LONGITUDE - After you load the GTOPO30 DEM, a dialog box will prompt you for the latitude and longitude of the area within the DCW which you wish to view.  Use the sliders provided to select a center latitude and longitude for an overhead map.  3DEM will choose an area of approximately 20 degrees in longitude by 10 degrees in latitude centered on the coordinates you choose.  A latitude corrected overhead map of this area will then be produced from which you can create individual scenes or flyby animations.  Note that the overhead map will not be rectangular in shape since latitude correction will compress the east-west dimension at high latitudes.


NASA MARS VIKING ORBITER DIGITAL TERRAIN MODEL (DTM) FILES

SOURCES OF DATA - DTM files for Martian landscapes are available on NASA CDROM.  Volume 7 of the 14 Volume Mars Digital Image Map collection contains the Digital Topographic Map of the entire surface of Mars.  This CDROM is available for a modest price from the National Space Science Center.  Contact request@nssdca.gsfc.nasa.gov to request a copy of the NSSDC CDROM catalog.

      DTM files on the NASA CDROM are named as "tg00n000.img" or "tg00s000.img" where "00n" or "00s" are degrees latitude (north or south) and "000" is degrees west longitude.  Note that 3DEM will also process the large scale "te" and "tc" DTMs on the NASA CDROM.  However, these files are so large that you should not attempt them without 16MB of RAM.  The CDROM also contains digital photographic images of the surface of Mars named as "mg00n000.img" or "mg00s000.img." Don't confuse these photo files with the digital topographic map files.

DTM files for Martian landscapes are freely available on line at

http://www-pdsimage.JPL.NASA.GOV/jukebox/viking/vo_2007/.

Here you will see a large group of folders with names beginning with the letters "mg" and "tg".  Always choose a "tg" folder to get digital maps ("mg" files are photo images).  The following files are good choices:

tg15S067.img	Valles Marineris area

tg00N067.img	Valles Marineris area

tg45S010.img	Crater Lohse

tg45S270.img	Crater Krishtofovich

tg45N070.img	Crater Tanais

Your best approach is to know in advance the latitude and longitude of a feature you wish to explore, and then select the appropriate map for downloading.

USING DTM FILES - Choose "File - Open - Digital Map" and then choose the "NASA Mars DTM" file type to select a DTM file.  DTM files must be named *.img to be recognized by the program.


MATRIX DATA FILES

SOURCES OF DATA - Matrix data files are also available on the Internet.  Try

 http://imager.ldeo.columbia.edu/ridgembs/ne_pac/html/home.html

as a source of bathymetric data from several ocean areas of the world.  Data which can be processed by 3DEM are available here as *.cdf files which are made up of a 1468 byte header followed by matrix elevation data in 32 bit floating point format (Big Endian).  The horizontal grid spacing , number of matrix columns and rows, and file size are given for most files.  Occasionally you will find a file for which only the number of columns or number of rows is given. You can calculate the missing dimension by the formula (Rows*Columns*4) + 1468 = (File Size).  Insert these values into the Matrix Data Format dialog box as described below.

Matrix data files of radar altimetry of Venus from the Magellan satellite are available at

 http://delcano.mit.edu/mgn/DATA/GxDR/gtdr/sinus/.

Data which can be processed by 3DEM are available here as *.img files which are made up of a 2048 byte header followed by 1024 column by 1024 row matrix of 16 bit signed integers (Little Endian) with a 5000 meter grid spacing.  Each *.img file has an associated *.lbl file with information about latitude and longitude and other characteristics of the data.  This is large scale data, so don't expect to see small detail in the surface.  However, you can produce high altitude flybys of Venus from this data.

USING MATRIX DATA FILES - Choose "File - Open - Digital Map" and then choose the "Data Matrix" file type.  You will be presented with a dialog box for specification of the needed matrix parameters as follows.

DATA FORMAT AND OFFSET - Elevation data must be defined as signed or unsigned 16 or 32 bit integers (INT OR UINT), or as 32 bit floating point values (FLOAT).  Also, if the matrix data file has a header section prior to the start of the elevation data, specify the header size here as "Offset" in bytes.

DATA BYTE ORDER - You must also specify the byte order of the elevation data.  Most data files produced by machines with Intel processors will contain "Little Endian" data in which the least significant byte is first in the data word.  Other computers (such as the Macintosh) will produce files of "Big Endian" data in which the most significant data byte is first in the data word.  You will find topographic data of both types on the Internet, and this selection gives you the option of processing both.

MISSING DATA - Some matrix data files will fill in missing data points with a fixed value other than zero.  Sometimes a large negative number such as -9999 is used to distinguish missing data points.  If you know this value, enter it here.  Otherwise enter zero.

MATRIX DIMENSIONS - You must also specify the matrix size as number of columns (width) and number of rows (height).  Column order may be specified as West to East, or East to West.  Row order may be specified as North to South, or South to North.

HORIZONTAL GRID SPACING - You must also specify the horizontal grid spacing for the data matrix.  This is just the physical distance between map grid points in the horizontal plane and usually varies from 10 meters to 500 meters or more.

VERTICAL UNITS - Finally, you must specify the unit of measure of elevation data stored in the data matrix (meters or feet).

OTHER CONSIDERATIONS - You may find large matrix files which require more system memory than you have available, or are so large that processing time is excessive.  When this happens, you can choose to load a partial matrix consisting of a limited group of matrix rows.  Choose a byte offset to the start of a row of interest, and then choose a limited number of rows to be analyzed.  The number of columns should always be equal to the full column dimension of the matrix file.


FILES NOT RECOGNIZED BY 3DEM
MISSING Opengl32.dll

      If your Windows 95 system does not have Opengl32.dll installed, you will receive an error message upon program startup.  You can obtain this file as a download from the Microsoft Opengl web page

http://www.microsoft.com/hwdev/devdes/opengl.htm.

You can also download this file from the 3DEM home page at

http://www.monumental.com/rshorne/3dem.html.

FILES NOT RECOGNIZED BY 3DEM

      File extensions must be of the proper type before files will load correctly.  3DEM expects that DEM and GTOPO30 DEM files will be named *.dem, and DTM files will be named *.img.  Any other file extension (*.*) designates the file as a data matrix of row and column data.  If a DEM or GTOPO30 DEM file which you download does not have the ".dem" file extension, you must rename the file before loading it into 3DEM.

 FAILURE OF GTOPO30 DEM DECOMPRESSION

      The GTOPO30 DEMs are downloaded in compressed .tar.z format.  If you use Winzip 6.2 to decompress these files, you MUST disable "TAR File Smart CR/LF Conversion" in "Options - Configuration." Otherwise, the decompressed file will have added bytes and will not be readable by 3DEM.

VERY SLOW OPERATION

      When memory is in short supply, Windows programs will attempt to use the hard drive as virtual memory.  When this happens to 3DEM, speed of operation becomes very slow.  The best remedy for this situation is to take action to reduce the memory shortfall.  This includes closing other running programs, choosing smaller sized maps, and of course installing more memory.


 POOR SCENE COMPOSITION

      For 3D projections in both the foreground and background, altitude, terrain tilt, and terrain vertical magnification combine to define the orientation and position of the 3D projection on the screen.  You will need to try different combinations of these values to obtain the most realistic 3D projection.  You will seldom create an acceptable scene without some experimentation with these parameters.

      Setting altitude too high or terrain tilt too small for a background scene can result in the scene being cut off at the sides or back, and not filling the field of view.  If this happens, reduce altitude or increase terrain tilt to fill the field view.

 MPEG FILES WHICH DO NOT PLAY

      Not all mpeg players are created equal.  If you are having problems playing mpegs from 3DEM, please get a copy of VMPEG (freeware) available at http://www.mpeg.org/index.html/MSSG/#source.