INTERACTIVE VISUALIZATION OF TERRAIN MODELS AND ORTHOPHOTOS Lionel Dorffner, assistant professor * Abstract Nowadays, generating data of high quality and high accuracy is not sufficient any more for convincing customers and sponsors. At least equally important is an appropriate and impressive way of data presentation. As a consequence, an additional module to SCOP has been developed and implemented. The new AnimatedTerrain Model (ATM) tool provides an easy way for preparing and exporting SCOP DTM (Digital Terrain Model) data and orthophoto mosaics for interactive 3D visualization with the help of VRML. As the VRML format was intended to be used for Internet applications, it has been designed to handle a reasonably small amount of data. Therefore, the ATM development concentrated on processing and interactive visualisation of extensive data sets, as they are common in DTM and orthophoto applications. This article describes the possibilities and limitations of the VRLM format in that context with the help of spaceborne and airborne imagery. KEY WORDS: interactive, DTM, visualization, virtual reality, animation, VRML, SCOP 1. INTRODUCTION 205 Today digital terrain models (DTM) and orthophotos are both standard product of photogrammetric restitution. The quality of the terrain model -and furthermore of the orthophoto - depends on the technique used for primary data acquisition as well as on the software used for generating and storing the terrain data structure. For the acquisition we can distinguish between the following methods [Gruen A., 1 998]: • digitization of maps (simple way, sometimes necessary if no other sources are available - only usable, if old maps already exists) • tachymetry (method of engineering surveying - only viable for small areas) • aerial photographs (traditional method - best tested and proved to give good and accurate results) • laser scanning (new and promising technique, especially for deriving surface models - very fast although not fully tested yet) • other remote sensing techniques (best suited for very large areas, where high accuracy is not of main interest.) * Institute of Photogrammetry and Remote Sensing, Vienna University of Technology Geodetski vestnik 44/2000 - 3 The most relevant forms of discrete terrain representation are: • regular grid (simplest representation, often the result of automatically generated DTMs on Digital Photogrammetric Stations - contains no further structure information, only 2.5D, compact storage capability) • triangular irregular network (triangulation including all measured points -breaklines and formlines are maintained in the stored data, full 3D is possible, much greater data amount as for regular grids) • hybrid structure (regular grid with additional information about breaklines and formlines, also combination with TIN areas is possible) [Kraus K., Jansa J., Kager H., 1997] The quality of the computed orthophotos also depends a lot on the used DTM. Concerning orthophotos for small scale (pixelsizes greater than 10 m) a regular grided DTM will be sufficent to obtain good results. For large and medium scale orthophotos the used DTM should also consist of additional structure information. If orthophotos with pixelsizes of 1 m or less have to be generated also buildings must be taken into account. 2. VISUALIZATION 206 Digital terrain models and orthophotos are widely used and a lot of products can be derived from them (isolines, profiles, perspective views, intersection with other data, volume calculations). Such results are used either as the basic information for further analysis or as final plots for visualization and presentation (Figure 1). Figure 1: DTM representation of isolines, breaklines, formlines and outlines of buildings. Geodetski vestnik Depending on the object information and level of complexity there are different levels of visualization for the derived products mentioned above (wire-frame, shading, texture mapping, integration of other data such as roads, buildings or thematics). All these outputs can be produced with high quality and accuracy and therefore are suitable for a lot of applications. A disadvantage of these outputs is the lack of flexibility. A shaded and texture mapped perspective view of a DTM is a very illustrative tool for giving a more realistic appearance to landscape and larger areas, but it is still a static view of a much more complex model. To show the complexity, a lot of different plots from different points of view have to be created. In some cases, especially when discussing with customers and sponsors, it is of the same importance to present results in an appropriate and more impressive way. Imagine your customer can move over the DTM and explore and analyze the model in real time! As in today's world everything is rotating and moving it seems obvious to look for a possibility to perform interactive, dynamic, real time DTM visualization and animation. The problems that arise are not issues of basic algorithms (computer graphics has reached a high level of sophistication), they are rather problems of handling very large data sets under time-constrained conditions. Some of ^gy the requirements for efficient visualization are distributed worlds, levels of detail and image compression. "Distributed worlds," means that the whole DTM is divided into different parts, each one representing an own smaller DTM. So, only the visible parts (determined by using a viewing pyramid) need to be loaded. Using this concept, the amount of data to be hold in memory at the same time can be reduced by approximately 75 percent on average. A further increase of performance can be achieved by utilisation of levels of detail (LOD). "LOD is a mechanism used in computer graphics to improve the drawing speed of complex scenes [ Clark J.H., 1976]. Each object is stored several times in different levels of quality (levels of detail). During visualization each object is drawn in the optimal level of detail. The chosen level depends on the size of the object in the current view. Objects that appear small can be drawn in little detail (and therefore very fast) without loosing quality; in contrast, objects near the point of view that cover a lot of space on the screen need to be rendered in full quality." [ Kofler M., Rehatschek H., Gruber M., 1996]. Although the total amount of data is increased by storing different LOD in a pyramid structure, the current memory demand during interactive visualization can again be reduced dramatically. Geodetski vestnik 208 As a last way of data reduction, image compression should be mentioned here. When visualizing a DTM together with an orthophoto as texture source more than 99 percent of the data is needed to store photo texture in an uncompressed way. Experiments prove that lossy compression techniques, such as JPEG, shrink the original texture files to some 5 percent of its former size without significant loss of quality. Although uncompressed during visualization the texture can be stored in small files thus enabling faster loading from disk. Decompression in memory is much faster than disk reading. The resulting loss of information and accuracy is acceptable, as the images are used mainly for visualization and animation purposes. 3. IMPLEMENTATION More than 25 years ago a modular program system (SCOP) for the generation and management of high-quality DTM data with a hybrid data structure was developed at our institute in Vienna (Institute of Photogrammetry and Remote Sensing [http://www.ipf.tuwien.ac.at]) in very close cooperation with INPHO GmbH in Stuttgart (Germany) [http://www.inpho.de/scop.htm]. In the course of the years the functionality of SCOP has continuously been extended and improved. The DTM is integrated in SCOP as the central database, and so it is possible to derive in a very flexible way (using additional modules) numerous follow-up products. Some important modules are: ISOLINES (derives isolines from any digital surface described in the data structure of SCOP, this can be elevation models, slope models or difference models) DOP (generation of digital orthophotos based on the high quality DTM data structure) PERSPECT (produces static 3D views of the DTM in form of a perspective representation or a parallel projection) PROFILE (interpolates single heights and height profiles - longitudinal, parallel, cross-sections - for any polygon position within the DTM area) TDM (management and archiving of huge amounts of terrain data using a relational data base system with efficient geometric queries) As a consequence of the increasing demand for interactive visualization an additional module to SCOP has been developed and implemented. This new Geodetski vestnik Animated Terrain Model (ATM) tool provides an easy way for preparing and exporting SCOP DTM data for interactive 3D visualization. If the exported area is also covered - maybe only partly - by an orthophoto or an orthophoto mosaic this image data can be mapped as texture information over the animated terrain model. Areas without texture information are visualized as gray shading. In addition the predefinition of viewpoints and even a whole camera path for an automatic flight through the model can be done graphically in ATM (Figure 2). Figure 2: User interface of ATM showing coded DTM and defined flight path. 209 The data is then exported using the data format VRML97. VRML is an acronym for "Virtual Reality Modeling Language". It is the international standard (ISO/IEC 1 4772) file format for describing interactive 3D worlds and objects on the Internet [ Carey R., Bell G., 1997]. It is in fact the 3D analogy to HTML. This means that VRML serves as a simple, multi-platform language for publishing 3D Web pages. For visualizing such data a VRML viewer is necessary. This viewer can either be a standalone program or it can be integrated as plug-in into an HTML browser. There are a lot of such viewers on the market (CosmoPlayerTM, CASUSPresenterTM, VRwaveTM, WorldViewTM,) for every current operating system, most of them as freeware [The VRML Repository]. Therefore, no additional cost may arise for the final user. The VRML world enables the users to interactively examine and visualize their data. As this data format is used on the Internet it is basically designed for a small amount of data. Therefore, special attention has been given to managing Geodetski vestnik 210 large data set, that have to be dealt with if DTMs or orthophotos are examined and visualized interactively. In order to achieve this goal all requirements for efficient visualization mentioned above have been realized in ATM. The whole DTM model is split up into Tiles, each one stored in different levels of detail. The image pyramid of the orthophoto is also divided using the same Tile limits. The number of grid points and the number of pixels within one Tile as well as the degree of data reduction for the LODs can be set by the user, depending on the system used for the final visualization. For visualization a master file is created which controls the loading and drawing of the different Tiles at the correct position and the optimal level of detail. 4. EXAMPLE The following example was carried out to test the applicability and the limitations of VRML for large textured data sets on the internet. The test area covers about 1 0000 km square in the region of Austria's highest mountain. This area was chosen because of its great differences in height between the lowest point (Zell am See 740m) and the highest one (Grossglockner 3400m). So, during navigation over the terrain the requirements for computing visibility is much higher as in flat areas. The DTM was exported using a grid size of 250 m. For texturing, a georeferenced Landsat TM scene with a resolution of 25 m was used. For interactive visualization we use a more or less standard computer (350 MHz, 64 MB RAM, simple graphic card with 3D accelerator) running under Windows NT. Concerning robustness of the computer system and fulfillment of the VRML97 standards we made best experiences using the free available VRML viewer CosmoPlayerTM, a plug-in for Netscape. The terrain model representation of VRML only supports a regular grid. To conserve all structure information a TIN representation is also possible, but applying texture information from orthophotos would be much more complicate then. Besides, the grid interpolation is based on the hybrid data structure used in SCOP, yielding a higher quality of the exported elevation grid than achievable by a simple regular grid derived from the original data without taking breaklines into account. The main drawback of applying VRML for interactive visualization is the impossibility of using the full resolution of the high quality DTM for great areas. Geodetski vestnik While for that reason this sort of presentation cannot be recommended as a substitute for plots of high accuracy, but it offers an excellent possibility to complement and extend the palette of photogrammetric products. One advantage of VRML is the easy way to link additional data (vector data, thematic information, ...) apart from geometry and texture to the VRML model. So, complex spatial and thematic situations can be shown in a really vivid way through animation. In addition to the interactive visualization also measurement tools (coordinates, orientations, distances, ...) were added [ Zeisler Ph., 1999]. This was done using the EAI (External Authoring Interface). Figure 3: Interactive visualization using VRML and coordinate measurement using the EAI. 211 This interface allows programmers to establish a connection between a web page and an embedded VRML browser window, thus providing a possibility to manipulate the VRML scene depending on user requests on the web page. Using this possibility the interactivity is not limited any more to the purely VRML scene but also external systems can be connected. In this way, the VRML model can be used as kernel of an interactive spatial information system (Dorffner L., Forkert G., 1998). 5. SUMMARIZING REMARKS Experience proves the dramatically growing importance of interactive virtual worlds in future. Being aware of this development an additional SCOP module (ATM) has been developed. This tool provides an easy way to export a terrain model and an orthophoto for interactive 3D visualization using the data format VRML. Geodetski vestnik The determination of user defined viewpoints and a camera path for an automatic animation enables a presentation of terrain data in an impressive way even for non VRML experts. Using the possibilities of distributing VRML worlds over the internet low-resolution terrain models can be made available to a great public without additional cost for viewing software. By using VRML for interactive visualization additional information apart from geometry and texture can be linked to the three-dimensional photomodel. Complex spatial and thematic situations can be shown in a really vivid way. The use of EAI enables a close connection between web-sites and VRML scenes. So external database systems can be made available to the user from within the VRML scene. References References fromJournals: Dorffner L., Forkert G., 1998. "Generation and visualization of 3D photo-models using hybrid block adjustment with assumptions on the object shape". ISPRS Journal of Photogrammetry and Remote Sensing, Vol. 53 No. 6, pp.369-378. 212 References from Books: Carey R., Bell G., 1997. "The Annotated VRML 2.0 Reference Manual", Addison-Wesley Developers Press, ISBN 0-201-41974-2. online version: "The Annotated VRML97 Reference Manual", http://www.wasabisoft.com/Book/. Kraus K., JansaJ., Kager H., 1997. "Photogrammetry, Volume 2". Ferd. Dümmlers Verlag, ISBN 3-427-78694-3. References from Other Literature: ClarkJ.H., 1976. "Hierarchical Geometric Models for Visible Surface Algorithm". In Communications of the ACM 19, 10, pp. 247-254. GruenA., 1998. "DTM Generation and Visualization". Symposium on Digital Photogrammetry, Istanbul, Turkey Kofler M., Rehatschek H., Gruber M., 1996. "A Database for a 3D GIS for Urban Environments Supporting Photo-Realistic Visualization". In: International Archives of Photogrammetry and Remote Sensing, Vienna, Austria, Vol. XXXI Part B2, pp. 198-202. Zeisler Ph., 1999. "Nutzung von VRML für Informationssysteme basierend auf 3D-Photomodellen", Diploma thesis at the Vienna University of Technology, Vienna, 1999. The VRML Repository, http://www.web3d.org/vrml/vrml.htm. External Authoring Interface Working Group, http://www.vrml.org/WorkingGroups/vrml-eai/. Review: Editorial board ISPRS Ljubljana, February 2000 Prepared for the publication: Geodetski vestnik