>  Docs Center  >  Using ENVI  >  Using 3D SurfaceView

ENVI

Using 3D SurfaceView

3D SurfaceView

Use ENVI’s 3D SurfaceView window to visualize elevation or other surface data in 3D. You can use 3D SurfaceView to do the following:

  • Display the surface data as a wire-frame, a ruled grid, or as points.
  • Drape the surface data with a gray scale or color image, and overlay it with ROIs and vectors.
  • Rotate, translate, and zoom in and out of the surface in realtime using the mouse cursor or the 3D SurfaceView Controls dialog. The cursor is also linked to your draped image allowing cursor locations, values, and profiles to display from the 3D view.
  • Define a flight path (interactively or with a drawn annotation). You can animate the flight path to produce 3D fly-throughs of your data. You can control the vertical and horizontal view angles fly through your data at a constant height above the surface or at a constant altitude.
  • Use perspective controls to place the visual perspective in the 3D SurfaceView and rotate the surface around that perspective.

See the following sections:

Display 3D Files


  1. From the Toolbox, select Terrain > 3D SurfaceView. The Select 3DSurfaceView File dialog appears.
  2. Select the bands you want to display and drape over your DEM (or other 3D dataset). ENVI uses the entire image as the overlay image on the DEM unless both the image and DEM files are georeferenced.
    • If both files are georeferenced, then ENVI uses only the part of the image that overlaps with your DEM.
    • If the DEM is subset, then ENVI subsets the georeferenced image to match. The spatial resolutions of the two files do not need to be the same.
    • If both the image and the DEM are georeferenced, they do not need to be in the same projection. ENVI reprojects the DEM on the fly to match the image projection.
  3. Click OK. The Associated DEM Input File dialog appears.
  4. Select a DEM file and perform optional spatial subsetting, then click OK. The 3D SurfaceView Input Parameters dialog appears.
  5. Note: If a DEM is already associated with the input image file in the image header, ENVI uses the associated DEM by default (it does not prompt you to select a DEM).

  6. Select the DEM Resolution (number of pixels) check box to use for the 3D plot. You can select more than one resolution. Typically, use the lowest resolution (64) while you are determining the best flight path, then use a higher resolution to display your final fly-through sequence.
  7. Note: Using higher DEM resolutions significantly slow the display; use higher resolution settings only on powerful platforms.

  8. Select one of the following as the Resampling method:
    • Nearest Neighbor: To resample using the nearest DEM value. For example, if your DEM resolution is 30 meters and your image resolution is 60 meters, nearest neighbor resampling uses every other pixel and every other line to create the DEM in the 3D window.
    • Aggregate: To average all the DEM values that contribute to the output pixel. For example, if your DEM resolution is 30 meters and your image resolution is 60 meters, pixel aggregate resampling averages four pixels to create the output DEM.
  9. Enter the DEM min plot value and DEM max plot value if desired. ENVI does not plot DEM values lower than the minimum value and higher than the maximum value in the 3D views.
  10. Enter the Vertical Exaggeration, if any, to produce a true scale vertical exaggeration applied to the z axis where higher values correspond to greater exaggeration. The default is 5.0.
  11. Select one of the following for Image Resolution:
    • Full: Use the highest possible resolution. If you have a large image, full resolution may cause you to run out of memory.
    • Other: Use Nearest Neighbor or Aggregate as the resampling method.
  12. Set the High Resolution Texture Mapping toggle button to Off or On. The default is On. When set to On, and a higher resolution image is available, ENVI uses the high resolution image when you zoom in to your the 3D SurfaceView. The input image must be at least 1024 x 1024 pixels in order for the High Resolution Texture Mapping parameter to have a noticeable effect in the 3D SurfaceView.
  13. Note: Using the High Resolution Texture Mapping option may slow the zoom and fly-through features of the 3D SurfaceView.

  14. To perform optional spatial subsetting, click Spatial Subset and select a spatial subset of the image.
  15. The spatial dimensions of the DEM and image do not need to be same. ENVI displays the full dimensions (or selected subsets) of both datasets.

  16. Click OK. The 3D SurfaceView plot window appears.

Mouse Button Functions


Use the following mouse button functions to interactively rotate, translate, and scale the surface. You can also control the rotation, translation, and zoom by selecting Options > Surface Controls from the 3D SurfaceView window menu bar.

To reset the surface plot to its original position, select Options > Reset View from the 3D SurfaceView window menu bar.

The 3D SurfaceView window mouse button functions are as follows:

Mouse Button

Function

Left

Click and drag horizontally to rotate the surface around the z axis.

Click and drag vertically to rotate the surface around the y axis.

Double left-click on the surface to go to a pixel in the Image window view.

Middle

Click and drag to translate (move) the image.

Right

Click and drag to the right to zoom in.

Click and drag to the left to zoom out.

Display Cursor Location and Value

If the Cursor Location/Value dialog is open, ENVI reads the approximate x,y,z (elevation) values from the 3D SurfaceView. If your draped image is georeferenced, ENVI also reports the map locations.

To move the Zoom window to a specific pixel in the Image window containing the draped image, double left-click on the pixel in the 3D plot. Both the DEM and the image must be in the same projection for this to properly function.

Control the Surface Display


To access the 3D SurfaceView Controls dialog, select Options > Surface Control in the 3D SurfaceView window. When the 3D SurfaceView Controls dialog appears, use the buttons, text fields, and controls described in the following sections to control the surface display.

At any time, you can return the surface to its original settings by clicking Reset View in the 3D SurfaceView Controls dialog. The surface returns to its original orientation, but the dialog settings are retained.

Rotate, Translate, and Zoom

In addition to using cursor functions to manipulate the 3D SurfaceView plot, you can also perform these functions using controls in a dialog.

The Rotation/Scale/Translation Controls area in the 3D SurfaceView Controls dialog contains buttons you use to control the plot in the following ways:

  • Click the curved arrow buttons to change the rotation of the surface plot in the direction desired. Use the Inc field to change the rotation increment. The default is 5.
  • Click the + or - buttons to zoom in or out of the surface plot. Use the Inc field to change the zoom increment. The default is 0.10.
  • Click the arrow buttons to move the surface plot in the desired direction. Use the Inc field to change the translation increment. The default is 0.05.

Change the Surface Properties

The Surface Properties area in the 3D SurfaceView Controls dialog contains parameters that control vertical exaggeration, depth offset, surface style, and DEM resolution surface properties. Use the parameters as follows:

  • Set the Vertical Exaggeration for the plot. The value you enter produces a true scale vertical exaggeration applied to the z-axis, where higher values correspond to greater exaggeration. The default value is 5.0.
  • Enter the value of the Depth Offset to obtain the best results for your graphics card. This value is only used for hardware rendering (renderer = 0). The default value is 25.

Increasing the value reduces the amount of vector stitching through the textured surface. Too large offset values may cause the textured surface to disappear entirely.

For the best results, start with a high resolution DEM and a small initial Depth Offset value, then increase the Depth Offset value until the vector stitching is eliminated.

The Depth Offset setting is only retained in your current ENVI session. To change the default value, edit the surfaceview depth offset parameter in the ENVI configuration file menu\envi.cfg.

  • Use the Surface Style drop-down list to select to plot the 3D SurfaceView plot with a Texture image draped over it, as a Wire mesh, as a Ruled XZ surface, as a Ruled YZ surface, or as a Point surface.
  • Click DEM Resolutionto choose the resolution (used for the plot) from the available DEM resolutions. If you selected more than one DEM resolution in the 3D SurfaceView Input Parameters dialog, you can select from any of these resolutions.

Use the Perspective Rotation Controls

The Perspective Controls area in the 3D SurfaceView Controls dialog allows you to select a point in the 3D SurfaceView plot to specify a perspective origin around which ENVI rotates the surface.

  1. Click the figure icon button to toggle the cursor to select mode.
  2. Move the arrow cursor onto the 3D SurfaceView plot and select the plot to set the origin of the rotation.
  3. The view zooms to the new origin of the perspective which is set at a height that is 0.05 normalized units (default) above the surface and the surface begins to rotate. You can modify the height of the perspective origin above the surface using the Translation controls in the 3D SurfaceView Controls dialog.

    If a perspective rotation was not initiated, click Start to begin rotating the surface around its center point.

    Click Stop to pause the current rotation.

    If the cursor is in select mode, but a perspective origin in the surface was not chosen, clicking Stop toggles the cursor out of select mode.

  4. Enter the value for the Rotation Delay. The delay value is the number of seconds to wait between successive renderings of the rotating surface. The default value is 0.05. Setting the value to 0.0 sets the rotation speed to your computer’s limits for calculating the transformation matrix and rendering the surface.
  5. To change the direction of the rotation of the surface, click Direction and select either Left or Right. Direction refers to the rotation direction of the surface, not the viewer’s perspective. The default rotation direction is Right.

Define and Display Flight Paths


When defining a flight path in 3D SurfaceViews, you have the choice of using a User Defined path mode or Annotation path mode. In User Defined mode, you fly through your data based on a flight sequence you define. In Annotation mode, you fly through your data based on an annotation flight path. The annotation must be drawn on the image from which the surface plot was created or imported from a saved annotation file.

  1. To work in either mode, select Options > Motion Controls from the 3D SurfaceView window menu bar. The 3D SurfaceView Motion Controls dialog appears.
  2. From the 3D SurfaceView Motion Controls dialog menu bar, select Options > fly_through_mode.

Define a Flight Path in User Defined Mode

Use the User Defined mode to define a flight path and to play a sequence of views that fly-through your data.

  1. In the 3D SurfaceView Motion Controls dialog, select Options > Motion: User Defined Views.
  2. In the 3D SurfaceView window, click to select the starting projection (view) for the fly-through.
  3. In the 3D SurfaceView Motion Controls dialog, click Add to add the selected projection to the flight path.
  4. Click with the mouse to select another projection and click Add. ENVI interpolates the flight path smoothly interpolated between the two projections.
  5. Repeat selecting projection steps until you have selected as many as desired (only two are required).
    • To replace a projection in the flight path list, select the path view number and click Replace.
    • To delete a projection in the flight path list, select the path view number and click Delete.
    • To clear the flight path list, click Clear.
  6. Enter the number of frames to use in the fly-through animation. ENVI interpolates the flight path smoothly interpolated between the two projections.
  7. Click Play Sequence to animate the fly-through.
  8. To control the speed and direction of the fly-through, select Options > Animate Sequence in the SurfaceView Motion Controls dialog.

Define a Flight Path in Annotation Mode

Use Annotation mode to define a flight path based on annotation. Use a polyline, polygon, rectangle, or ellipse annotation object to define the flight path. You can control the vertical and horizontal look angles, fly at a constant elevation above the DEM terrain, or fly at a constant altitude.

To use Annotation mode, you must have annotation drawn on the Image window from which the 3D SurfaceView was created, or have the desired annotation object saved in an annotation file (.ann).

  1. From the 3D SurfaceView Motion Controls dialog menu bar, select Options > Motion: Annotation Flight Path. The Input Annotation Flight Path dialog appears.
  2. Select whether to import annotation from the display or from a file.
    • If you select the option to input the annotation object from an Image window, select the annotation object.
    • If you select the option to import the annotation object from a saved annotation file, select the annotation (.ann) file and object.
  3. ENVI displays the selected annotation object, number of nodes, and the number of points display in the middle of the 3D SurfaceView Motion Controls dialog and plots the flight path in the 3D SurfaceView window.

    Note: If you are already in Annotation mode and want to input annotation, select File > Input Annotation from Display or Input Annotation from File from the 3D SurfaceView Motion Controls dialog menu bar.

  4. To smooth the flight path by using a running average of points along the line, enter the number of points to use in the average in the Flight Smooth Factor field.
  5. To fly over the surface at a constant height above the DEM terrain, click the toggle button until Flight Clearance appears and enter the height (in the same units as the DEM).
  6. To fly over the surface at a constant elevation, click the toggle button until Flight Elevation appears and enter the elevation above sea level (in the same units as the DEM).

  7. To adjust the vertical look angle, enter the angle, in degrees, in the Up/Down field. A vertical look angle of -90 degrees looks straight down at the surface. A look angle of 0 degrees looks straight ahead (horizontal).
  8. To adjust the horizontal look angle, enter the angle, in degrees, in the Left/Right field. A horizontal look angle of -90 degrees looks to the left, a look angle of 0 degrees looks straight ahead, and a look angle of 90 degrees looks to the right.

  9. To turn the annotation flight line trace off and on, select Options > Annotation Trace from either the 3D SurfaceView Motion Controls dialog or the 3D SurfaceView window menu bar.
  10. Enter the number of frames to use when animating the data fly-through in the Frames field.
  11. Click Play Sequence to animate the fly-through. To have the sequence repeatedly restart when it reaches the end, select Options > Loop Play Sequence from the 3D SurfaceView Motion Controls dialog menu bar.

To control the speed and direction of the fly-through, select Options > Animate Sequence.

Animate Flight Paths

Use Animate Sequence while in either User Defined or Animation modes to display and fly through your 3D SurfaceView plot in an Animation window. In the Animation window, you can control the characteristics of your fly-through with more precision than in the 3D SurfaceView Motion Controls dialog:

  1. From the 3D SurfaceView Motion Controls dialog menu bar, select Options > Animate Sequence. The 3D SurfaceView plot displays in the ENVI animation window.
  2. See Control the Surface Display for details about using animation controls. The first few times through, the frame sequence may be slow until the frames are put in memory.
  3. To save the animation to a MPEG (Moving Picture Experts Group) file, select File > Save as MPEG.

Save Flight Path Sequences to Files

To save the current flight path to a file:

  1. From the 3D SurfaceView Motion Controls dialog menu bar, select File > Save Sequence to file.
  2. Enter an output filename with the extension .pat for consistency.

To restore a previously saved flight path, select File > Restore Sequence from file from the 3D SurfaceView Motion Controls dialog menu bar and select the .pat filename. Restoring is only available in User Defined mode.

Export Flight Path Sequences to MPEG Files

Note: When creating MPEG files, you must be aware of the capabilities of the MPEG decoder you will be using to view it. Some decoders only support a limited set of sampling and bit rate parameters to normalize computational complexity, buffer size, and memory bandwidth. For example, the Windows Media Player supports a limited set of sampling and bit rate parameters. In this case, it is best to use 352 x 240 x 30 fps or 352 x 288 x 25 fps when determining the dimensions and frame rate for your MPEG file. When opening a file in Windows Media Player that does not use these dimensions, you will receive a Bad Movie File error message. The file is not bad, this decoder just does not support the dimensions of the MPEG.

To export a flight sequence to an MPEG (Movie Picture Experts Group) file:

  1. From the SurfaceView Motion Controls dialog menu bar, select File > Save Sequence As MPEG. The Output Sequence to MPEG Parameters dialog appears.
  2. The default output size of the MPEG image window is the Windows standard. To change the output window size, enter the size (in pixels) in the MPEG Output Size fields.
  3. Enter the Number of Frames (individual views) to include in the output flight sequence (movie).
  4. More frames make a longer sequence, but also make a larger output file.

  5. From the MPEG Frame Rate drop-down button, select a rate in frames/second.
  6. Enter the MPEG compression quality.
  7. Enter a duplication factor in the Duplicate Frames field, if desired. Duplication helps to make the MPEG output appear smoother. For example, a duplication factor of 2 will duplicate each frame and double the number of output frames.
  8. Enter an output filename.
  9. Click OK. ENVI writes the output MPEG file in two steps. The second step cannot be cancelled, and may take up to many seconds per frame.
  10. The compression is a lossy compression where 0 is lowest quality and 100 is highest quality (no compression). Entering a compression quality factor less than 100 decreases the amount of disk space used to store the MPEG output.

Control the Perspective


In addition to the Perspective Controls in the 3D SurfaceView Controls dialog, you can also view the surface view panoramically (as if you were standing in the image) with the Position Controls dialog.

  1. From the 3D SurfaceView window menu bar, select Options > Position Controls. The 3D SurfaceView Position Controls dialog appears.
  2. Click the toggle button to select Map Coord for georeferenced images, or Pixel Coord for non-georeferenced images. The default is Pixel Coord.
    • If you select Pixel Coord, enter the Sample and Line coordinates of where you want to stand in the image.
    • If your image is a subset of a larger image, you can use the x and y pixel offsets from the header file by clicking the Use Offset toggle button to Yes.

    • If you select Map Coord, enter the map coordinates of the location where you want to stand and click Change Proj to change the projection (if desired).
  3. In the Auto Apply field, select whether or not to apply changes automatically by selecting Yes or No.
  4. Select from the following options to change your position and viewing angle in the surface view image.
    • To change the location where you are standing, double left-click on a spot in the Image window to automatically move to that location.
    • The location change is reflected in both the Image window and the 3D SurfaceView window.

    • To change the azimuth look direction (north = 0 and angles increase clockwise), use the Azimuth slider bar or fields in the 3D SurfaceView Position Controls dialog.next to the label. To change the angle in increments of five degrees, middle-click on the Azimuth arrows.
    • To change the elevation angle from which you are looking, use the Elevation slider bar next to the label. To change the angle in increments of five degrees, middle-click on the Elevation arrows.
    • An angle of 0 degrees is horizontal and a negative angle is down looking.

    • To change the distance from which you are looking down on the image, enter a number in the Height Above Ground field or use the increase/decrease buttons to change the height.
  5. The units used should be the same as the DEM elevation units.

  6. Click Apply.

Change the Background Color


You can change the background color of the 3D SurfaceView plot.

  1. From the 3D SurfaceView window menu bar, select Options > Change Background Color. The 3D SurfaceView Background Color dialog appears.
  2. From the drop-down list, select RGB, HLS, or HSV.
  3. Click Color and select a color from the resulting menu, or set color values by using the corresponding slider bars and fields.
  4. Click OK.

Import Vectors and ROIs


Use Import Vectors to overlay ROIs and vector layers on the 3D SurfaceView plot.

You must have ROIs or vectors displayed in the original image display from which the 3D SurfaceView was created.

  1. From the 3D SurfaceView window menu bar, select Options > Import Vectors.
  2. All of the ROIs and vectors from the image are overlaid on the 3D SurfaceView plot.

  3. When ROIs and vectors are overlaid, select from the following options in the 3D SurfaceView window menu bar:
    • To remove a layer or layers, select Options > Remove Vectors and select the layers to remove.
    • To turn the display or hide layers, select Options > Plot Vector Layers. Hiding layers does not remove them from the 3D SurfaceView plot.
    • To display the vectors and ROIs while interactively positioning and moving the 3D SurfaceView image, select Options > Plot Vectors on Move.
    • To avoid slow interactive repositioning when many vectors and ROIs are overlaid, deselect Options > Plot Vectors on Move.
    • To change the appearance (for example, line thickness, color) of vectors or ROIs in the 3D SurfaceView plot, first make the changes to the vectors in the original image, then re-import the vectors from the image into the 3D SurfaceView.

Smoothing 3D Images


To smooth 3D Surface View Images that appear pixelated, select Options > Bilinear Interpolation. To disable the smoothing effect, select Options > Interpolation: None.

Manage SurfaceView Files


Use the File option in the 3D SurfaceView window menu bar to save the plot to an image file or a Virtual Reality Modeling (VRML) file, or to print the plot. Select one of the following from the 3D SurfaceView window menu bar:

  • To save a surface view as an image file, select File > Save Surface As > Image File.
  • To save a surface view as a VRML 2.0 file, select File > Save Surface As > VRML.

If you are using a Cosmo Player to view the VRML file, set the Cosmo Player preferences as follows to view the file. In the Cosmo Player menu:

Select Preferences > Performance from the ENVI Classic menu bar.

Select Fastest for Image/Texture quality.

Unselect the option Enable specular and emissive color.

  • To print a 3D SurfaceView plot, select File > Print.

See Also


Topographic Shading, Topographic Modeling, Create Hill Shade Images



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us