Information Systems and VRML Worlds

Dušan Hanuska

Department of Computer Science and Engineering
Faculty of Electrical Engineering and Information Technology
Slovak University of Technology
Bratislava / Slovakia


VRML (Virtual Reality Modeling Language) is dynamically growing and used for modeling the virtual reality for World Wide Web. Nowadays used version VRML 97 is rich of elements witch allow impressive data representation in 3D space, but it still misses streaming and multi-user elements. Combination of VRML and Java language creates really strong tool for development of the dynamic virtual worlds and on-line presentation of the data taken from any kind of database.

Keywords: World Wide Web, Hypertext Mark-up Language, Virtual Reality Modeling Language, Java, VRML External Authoring Interface in Java, Database.

  1. Introduction

    In the actual rapid lifestyle is more and more information concerned on the web pages. Internet is a great media for information highway. There is actual information on the weather, money transactions, and almost everything on WWW pages everyday. This information is displayed in the form of the text, or in the better case, by pictures or the tables. Only small group of people realizes the fact and the real need of 3D representation of the information, and 3D navigation in the environment of the Internet. This is the point where VRML steps into.

    1. History of VRML

      The first version of VRML had seen the day light on the May 26 1995. VRML 1.0 was designed to meet the following requirements:
      1. Platform independence
      2. Extensibility
      3. Ability to work well over low-bandwidth connections
      On the conference VRML 95, which took place on December 1995 in the Supercomputer Centre in San Diego, VAG (VRML Architecture Group) has presented version VRML 1.1 [2]. This version was the original version of VRML 1.0 extended in sounds and simple animation, but it still was not suitable for multi-user development. This version has died very soon and it was replaced by version VRML 2.0. Finally there was chosen VRML 2.0 [3] from six proposals on the conference SIGGRAPH in New Orleans on March 1996. The winning proposal was Moving Worlds. On December 20 1997 VRML 97 has become an international standard entitled ISO/IEC 14772-1:1997.

    2. Present of VRML

      VRML language is very powerful, but the needs expected are much higher than it serves. It is not the problem to display the data. The problem is to get the data in the form they can be presented in the virtual space described by VRML. At this point the VRML alone is insufficient. There is a need to use the ability of the other languages, which can communicate with VRML and which can exchange the data between. The combinations of languages used today are VRML-JavaScript, VRML-Java, VRML-SQL, VRML-C++, etc.

  2. Virtual Reality Search Machine

    Virtual Reality Search Machine is an application, which searches the database and data found presents in 3D form. This search engine is suitable for usage in connection with working information system of the company. If the information system allows using its data, it is advantageous to use it. In the case when the cooperation is impossible for any reason, such as special data storage format, but if there still is a possibility to export the data in more general format, the data can be exported and up-dated regularly. How frequently is up-date needed depends on the character of the data and on the frequency of data changes. If there is permanent need of up-date, it is better to do it automatically by running some scripts or programs.

    1. Possible way to get data VRML language offer four ways to obtain the data:

      1. Using Java applet located on the same web page, as is the VRML world. Data are sent to the virtual world form the Java applet using EAI (External Authoring Interface). This type of communication is used in this application and is described in [6], [30] a [18]. Such applets are developed in many cases only for one purpose and that's why they are not suitable for more general usage.
      2. Using scripts of the VRML language written in Java with JDBC interface for communication with the database. It is described in specification of VRML 2.0 [3] and VRML 97 [4]. Their usage has the same limitations as the previous type of getting data. The difference is that the communication is done directly in VRML and there is no need for communication between VRML and Java applet on the web page.
      3. Using SQL and Java class called execsql.class, which was developed by Oracle. This Java class is used in Script node and it executes SQL statements described in [34]. This solution is really general solution of the previous one. Advantage of this Java class is in possibility to use any kind of relational database, not Oracle only.
      4. VRML cartridge, which is a part of Oracle Web Server. Data from the database fill the value of the variables - node fields of the VRML world, which has been imported into the database before. This solution offer to obtain the data from the database dynamically, but final virtual world is static in the way, if you save it; you will save only the state of that time. And that is not really dynamic.

      VRSM application structure

      Whole project structure can be divided into three main parts, which communicate with each other and exchange the data. This structure is shown on the Figure 1.

      Figure 1: Application Structure

      Whole process of the application is divided by functionality into its two subprocesses as shown on Figure 2.

      Figure 2: Data flow diagram.

    2. Database

      Data used in this project came from existing working information system of the company, which stores information about computers, printers, faxes, modes and the other electronic devices in the company. This information system uses it's own data storage format and it was not possible to use it for presentation purposes directly. The system only supports the export of the data to the table form in the text format and these data are able to import into database format with more general use. I have chosen the MS Access 97 format for its simplicity and impretension. Empty database was filled up by data about the computers and the printers. A few more tables were needed to include the information about 3D presentation values, like size of the rooms, etc.

      There are two tables with size and positioning information except of computer and printer table. The table called rozmery (sizes) consists of three fields: width, length a height. It contains only one record witch values are the basic room size in each dimension. Another table needed is the table called miestnosti (rooms) which records the number of the room, the number of the floor, on which is the room located, x, y, and z coordinate of the center of the room. Sirka (wide) field specifies how many times is the room wider than the basic one.

      Figure 3: Tables and their relationships

      Relations are as follow: Table "rozmery"; is not in relationship with any other table. Table "miestnosti" is bounded with its "cislo" (number) field with the table Printer and Computer by its "miestnost" (room) field. Number of the room in the "cislo" field of the "miestnosti" table should be unique; number of the room in the "miestnost" field of the Printer and the Computer table can be repeated. It means that one computer cannot be in more than one room, but there may be more than one computer in the same room.

    3. Java Applet

      Applet can be divided into three functional parts: awt part, jdbc-odbc part and EAI part. These three parts work on different activity upon its specific field and they exchange the data between each other.

      Figure 4: Parts of the Java applet

      AWT part of the applet is the only visible part. Its objective is to display the user interface, which the user uses to input the data and to get results displayed. From the functional point of view, this part is responsible for user-computer communication. This communication is done using awt classes, which are included in Java in the standard installation. Inputs are made by list boxes choices and button clicks, and the output data are shown via changing the list items in the list boxes. Dependently on the inputs the queries are sent into the database and the result data are proceeded. These data are used in further specification of the query or they are sent for presentation in 3D space.

      JDBC-ODBC part of the applet is not visible, and is used for communication between the applet and the database. Communication is done using jdbc-odbc driver, which is a part of Java. This part of the applet receives the data in the form of queries, sends these queries into the database, and receives the data from database a sends them for further processing.

      EAI (External Authoring Interface) part handles the communication between the applet and the VRML virtual world located at the same web page. This part of the applet just sends processed data for 3D visualization into VRML world using External Authoring Interface for Java. The main disadvantage of the EAI is that the virtual world and the applet have to be on the same web page. They can not be on different pages or different frames.

    4. VRML

      Part of the application, which is oriented to display the data in 3D space, is presented by virtual reality or by scene of the virtual world, which is composed and described by virtual reality modeling language, VRML. It was necessary to use VRML 2.0 or VRML 97, because the virtual scene used in the application is not static. VRML 97 offers good possibilities of combining static scene with dynamic features and such way bring the life into the virtual reality. It supports scripting as well and the interface for different languages, such as JavaScript or Vrmlscript is also designed very well.

      The design consisted of two consequent parts: modeling the static objects, which will be displayed and writing scripts, witch will handle dynamic presentation of the found objects in the building. These searchable objects are dynamically created and destroyed in the scene graph of the model of the building. The change of the scene is the reaction to the object finding or to the user interaction. This change consists of the dynamic change of the viewpoint or the change between displaying whole building or one floor only.

      Figure 5: VRML world structure

      The large complexity of the project was expected, therefore the project was build from the bottom up. The simple objects, like printer, computer, walls, and doors, were created at first and were tested as well. Larger and more complex objets, like floors and whole building were built upon these simple ones.

      The functionality between these objects was created at the last phase. It was objects own functionality and the functionality handling the user interaction, because I decided to limit the user actions by not allowing him to use the standard way of controlling the navigation in the virtual world. It was necessary to design HCI (Human-Computer Interface). HCI should be simple and easy to navigate inexperienced user intuitively and to get the user to learn the way of using it himself. This HCI was designed originally as a standalone part, but it had to be implemented on the top level to be accessible from Java EAI. Finally, the following file structure was designed. This structure is hierarchic and doesn't copy the directory structure. It is designed upon common and different features of the objects and upon their complexity. It was necessary to create three basic elements: the building as one part, each floor and objects, which are searched in the database. The building is modeled in the cover.wrl file; each floor is modeled in the floorXX.wrl file, where XX corresponds to the floor number. The objects searched in the database are created in the separate files like printer.wrl or computer.wrl. All these three elements are united and controlled from the main swh.wrl file, which handles the user interface as well.

    5. Directory structure

      Directory structure is designed as showed on the Figure 8.

      Figure 6: Directory structure

      Main directory called swh contains basic files, which are linked into next files, which are divided into individual subdirectories.

      The content of each directory is as follow:

      • database - contains the database file,
      • doc - contains complete documentation,
      • components - contains elementar objects of the virtual world,
      • objects - contains the objects, which are composed upon elemental ones,
      • cover - contains the model of the whole building,
      • floorXX - contains the model of the XXth floor
      • textures - contains all used textures,
      • sun - SUN's JDBC driver classes.

      The main advantages of such directory structure are arrangement, transparency, and extensibility.

      • Arrangement of each file in its directory allows easy access to it and its consequent modification.
      • Unique naming of each directory, which name corresponds to its content, makes transparency. In the case it is very simple to change the objects of the virtual space with the other objects. For example, extending the application for the fax machines, it needs to copy the fax model file and to modify swh.wrl and files.
      • Extensibility is meant as a possibility to supplement the application for other searchable components like fax machines, phones, modems, etc. and as a possibility to complete the interior of the floors.

    6. Advantages and disadvantages

      The main advantages of this search machine are:

      • platform independence
      • database independence
      • low hardware requirements
      • system is open
      • extensibility
      • simple maintenance

      The advantages of the HCI:

      • browser independence
      • fits the application needs
      • simplicity of the control

      Figure 7: Human-Computer Interface

    7. Summary

      The VRSM application uses three most common Internet languages: HTML - the worlds most used text file Internet format, VRML - international standard for web 3D, Java - platform independent applet and application language "Write once, run anywhere".

      Figure 8: VRSM application composition model

      The VRSM application can be extend or enhanced in these ways in the future:

      • higher level of details
      • extending the database for more components
      • more specific information about component's location
      • distinguishing kinds of the components of the same type
      • automation of the database update

  3. Conclusions

    Internet of the future goes 3D. You are able to explore many virtual worlds on the Internet nowadays. But you are the only one who is in there. You are the only one visitor. Today version of the VRML doesn't support multi-user (MU) access to its virtual world, and it doesn't support streaming data, which you need to use in MU worlds.

    On February 23-26 1999 has been held the fourth annual symposium about web 3D technologies -VRML 99, first time in Europe (Paderborn, Germany). There were many discussions and many seminars about the future way of the web 3D formats for the Internet, not only about VRML, which is very robust and that cause it difficult to implement. But it still misses multi-user and streaming features; witch might be the part of next version of the VRML, called VRML NG (Next Generation), VRML 2000, X3D or whatever.

    The other next step to the brighter future of VRML is that Platinum has announced the VRML browser plug-in Platinum (Cosmo) player open source for non-commercial use. It means that we will be able to use the code, change it, improve it, fix the bugs, extend it for special purposes, and so on.

  4. References

    [1] The Virtual Reality Modeling Language 1.0, ISO, 4.4.1995

    [2] Bell, G. - Parisi, A. - Pesce, M.: The Virtual Reality Modeling Language 1.1, ISO, 16.12.1995

    [3] The Virtual Reality Modeling Language 2.0, ISO, 4.8.1996

    [4] Carey, R. - Bell,G. - Marrin, Ch.: The Virtual Reality Modeling Language 97, ISO, 20.12.1997

    [5] Marrin, Ch. - Kent, J.: Proposal for a VRML Script Node, Authoring Interface, VRMLScript Reference, Silicon Graphics, Inc., 6.10.1996

    [6] Marrin, Ch.: Proposal for a VRML 2.0 Informative Annex, EAI Reference, Silicon Graphics, Inc., 21.10.1997

    [7] Marrin, Ch.: Anatomy of a VRML Browser, Silicon Graphics, Inc., 26.8.1996

    [8] VRML Architecture Group, VAG

    [9] The VRML Consortium, The VRML Consortium, Inc., 31.7.1997

    [10] Daub, M. D.: A Brief History of VRML, 15.4.1996

    [11] Crispen, B.: VRML History, 5.6.1997

    [12] Pesce, M.: VRML History, 1996

    [13] Nadeau, D. R.: How to view VRML 2.0, Netscape, 20.8.1997

    [14] Nadeau, D. R.: See what VRML 2.0 is all about and start building shapes today, Netscape, 9.9.1997

    [15] Cromwell, R.: VRML 2.0 Moving Worlds Tutorial and Test Page, Westlake Solutions, Inc., 1996

    [16] Marks, G. - Shiple, J.: Do it yourself VRML, Construct, Inc.

    [17] Norton, A.: Colors in VRML, 10.7.1996

    [18] Descartes, A.: Interfacing Java and VRML, Hermetica, Nov. 1996

    [19] Clay, G.: Advanced Uses of VRML2, Silicon Graphics, Inc., 1996

    [20] Couch, J.: A Simple create VrmlFromX Lesson, Silicon Graphics, Inc., 1996

    [21] Roskothen, M.: Slide It !, Silicon Graphics, Inc., 1996

    [22] Roskothen, M.: Adding Parents and Children Nodes, Silicon Graphics, Inc., 1996

    [23] Joel, P.: Infinite Reality, Silicon Graphics, Inc., 1996

    [24] Thornborrow, Ch.: Scripting Concepts, Silicon Graphics, Inc., 1996

    [25] DeCuir, J. D.: Simple Scripting in VRML 2.0, Silicon Graphics, Inc., 1996

    [26] Diehl, S.: VRML++: Adding Classes to VRML, Universität des Saarlandes

    [27] Gerding, D. J.: 20 Questions on VRML, CNET, Inc., 7.10.1997

    [28] VRML Frequently Asked Questions, 28.2.1996

    [29] Crispen, B.: FAQ v1.0, comp.lang.vrml, 28.5.1997

    [30] VRML 2.0 EAI FAQ, Finlayson Consulting VRML Group, 5.11.1997

    [31] VRML, Grafman Productions, 1996

    [32] Reed-Ballreich, C.: Texture Mapping in VRML 2.0, 3Name3D, 8.10.1996

    [33] Carey, R. - Bell, G.: The Annotaded VRML 97 Reference Manual

    [34] Lipkin, D.: Proposal for a VRML Informative Annex, Recommended Practices for SQL Database Access, 20. augusta 1998

    [35] Flannagan, D.: Programování v jazyce Java, O'Reilly 1997. 488 s.