Multidimensional dynamic visualization

Implementation of landscape process simulation tools within a GIS has stimulated integration of GIS and computer cartography with scientific visualization (Brown and Gerdes 1992 (SG3d) Brown and Astley 1995 (NVIZ), Brown et al. 1995, Mitasova, Brown, and Hofierka 1994).

Scientific visualization is used as both a process of research and discovery and a method of communicating measured or modeled geographic phenomena. As a process of discovery, the visualization process is cyclical in nature, with immediate interactive visualizations feeding a refinement of the model. We have found that effective visualization of intermediate results during model development is vital for confirming modeled phenomena with measured results, and encourages more rigorous testing and evaluation of the model. Combinations of various graphical representations of raster, vector, and point data displayed simultaneously allow researchers to study and query all of their spatial data in 3D space. At the same time, visual analysis of data requires the capability to distort this spatial data by changing vertical scale, separating surfaces, performing simple transformations on point or vector data for scenario development, etc.

Our visualization software tools provide methods and tools for creating dynamic cartographic models representing landscape phenomena and processes. These tools display multiple dynamic surfaces and isosurfaces, together with draped raster, vector and point data in an appropriate projection of 3D space with selectable parameters of the visualization environment.

For interactive viewer positioning, scaling, zooming, etc., we use custom GUI widgets and a "fast display mode" where only wire mesh representations of the data are drawn. When rendering a scene, the user may select various preset resolutions for better control over rendering time. For positioning we also chose to use a paradigm of moving viewer rather than moving object because we think it is more intuitive when modeling a reality of generally immobile geography. As a result, the user feels as though they are flying around the geographic space, rather than holding it in their hand and rotating it. Horizons are kept level, resulting in less disorientation and fewer unnatural viewing angles. To focus on a particular object, the user simply clicks on the object to set a new center of view.

Initially, tools were implemented on the Silicon Graphics platform using a proprietary graphics library, IRIS GL. While the chosen interface language, Tcl, is publicly available for use on multiple platforms, the underlying graphics routines needed to be converted to OpenGL, a widely available graphic standard. Most of the tools have now been converted to use the OpenGL graphics API. Implementaion resulted in the creation of several specialized visualization applications and utilities, a multi-purpose viewer application, several application programmer interface libraries (APIs) (see Appendices 1 & 2), and enhancements to existing open source software.

GRASS GIS, as an open system with a full range of GIS capabilities, has provided a sound basis for testbed development of visualization tools. Each GRASS data type (raster, vector, and site) plus our own 3D grid format may be used for visualization in a single 3D space. In our implementation, there are four object types and various ways to represent each.

Surfaces. A surface requires at least one raster data set to represent topography and may use other raster data sets to represent attributes of color, transparency, masking, and shininess. These data sets may have been derived from vector (e.g., countour) or scattered point data using tools within the GIS. Users are allowed to use a constant value in the place of any raster data set to produce, for example, a flat surface for reference purposes or a constant color surface.

Vector sets. 3D vector sets are not currently supported, so in order to display 2D vector sets in 3 dimensions, they must be associated with one or more surfaces. The 2D vector sets are then draped over any of these surfaces.

Site Objects. Point data is represented by 3D solid glyphs. Attributes from the database may be used to define the color, size, and shape of the glyphs. 2D site data must be associated with one or more surfaces, and 3D site data may be associated with a surface (e.g., sampling sites measured as depth below terrain).

Volumes. 3D grid data may be represented by isosurfaces or cross sections at user-defined intervals. Color of the isosurfaces may be determined by threshold value or by draping color representing a second 3D grid data set over the isosurfaces. Implementation and initial testing of a 3D grid data file format for managing volumetric spatial data was completed. The storage format and programmer's interface routines we developed allows random access to compressed floating point double precision 3D data with caching. It is fully integrated within the GIS, using the established database hierarchy for header and data files. The resulting library was used to write several utility applications such as r3.in.ascii, r3.out.ascii, r3.in.grid3, r3.mask, r3.null, r3.info, g3.region. In addition, a program r3.mkdspf reads the 3D grid data and creates a "display" file containing geometry for drawing isosurfaces to represent the data for visualization purposes. Future work will incorporate the 3D grid file and display file formats for use within visualization tools. The specification and design documents for our 3D grid API, and the function prototypes may be found at: http://www2.gis.uiuc.edu:2280/modviz/htdoc/g3d/specification.html http://www2.gis.uiuc.edu:2280/modviz/htdoc/g3d/protos.html

For visualization purposes, point data is often used to derive an artificial surface or a volume from which isosurfaces may be calculated; for modeling purposes such derived data is used as input for models that work with grids or volumes. When interpolating terrain from point data, it is easy to see undershoots or overshoots by displaying measured sites as spheres and seeing how the interpolated surface passes over, under, or through the spheres. Parameters of the model are then adjusted and the surface is re-interpolated until satifactory results are obtained. Similarly, a mis-measured point is easy to spot when visualized by 3D position and color. While statistical tools are helpful in analyzing data validity, we find that many erroneous data points that are well within reasonable range and may otherwise be considered valid are easy to detect using spatial-temporal visualization tools.

Qualitative pre-selection of raw data points can help eliminate data with low certainty. We developed tools (d.siter, Appendix) that allow selection and visualization of subsets of data directly within the GIS in the native multi-attribute site format. From data consisting of soil cores we were able to quickly sort out cores with a particular range of particle size at specific depth ranges, or desired color characteristics, helping us to verify soil horizons.

Visualization tools have been improved to allow multiple attributes/dimensions of point data to determine the shape, size, color and orientation of solid 3D markers as well as the 3D position (SG3d Upgrades, Appendix). Given a value for an attribute of the data at a particular site, visualization is accomplished by mapping the value to one or more characteristics of the marker. In the case of color, three attributes (representing red, green, and blue components) may be used to map a single characteristic, color. For each data attribute, the 3D viewer allows a transformation consisting of an addvalue and a multiplyvalue which converts the data value to visualization units, preventing duplication of data in the database solely for the purpose of visualization and allowing the researcher to more freely explore visualization combinations.

Variable shape is accomplished by having an "alternative" size field which is used to scale the marker vertically. Plans to allow scaling the marker differently in each dimension according to attributes of the site data will further enhance the variability of shape. Using time stamps representing data measurement times, it is possible to visualize data collection sites and measured values in compressed time, drawing the site markers at intervals proportionally representing the time of measurement, and perhaps using derived data as a background surface. Such methods may highlight, for example, a measurement interval in which instruments were improperly calibrated, a period of sparse measurement, inadvertant influence due to spatial measurement patterns, or dramatic change that would need to be investigated further. In such cases, much of the dataset may be found to be useful and valid and only the bad data may be discarded, where otherwise the conclusion may have been that the entire dataset was unusable.

Scripting is used to create animations from series of data, automatically loading the data sets and rendering frames for the animation. Animation is useful for representation of change in time, change in a modeling parameter (Ehlschlaeger 1994), change in viewer position (fly-bys) or change in visible data. A keyframe technique is used to generate animations when there is no change in data, e.g., to create fly-bys or show a series of isosurfaces in volumetric data. (Mitasova, Brown, and Hofierka 1994, Brown et al. 1995) (Also see nviz Tutorial in Appendix ) FIGURE 9A shows several frames from an animation where a fence cut is moved through data to better view underlying surface structure. We implemented animation capabilities in both 2D (xganim, FIGURE 9B and Appendix, r.out.mpeg, Appendix) and 3D (NVIZ, Appendix) tools.

Producing an animation of the data involves redrawing the scene repeatedly with slightly changing data or viewpoint, saving each resulting image, and then combining them into a movie using multimedia tools. Our scripting mechanism records the actions of the user while also allowing the use of loops. An integrated tool in the GUI provides methods for building the script, including functions such as Open Loop, Close Loop, Open File Sequence Loop, and Close File Sequence Loop, which help in the creation of animations by allowing a sequence of actions to be applied to a sequence of data files. Similarly, a File Sequence Tool allows iteration of data associated with the raster, vector, and site maps for producing the most common type of data visualization animation, where data has been precalculated to represent a timestep or change in modeling parameter and there will be no change in viewer position. This tool also makes it easy to add a somewhat constant dataset such as roads for better spatial reference. For more details on the use of animations for erosion modeling see Mitas et al 1996 and Mitas et al 1997.

Multiple surfaces have proven useful to visualize boundaries of layers when examining soil core data and soil horizon crossections. Achieving intuitive visual representations of these horizons presents a technical challenge in terms of dimensional scale, as demonstrated by FIGURE 10. The vertical dimension is often quite small relative to the other two (eg, soil depth of a few meters vs. region dimensions of several kilometers), so is often exaggerated when a single surface is displayed. This exaggeration is usually adequate to add relief to an otherwise featureless surface, but in order to separate close stratified layers, the required exaggeration grossly distorts the modeled layers. If vertical translation of a surface is used to separate surfaces enough that they may be viewed separately, intersections between horizons and relative distances are misrepresented. This is unacceptable since these may actually be the features we are interested in viewing. To study differences between two similar surfaces, we use a scaled difference approach where only the spatial distance between surfaces is exaggerated, maintaining correct surface intersections.

Querying a 2D data set displayed as a raster image can be thought of as a scale operation and a translation operation. When a user clicks on a pixel, the relative position in the image is scaled by the resolution of a pixel and the north and east offsets are added to obtain the geographical position. When displaying surfaces in 3D space with perspective, however, clicking on a pixel on the image of the surface really represents a ray through 3D space. The point being queried is the intersection of this ray with the closest visible and unmasked part of one of the objects in the display. One method for 3D querying provided by some graphics libraries is a "selection" method, where objects are "redrawn" without actually drawing to the screen, and any objects drawn at the query point are returned as the "selected" objects. This method is slow and at best the returned object is a polygon rather than a specific point on the polygon.

When evaluating surfaces made up of relatively large polygons or irregular triangular meshes, the extent of a queried polygon may overlap or encompass several measured points, or the polygon may be textured by points derived from a related dataset consisting of higher resolution data. Therefore a more precise 3D querying mechanism became necessary.

To solve the general problem of querying multi-resolution data in 3D space, we require the user to specify the type of data they are querying (surface, point, or vector) and then use our knowledge of the geometry of that data to perform a geometric query in 3D. FIGURE 11 shows that using cutting planes can allow the user to query a specific location on a surface that is covered by another surface. This specialized point-on-surface algorithm can be outlined as follows: 1. Transform point on view plane to a view ray. 2. Intersect view ray with convex polyhedron defined by the intersection of the parallelepiped view region with any user defined cutting planes. 3. If ray enters this polyhedron, trace ray to find any intersections with visible and unmasked parts of any surfaces. 4. Choose closest intersection to viewer (or return an ordered list). Such point-on-surface functionality is useful for 3D data querying, setting center of view and setting center of rotation for vector transformations.