DEVELOPMENT of TERRAIN SIMULATION APPLICATIONS with VRML-WEB3D and GRAPHIC LIBRARIES Emilio Jiménez(1), Eduardo Martínez(2), Mercedes Pérez(2), Félix Sanz(2)
Total Page:16
File Type:pdf, Size:1020Kb
Proc. EUROSIM 2007 (B. Zupančič, R. Karba, S. Blažič) 9-13 Sept. 2007, Ljubljana, Slovenia DEVELOPMENT OF TERRAIN SIMULATION APPLICATIONS WITH VRML-WEB3D AND GRAPHIC LIBRARIES Emilio Jiménez(1), Eduardo Martínez(2), Mercedes Pérez(2), Félix Sanz(2) University of La Rioja, ETSII, 26004 Logroño, La Rioja, Spain (1) Department of Electrical Engineering (2)Department of Mechanical Engineering [email protected] (Emilio Jiménez) Abstract Terrain visualization applications are widely used in very diverse type of applications (geophysical systems, training simulators, etc.), with many different uses: development of roads, mines, dams, and general building works, establishment of water behavior in rivers or dams, visual impacts, real military strategy simulation, simulation of natural phenomena such as floods, volcanic eruptions, landslides and avalanches, etc. These applications usually require a high computational power, and then must be executed in local computer systems; but they also require sometimes the capability of network utilization (for instance in distributed simulation, in public access terrain visualization, in distributed or multi-user simulation, etc.) The recent developments of three-dimensional visualization systems can be naturally applied to terrain visualization targeted to the web, which traditionally had been implemented with 2D systems due to the huge data volume involved. This work shows the steps and the methodology to follow in order to develop a virtual interactive terrain visualization system, taking into consideration the different uses that can be interesting to include in the practical applications for terrain visualization, and illustrating the explanations with some real applications. The paper also includes the analysis of two of the possible technologies to achieve this objective: VRML as an exponent of Web3D technology, and open source three-dimensional graphic libraries. Their fundamental characteristics are considered, and their methodologies, pros and cons are illustrated, based on the different applications that are presented. Keywords: Web3D based simulation, virtual reality (VR), terrain visualization, graphic libraries (GL), Virtual reality modeling language (VRML). Presenting Author’s biography Dr. Emilio Jiménez Macías. PhD in Electrical Engineering (with Computer science, electronics and automation specialty), from the Universities of Zaragoza and La Rioja, Professor at the Electrical Engineering Department of the University of La Rioja, where he is coordinator of the System Engineering and Automation Group, and main researcher of the Modelling, simulation and optimisation of industrial automated and logistics systems Group. ISBN 978-3-901608-32-2 1 Copyright © 2007 EUROSIM / SLOSIM Proc. EUROSIM 2007 (B. Zupančič, R. Karba, S. Blažič) 9-13 Sept. 2007, Ljubljana, Slovenia Terrain Elevation Model (DTEM) and to endow the 1 Introduction TVS with interactivity are provided. The development There exist several developments all over the world of the graphic engine, and its libraries, which present and very recent semantics in 3D visualization, so it is the 3D geometry of the scene, are discussed in Section necessary to make a special effort in generating 5. Finally, Section 6 concludes the paper and refers to surveys and standards. In this paper, we wish to future work. contribute to clarify the process of development of a Terrain Visualization System (TVS) in real time by 2 Territory Visualization providing a guide through the issues previously The spatial distribution of the terrestrial surface is a commented and illustrating the stages with practical continuous function, but on storing and representing examples. these values digitally it is necessary to reduce the We explain the pros and cons of some of the different infinite number of points to a finite and manageable currently available options, offering criteria for an number, so that the surface can be represented by a appropriate development. In order to overcome the series of discrete values [1] (surface discretization). limitations given by Web3D technologies in general, For this purpose digital terrain models (DTM) and and virtual reality modeling language (VRML) in DTEM are used. DTM is a numeric data structure that particular, a specific graphic engine developed with represents spatial distribution in quantitative and open source graphic libraries is shown (Figure 1). continuous variables. These variables may be height, Some programs - used to rename the terrain textures slope, contour, and orientation, as well as any other according to general VRML structures - and small data applicable specifically to the terrain and its applets, as interaction tools between the user and the characteristics at any given point. DTEM is a numeric 3D scene, have been implemented in a virtual TVS of data structure that represents the height of the surface La Rioja (one of the 17 autonomous regions in Spain, of the territory. By definition it can be seen that with a surface of about 5000 Km2). They are used to DTEM is a particular type of DTM. These DTEM are clarify and exemplify some issues throughout the stored fundamentally in two digital formats: a) as a paper. map of altitudes, that is, a two-dimensional matrix in which each quadrant represents the corresponding height of each point; b) by means of chromatic representation of the altitudes, that is, an image either in shades of gray or in color, where the color or shades of gray in the image depends on the specific height of each defined point. In general, for areas of lower height are assigned darker colors, and areas of higher altitudes have assigned lighter colors. The main problem with this second storing method resides in the color scaling assigned to the true terrain height. Starting from this point and taking as reference any of the digital elevation models available nowadays on the market, we can begin to create our own 3D terrain model. For this purpose we must create a polygonal surface in which the vertexes agree with the coordinates taken from the appropriate DTEM. The next step is to achieve that the 3D model that we have created present realistic appearance; that is to say, that it allows perceiving more details of any height relative of one given point with respect to any other. To achieve this objective we can think about the possibility of incorporating a specific model texture. Figure 1. Virtual Terrain Visualization Systems: a) The quickest method for achieving this realistic aspect with Web3D viewers b) with graphic engine is by using ortophotographs of the terrain. An ortophotograph is a digitally corrected photographic presentation that represents an orthogonal projection The paper is organized as follows. First, the basic of an object, generated from real oblique photographs. characteristics of a TVS will be briefly commented in Thus we can take measurements as if we had a map Section 2. The Web3D-VRML technologies are having the same values as on any map. Incorporating introduced in Section 3 where their strong and weak these corrected photographs of a terrain model, we can points are shown. Section 4 is devoted to explore the obtain a realistically acceptable representation (see VRML viewers and some tips to create the Digital Figure 2). ISBN 978-3-901608-32-2 2 Copyright © 2007 EUROSIM / SLOSIM Proc. EUROSIM 2007 (B. Zupančič, R. Karba, S. Blažič) 9-13 Sept. 2007, Ljubljana, Slovenia With these special Fields and the command ROUTE, one can control the flow of Events, directing the effect of one action among other multiple objects to animate a scene or simply to pass information to any of these objects. 3.2 X3D X3D is an open standard XML, a 3D archive format that permits the creation and transmission of 3D data between different applications, especially web Figure 2: Creation of a 3D terrain model from DTEM applications. and ortophotograph. Its principal characteristics are: 3 Web3D-VRML Technologies X3D is integrated in XML; • X3D is modular; One of the possible ways for implementing a territory • X3D is extensible; visualization system consists on using Web3D • X3D is shaped; technologies. The use of any of the Web3D • X3D is compatible with VRML. technologies available nowadays, allows us to develop X3D, instead of limiting itself to a single static wide a 3D environment, capable to communicate on specification - as in VRML that requires total adoption Internet and adaptable to the specific necessities that to achieve compatibility with X3D - has been our system requires [2]. designed with an architecture based on components The term ‘Web3D’ [3] refers to any programming that give support for the creation of different profiles, language, protocol, archive format or technology that which can be individually used. These components may be used for creating or presenting interactive 3D can be independently extended or modified, adding universes through Internet. Among these languages new levels or new components with new for programming virtual universes, we can include as characteristics. Using this architecture, these open standards: VRML (Virtual Reality Modeling specification advances are faster and the development Language), Java3D and X3D (Extensible 3D). of one area does not delay the evolution of the global specification. There are also a large number of solutions at 3.3 Java3D proprietary level (an other ones still being developed) that satisfy the specific needs of the customers, gene- Java3D™ API is a set of classes to create rally aimed at electronic trade and entertainment pur- applications and applets with 3D elements [4]. It poses, such as Cult 3D, Pulse 3D and ViewPoint, etc. offers to developers the possibility of managing 3D In spite of these possible multiple solutions, to use an complex geometries. The main advantage that this open standard presents important advantages; first the API 3D presents against other 3D programming specifications and documentation are well known; and environments is that it allows the creation of 3D there are various applications of all kinds that support graphic applications, independently of the type of these standards. We shall briefly analyze the available system. It forms part of API JavaMedia.