Visit to download the full and correct content document: https://textbookfull.com/product/distributed-virtual-worlds-foundations-and-implementa tion-techniques-using-vrml-java-and-corba-diehl-stephan/
Distributed Virtual Worlds Foundations and Implementation Techniques Using VRML Java and CORBA Diehl Stephan
More products digital (pdf, epub, mobi) instant download maybe you interests ...
Machine Vision Algorithms in Java Techniques and Implementation Whelan Paul F Molloy Derek
https://textbookfull.com/product/machine-vision-algorithms-injava-techniques-and-implementation-whelan-paul-f-molloy-derek/
Virtual Existentialism Meaning and Subjectivity in Virtual Worlds Stefano Gualeni
https://textbookfull.com/product/virtual-existentialism-meaningand-subjectivity-in-virtual-worlds-stefano-gualeni/
Automation in the virtual testing of mechanical systems: theories and implementation techniques First Edition Haugen
https://textbookfull.com/product/automation-in-the-virtualtesting-of-mechanical-systems-theories-and-implementationtechniques-first-edition-haugen/
Evolutionary games in natural, social, and virtual worlds 1st Edition Friedman
https://textbookfull.com/product/evolutionary-games-in-naturalsocial-and-virtual-worlds-1st-edition-friedman/
Web Service Implementation and Composition Techniques
1st Edition Hye-Young Paik
https://textbookfull.com/product/web-service-implementation-andcomposition-techniques-1st-edition-hye-young-paik/
Supervised Learning with Python: Concepts and Practical Implementation Using Python Vaibhav Verdhan
https://textbookfull.com/product/supervised-learning-with-pythonconcepts-and-practical-implementation-using-python-vaibhavverdhan/
Contingency Table Analysis Methods and Implementation Using R Statistics for Industry and Technology Kateri
https://textbookfull.com/product/contingency-table-analysismethods-and-implementation-using-r-statistics-for-industry-andtechnology-kateri/
Distributed Embedded and Real time Java Systems 2012th Edition M Teresa Higuera Toledano Andy J Wellings
https://textbookfull.com/product/distributed-embedded-and-realtime-java-systems-2012th-edition-m-teresa-higuera-toledano-andyj-wellings/
RESTful Java Web Services A pragmatic guide to designing and building RESTful APIs using Java 3rd Edition Balachandar
https://textbookfull.com/product/restful-java-web-services-apragmatic-guide-to-designing-and-building-restful-apis-usingjava-3rd-edition-balachandar/
Distributed
orlds
Virtual W
Springer-Verlag Berlin Heidelberg GmbH
Stephan Diehl Distributed
Virtual Worlds
Foundations and Implementation Techniques
Using VRML, Java, and CORBA
With 58 Figures and 7 Tables
Springer
Dr. Stephan Diehl
Department of Computer Science
University of Saarland
66041 Saarbrücken
Germany
diehl@acm.org
ACM Computing Classification (1998): 1.3.6-7, H.5.3, H.S.l, C.2.4, D.2
Library of Congress Cataloging-in-Publication Data applied for
Die Deutsche Bibliothek- CIP-Einheitsaufnahme
Diehl, Stephan: Distributed virtual worlds: foundations and implementation techniques using VRML, Java, and CORBA I Stephan Diehl.
ISBN 978-3-642-08713-4 ISBN 978-3-662-04519-0 (eBook)
DOI 10.1007/978-3-662-04519-0
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions oftheGerman copyright law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer-Verlag Berlin Heidelberg GmbH. Violations are liable for prosecution under the German Copyright Law.
©Springer-Verlag Berlin Heidelberg 2001
Originally published by Springer-Verlag Berlin Heidelberg New York in 2001
Softcoverreprint of the bardeover Ist edition 200 I
The use of general descriptive names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
Cover design: Künkel + Lopka, Heidelberg
Typesetting: Camera-ready by author
Printedon acid-free paper SPIN: 10772031
45/3142 ud- 543210
To Luca and J ean- Luc
Preface
Recently, with the success of Java and the existence of different interfaces between VRML and Java, it became possible to implement three-dimensional internet applications on standard VRML browsers (Plugins) using Java. With the widespread use of VRML-Browsers, e.g., as part of the Netscape Communicator and Microsoft's Internet Explorerstandard distributions, everyone connected to the internet via a PC (and some other platforms) can directly enter a virtual world without installing a new kind of software. The VRML technology offers the basis for new forms of customer services, e.g., interactive three-dimensional product configuration, spare part ordering, or customer training. Also this technology can be used for CSCW in intranets.
This book has a theoretical and a practical part. The theoretical part is intended more for teachers and researchers, while the practical part is intended for web designers, programmers and students, who want to have both a hands-on approach to implementing Web 3D applications and a technically detailed overview of existing solutions for specific problems in this area.
The reader should have a good knowledge of programming languages and computers in generaland should know Java or at least an object-oriented programming language. The book not only provides and explains source code, which can be used as a starting point for own implementations, but it also describes the fundamental problems and how currently known solutions work and discusses a variety of different techniques and trade-offs. Many illustrations help the reader to understand and memorize the underlying principles.
Acknowledgments. This book evolved from lectures at the University of Saarland and courses taught in industry. I want to thank all participants for discussions and feedback. Andreas Kerren carefully read a draft version of the book and provided constructive comments. Above all, I have to thank my wife Christine - she has been very patient with me. While I spent weekends in front of the computer, she had to take care of our two sons Luca and Jean-Luc. This book is dedicated to them.
Saarbrücken, January 2001 Stephan Diehl
Part I. Introduction
Contents
Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Peloton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 A Virtual Theater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Electronic Commerce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Technical Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Technologies, Languages and Protocols.................... 9 3. User Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Applications 11 3.2 Commercial and Experimental Virtual Worlds 11 3.3 Navigation 14 3.4 Communication 15 3.5 Multi-User Worlds- The Future?......................... 16 Part II. Fundamentals 4. Three-Dimensional Computer Graphics . . . . . . . . . . . . . . . . . . . 19 4.1 Some Mathematical Preliminaries 19 4.2 The Graphics Pipeline 22 5. Virtual Reality Modeling Language (VRML) 27 5.1 History of VRML. 27 5.2 What is VRML? 28 5.3 Concepts of VRML 28 5.4 VRML: An Example 29 5.5 Static Scenes... 31 5.5.1 Geometrie Nodes................................. 31 5.5.2 Appearance. 33 5.5.3 Transformations.................................. 34
1.
X Contents 5.5.4 Other Static Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.5.5 DEF/USE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Extensibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.6 Dynamic VRML 36 5.6.1 Events, Routes, Sensors and Interpolators 37 5.6.2 Script 41 5.6.3 Animations Using the External Authoring Interface... 44 5.6.4 Problems with the EAI 49 5. 7 Conclusion 49 6. Protocols for Distributed Virtual Worlds 51
Internet Protocols- TCP/IP............................. 51 6.1.1 Network Layer: Internet Protocol (IP) 52 6.1.2 Transport Layer: Transmission Control Protocol (TCP) 53 6.1.3 Transport Layer: User Datagram Protocol (UDP) . . . . 53 6.1.4 Transport Layer: Multicast IP . . . . . . . . . . . . . . . . . . . . . 53 6.2 A Layer Model for Distributed Virtual Worlds . . . . . . . . . . . . . 54 6.3 Architectures for Virtual Worlds. . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.4 Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.5 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6.6 Protocols for Distributed Virtual Worlds 57 6.6.1 Distributed Interactive Simulation (DIS) 57 6.6.2 Distributed Worlds Transfer and Communication Protocol (DWTP) 60 6.6.3 The Multi-User 3D Protocol (Mu3D) 61 6.6.4 Virtual Reality Transfer Protocol (VRTP) 63 6. 7 Conclusion 64 7. VRML Extensions for Distributed Virtual Worlds 65 7.1 VSPLUS: Sharing Events Through Net Nodes.............. 65 7.2 VASE Multicast-VR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 7.3 Living Worlds.......................................... 70 7.3.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 7.3.2 Living Worlds Terminology . . . . . . . . . . . . . . . . . . . . . . . . 70 7.3.3 Zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 7.3.4 Shared Objects and Avatars . . . . . . . . . . . . . . . . . . . . . . . 73 7.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Partitioning
Distributed Virtual Worlds. . . . . . . . . . . . . . . . 77 8.1 Spatial Partitioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 8.1.1 Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Level of Detail (LOD).. . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 8.1.3 Bounding Boxes.................................. 79 8.1.4 Binary Space Partitioning Trees . . . . . . . . . . . . . . . . . . . . 80 8.1.5 Cells and Portals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.5.6
6.1
8.
of
8.1.2
8.2 Spatial Partitioning of
Conclusion
9. Streaming
9.1 Continuous Data Streams
9.3 Relevant Internet Protocols
Contents XI
Worlds 83 8.2.1
83 8.2.2
83 8.2.3
84 8.3
86
Multi-User
Filtering
Locales and Beacons..............................
Aura.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 9.1.1
87 9.1.2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Virtual Worlds . . . . . 88
Compression.....................................
Streaming in Practice
9.2 Continuous Data Streams in Distributed
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Resource Reservation Protocol (RSVP) . . . . . . . . . . . . . 89 9.3.2
Streaming Protocol (RTSP) . . . . . . . . . . . . . . 90 9.3.3 Real- Time Transport Protocol (RTP) 91 9.4 Quality of Service for Streaming... 93 9.4.1 Forward Error Control 93 9.4.2 Interarrival Jitter. 93 9.4.3 Combined Jitter and Error Control . . . . . . . . . . . . . . . . . 94
Spatial Hierarchical Compression . . . . . . . . . . . . . . . . . . . . . . . . . 96 9.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 10. 3D Technologies for the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . 99 10.1 Quicktime VR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 10.2 MetaStream ........................................... 101 10.3 VRML ................................................ 102 10.4 MPEG-4 .............................................. 102 10.5 Pure Java 1.1 Applets ................................... 103 10.6 Java3D ................................................ 104 10.7 X3D .................................................. 105 10.8 Summary .............................................. 106 Part 111. lmplementation 11. lmplementing Multi-User Worlds with VRML ............ 109 11.1 Requirements .......................................... 109 11.2 Existing Systems ....................................... 109 11.3 Java- and EAI-Based Approaches ......................... 110 11.4 A CORBA-Based Approach ............................. 110 12. Java Network-Programming: A Simple Distributed Virtual World ...................... 113 12.1 Java Network Programming 113 12.1.1 HTTP Connections (Hypertext Transfer Protocol) .... 113
9.3.1
Real- Time
9.5
XII Contents
TCP (Thansfer Control Protocol) ................... 114 12.1.3 UDP (User Datagram Protocol) .................... 115 12.1.4 Multicast UDP ................................... 116 12.1.5 Object Serialization ............................... 117 12.1.6 Remote Method Invocation (RMI) .................. 117 12.2 Miss Connectivity ...................................... 118
Architecture and Protocol of MissC 119
Resources of the Dead 120 12.2.3 Some Implementation Details of the Protocol 120 12.2.4 Alternative Implementations of the Protocol 123 12.2.5 Some Implementation Details of the Scene 125 12.2.6 Intra-Browser Communication 133 12.3 Conclusion 135 13.
CORBA 137 13.1 A Gentle Introduction to CORBA 137 13.1.1 Common Object Request Broker Architecture (CORBA)137 13.1.2 Object Request Broker (ORB) ..................... 137 13.1.3 Object Adapter .................................. 141 13.1.4 Interface Definition Language (IDL) ................ 141 13.2 A CORBA-Based Multi-User World ...................... 144 13.2.1 The Protocol .................................... 145 13.2.2 The Client ....................................... 145 13.2.3 The Server ...................................... 147 13.2.4 An Alternative Protocol. .......................... 147 13.2.5 Intra-Browser Communication ..................... 149 13.3 Conclusion ............................................ 149 14. The Future ............................................... 151 List of Figures 153 List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 References 157 Index ......................................................... 163
12.1.2
12.2.1
12.2.2
lmplementing Multi-User Worlds with
Part I
Introduction
1. Motivation
Before we dive into the technical aspects we present in this chapter three very different examples of Distributed Virtual Worlds (DVW). The reader will benefit throughout the book by thinking about how to use the described techniques to implement one of the applications in this chapter.
1.1 Peloton
In February 1998 a system called Peloton [17] was presented at the International Conference on the Virtual Reality Modeling Language VRML'98. The term "Peloton" stems from cycling and denotes the main group of cyclists in a cycle race. Peloton was developed at Bell Laboratories, a research institute of Lucent Technologies. Peloton is a distributed cycling simulation, a
Fig . 1.1. Screenshot of Peloton
computer-based system which generates virtual environments for simulated cycle tours. Several persons connected to different computers in the internet are able to cycle simultaneously through a virtuallandscape (Figure 1.1). They might just enjoy the scenery, but they might also race. To participate in the simulation the cyclist has to register with the Peloton server via the World Wide Web (WWW). Each participant has a stationary bike which is connected to a computer through sensors and force-feedback devices. The latter enable the computer to control the resistance of the pedals. For the cyclist, a new multimedia experience becomes true: he has to pedal harder to drive up a hill. The sensors provide information which is used to position the cyclist in the virtual environment. The virtual environment is based on topological data of actual cycling tracks. It consists of computer-generated graphics, as well as pictures and noises of the cycling track.
In this virtual environment the cyclist is represented as an animated, graphical object. Such an object representing a user is called an avatar. In the Peloton example the avatar moves as fast as the cyclist pedals. Every cyclist has his personal view of the track and he can change his view during the ride. Moreover, he can talk to other cyclist over a "webphone" or a conventional telephone. Since Peloton was developed using established web tools and data formats, it runs on many different platforms. Moreover it is able to adapt the complexity of the scene to the capabilities of the computer it runs on. To sum up, Peloton represents a new dass of applications which enable users to interact in real time using unconventional input-output devices. The developers of Peloton plan to extend their system such that joggers on running belts and rowers in keep-fit devices are able to experience the same environment.
1.2 A Virtual Theater
Peloton demonstrates just one of the possibilities opened up by distributed, virtual worlds. In the following we discuss a fictitious virtual world. However, parts of it are currently under development at the VRML Dream project [57] (http: I /www. vrmldream. com) and the first distributed live performance on the internet actually took place on 26 April 1998 (Figure 1.2).
Assurne that a stage play is performed by actors who control their avatars from different computers in the net. The stage set was assembled from the online catalogues of different suppliers. The actors select suitable avatars for their roles in the play and get them dressed. There are several actors in the wardrohe or on the stage. They talk about the choice of clothes, their roles and the poor payment. In the performance there will be a living elephant. It was bought in a virtual pet store and now has its own life. At the entrance the audience has to present their tickets, which they got from one of the advance booking offices and paid with electronic cash. The audience can talk together without disturbing the performance, but they can also heckle the
4 1.
Motivation
actors. Someone has brought a time bomb: disguised as a hat it is actually a "Trojan Horse". Activated during the performance it rips the actors' clothes off. Shortly after, it deletes all objects of the scene on the server.
1.3 Electronic Commerce
Online shopping , in partic ular online book store s, h as be come popul a r. Te chnically there is oft en not much difference to print ed catalogues , but there are goods for which web pages with text and 2D images are not sufficient . 3D models enable the customer to look at a product from different viewpoints ,
1.3 Electronic Commerce 5
Fig. 1.2. VRML Dream: Live Performance on the Internet
Fig. 1.3. A 3D Personal Computer Gonfiguration Tool on the Web
1. Motivation
moreover he can configure the product or build it from simpler parts in a 3D world and then order it online as a whole [23]. Customers and customer services can look at and interact with the same model and they can talk using internet telephony. The customer service can show in the model how to use the product or how to replace a damaged part with a spare part.
The PC Gonfigurator [6] was designed as an interface of a built-to-order e-commerce application (Figure 1.3). First the user can select a motherboard and a computer case. Then he selects a graphics card, RAM expansions etc. and drags and drops them into a slot. Instead of inserting them into slots by hand, there is also an automatic mode. In a similar way the user can add CD-ROMs, disks and the CPU.
For this new generation of e-commerce applications which combine interactive 3D-computer graphics with online services the term v-Commerce has recently been suggested.
6
2. Technical Aspects
In this chapter we introduce some terminology which will be used throughout the book. Then we infer basic requirements for distributed virtual worlds from the examples of the previous chapter. Finally, we look at what technologies are used to implement these on the web.
2.1 Terminology
Virtual worlds are computer-based models of three-dimensional spaces and objects with restricted interaction. A user can move through a virtual world and interact with those objects in various ways.
VRML [77, 14] is a file format for the specification of such spaces and objects. A VRML file defines a scene gmph: by traversing the graph the renderer (i.e. the algorithm which draws the scene onto the screen) computes the appearance, geometry, position and orientation of each object in the scene. VRML was designed to be platform independent and extensible, and it should work with low-bandwidth connections. The major difference to other 3D-file formats is its use of URLs to include spaces and objects over the www.
Behaviors are the dynamic changes of some properties of an object, as well as the deletion and creation of objects and the modification of environmental properties like gravity or light. Behaviors can be triggered by time, users or programs.
A virtual world is distributed if active parts of it are spread throughout different computers in a network. Developers of distributed virtual worlds have to face both the problems of virtual reality and those of distributed systems.
A multi-user world is a virtual world where several users can interact at the same time. These users work at different computers which are interconnected. In multi-user worlds the avatar plays a central role. An avatar is the virtual representation of a user. It is put at the viewpoint of the user, i.e., the position in the virtual world from which the user looks at the scene. In a single-user world the avatar is only used to detect collisions of the user and those objects in the scene. In a multi-user world the avatar is also the visual representation of the user, i.e. it determines how the user is seen by other
Technical Aspects
users. If a user moves his viewpoint, his avatar must also move in the views of the others users. The term avatar comes from an Indian religion, where it means god 's incarnation on earth.
The WWW has changed our way of perceiving the internet and its services. They are brought to us as a cross-referenced book and we browse through its pages. Multi-user worlds have the potential to change our view again. They provide us with a new metaphor for the internet, its services and its inhabitants- the users. They become objects in space, and for fast access the user can tunnel from one point in space to another. One of the major design goals of VRML was to allow for multiple users to act in a virtual world at the same time. So far, this goal has not been achieved and there is not yet a standard for the interaction of several users in a virtual world.
If interested, the reader might want to skip ahead and have a look at the terminology introduced by Living Worlds in Beetion 7.3.2.
2.2 Requirements
From the examples in Chapter 1 one can deduce some technical requirements for distributed, virtual worlds. Objects have a graphical representation, an internal state and a behavior usually defined by program code. Such objects have to be added or removed from a scene in real time, their behavior has to be tracked in real time and their implementation has to be distributed on different computers in the network. Some objects must be controlled by other objects and objects must share information. If an imported object has to become a permanent part of a scene, one must be able to store it including its behavior on the scene server.
Further requirements result from security considerations, e.g., protecting a scene from vandalism. An object can grant or deny access to its data and behavior. For this purpose it could provide user rights. From this results yet another requirement. The identity of users and their objects has to be checked; this process is called authentification and cryptographic methods play an important role here.
When several objects try to access a shared resource, a confiict arises. Such confiicts can be avoided through transaction mechanisms or they can be resolved by confiict solution strategies. Other requirements are those common to distributed systems on the internet:
Low Bandwidth and Network Latency: On the internet the bandwidth is in generallow and there is no guaranteed bandwidth. Network latency is the amount of time it takes to deliver a message over the network.
To hide network latency a dient can, for example, perform speculative computations or use buffering.
Heterogenity of Networks: Computers on the internetrundifferent operating systems. These operating systems often differ in the programming
8 2.
2.3 Technologies, Languages and Protocols 9
languages and libraries they provide. A solution to the problern is to use platform-independent languages like Java and VRML , or architectures like CORBA, which achieve platform-independence through standardized protocols.
Distributed Interactions: Objects which interact can be controlled by programs or users at different computers. The computations at the clients involved must be synchronized, e.g., through locking.
Failure Handling: There is a trade-off between reliability and speed of transmission of messages on the internet: lost messages must be resent . Monitoring the quality of transmission can be used to adapt transmission quality or properties of the application, e.g., frame rate.
Scalability: A distributed system scales up, if it works with large numbers of clients and objects. To achieve scalability, work must be equally distributed to all clients and there must be no bottlenecks in the communication structure. Most rendering techniques in virtual reality have been developed on high-end graphics Workstations. On the internet a scene must be rendered on computers with less computing power and thus rendering algorithms are preferable which scale down, i.e. yield nearphoto-realistic results on high-end machines, but also acceptable results on personal computers.
2.3 Technologies, Languages and Protocols
A closer look at the architecture of Peloton in Figure 2.1 and those of other multi-user worlds on the web reveals that they use similar implementation techniques, languages and protocols:
......... . ...
li(!'loton ( 'hent
Fig. 2.1. Architecture of Peloton
2. Technical Aspects
JSAI EAI
Script Applet
3D Objects and Scenery: The scenery, as well as the thre e-dimensional objects and some of their behaviors are coded in VRML.
Programming : Behaviors are programmed in Java and/or JavaScript. All other programs running on the dient are written in Java. Device drive rs are written in C, C++ or assembly language and connec ted to th e rest of the application through the Java Native Programming Interface JNI or, as in Peleton , through network communication on the same host.
Intra-Browser Communication: VRML and Java communicate through programming interfaces: Java- applets communicate with the VRMLBrowser through the External Authoring Interface (EAI) . Java-Code encapsulated in the scene-graph uses the Java-Scripting Interface to access the scene-graph.
Networking: For network communication , application-layer protocols like the Hypertext Transfer Protocol (HTTP) and the Realtime Transport Protocol (RTP) are us ed. Application-specific protocols are implemented on top of these , as well as the transport-layer protocols TCP and UDP and/or CORBA. CORBA actually is an architecture for distributed , object-oriented systems and achieves platform-independence through a standardized protocol called IIOP.
This is what this book is about , in particular Chapter 5 and Part III , and is shown more clearly in Figure 2.2. In Part II we Iook at protocols , spatial partitioning and streaming techniques , which are ind e pendent of a particular implementation language and are designed to me et som e of th e above requir e ments.
10
Fig. 2.2. VRML , Java and Ne tworking
3. User
Perspective
In this chapter we discuss the wide spectrum of applications of DVWs, give an overview of existing virtual worlds and look at navigation and communication in virtual worlds from a user's perspective. Finally, we address some aspects which will be important for the future success of DVWs.
3.1 Applications
There is a wide spectrum of applications for distributed virtual worlds. Actually our fantasy is the only limit. Planners and investors can meet in the virtual counterpart of a new building before even the foundation stone is laid. Early on, the effects of building projects, e.g., new highways or railroad tracks, can be visualized for decision makers. In virtuallecture rooms students of different schools or universities gather for tele-learning courses. Collaborative work processes, e.g., assembly and dismantling, can be exercised without consumption of materials. In hospitals several experts can work together in a complicated operation (tele-medicine, virtual scalpel). Devices, robots and plants can be controlled by several persons. A robot could pick up nuclear waste this way in areas where no living person can survive (tele-presence). We witness the beginning of distributed virtual worlds in art, e.g., virtual galleries, collaborative paintings and sculptures. The game industry has also seen the writing on the wall. Until recently many action games provided a multi-player mode by connecting computers via the serial port. Nowadays such games use the internet for multi-user communication.
3.2 Commercial and Experimental Virtual Worlds
In the book A vatars! Bruce Damer looks from a user perspective at a variety of multi-user worlds [22]. His book provides installation and usage information, as well as anecdotes. Damer uses the term virtual worlds and delimits it from virtual reality. Virtual reality is concerned with reproducing reality true to life. Tothis end mostly expensive, specialized hardware is used, e.g., cyber-helmets and cyber-suits. In contrast, virtual worlds require less from
12 3. User Perspective
the user's hardware - a modern PC will work. Immersion is the subjective impression or illusion of being in or a part of the virtual world. Damer claims that immersion is achieved through communication with other people and does not require sophisticated computer graphics. The effect is similar to reading a novel and being drawn into the story.
Table 3.1. Virtual worlds and their graphical representations
http://www.thepalace.com
http://www.microsoft.com/ie/chat
http://www.worldsaway.com
http://www.vplaces.com/vpnet
http://www.worlds.net
Microsoft's V-Chat http://www.vchatl.microsoft.com
NTT's Interspace http://www.ntts.com/interspace
Active Worlds http://www.activeworlds.com
http://www.onlive.com
http://www.oz.com/zipvrml
Passport
http://www.blaxxun.com
Mitsubishi Electric's Schmoozer
http://www.schmoozer.net
Sony's Community Place
http://www.vs.spiw.com/vs
Geometrek's Deep Matrix
http://www.geometrek.com
Virtual Worlds:
http://ariadne.iz.net/-jeffs/vnet
Representation Representation Name of World of Avatars
2D
The Palace
Microsoft's
Chat 2D
Comic
Worlds Away 2D
Virtual Places 2D
Worlds Chat 3D
2D & 3D 3D 3D 2D 2D 2D 2D 2D 2D 2D (Video) 3D Onlive! Traveler 3D 3D
Oz Virtual 3D 3D
VRML-based
Blaxxun's
3D 3D
3D 3D
3D
3D
3D 3D
Vnet 3D 3D
To represent the world some systems use a constant background image, and objects and avatars are placed on a layer in front of it (2D), or on severallayers (2!D), suchthat objects can hide objects on lower layers and can collide with objects on the same layer. An increasing number of systems uses three-dimensional model-based representations. Allegedly, the first 3D virtual world on the internetwas Worlds Chat in 1995. In some worlds users can change the scenery and build complete cities from scratch.
There are also huge differences in the way avatars are represented. Earlier systems use static images and some use sequences of images to display animated movements. In some 3D worlds 2D avatars are used which are represented by a set of images, each image shows the avatar from a different angle, e.g., front, side and back view. This technique is also known as 3D sprites and is used in many computer games. In this way 3D effects are achieved without computationally expensive model-based rendering. On the other hand, model-based avatars can be animated by changing the modelovertime and thus allow for more flexible animations.
In Interspace, avatars are small monitors showing a live video transmission of a camera installed at the user's computer. In addition to text chat, Interspace also provides voice chat. As a result Interspace represents a new kind of video conferencing.
Hundreds of thousands of users have visited the largest of the above mentioned virtual worlds and at times thousands of users are simultaneously online.
The Realm
http://www.realmserver.com
Meridian59
http://www.meridian.3do.com/meridian
Ultima Online
http://www.owo.com
Diablo
http://www.blizzard.com
War Birds
http://www.icigames.com
Quake http://www.idsoftware.com
Xwing vs. Tie Fighter http://www.lucasarts.com
DukeNukem3D http://www.duke.gtinteractive.com
3.2
and Experimental Virtual Worlds 13
Commercial
Table 3.2. Multi-user games
2 D
3D
3D
3D
3D 3D .3D 3D
Also, the game industry offers multi-user games, which have many of the features of multi- user worlds. Dedicated web pages like www. heat. net and www. garnestarm. com provide servers for a diversity of multi-user games, including some of those listed in Table 3.2.
Except for the games market the commercial success of multi-user worlds is very low. There are two major reasons for this. First, the technical prerequisites are still demanding; second, the worlds are not used in a goal-directed way, i.e. to facilitate certain work flows. Currently most multi-user worlds are inhabited by technical enthusiasts who meet there to discuss implementation details of these worlds.
3.3 Navigation
For most commercial multi-user worlds the user has to buy the viewer of the respective vendor and instaU it on her machine. Demo-versions of these browsers can be downloaded for free on the internet. Some vendors distribute the viewers for free and try to earn money by selling their virtual-world servers and world-authoring tools.
After the installation the user has to start the viewer and to log into the virtual-world server. Some systems allow guest logins, others require that the user registers by providing at least his email address or that the user has to pay membership fees. Unfortunately some users misuse their anonymity and harass other users by vulgar language and other activities depending on the kinds of actions provided by the system. As a result, some systems are moderated. A moderator supervises the chat and activity in the world and throws obtruders out.
After logging into the server the user gets a default avatar. In Worlds Chat the default is a crash test dummy. If the user doesn't like this avatar she can select one from a menu. In most systems registered users can create or import their own avatars.
After the selection of the avatar the user can move through the virtual world. He can look at the scenery from different perspectives:
• first person view: The user sees the world through the eyes of his avatar, i.e. the camera is at the position of the avatar.
• bird's eye view: The user sees the world from top, i.e. the camera is above the avatar.
• third person view: The user sees the world through the eyes of a third invisible person which follows the user's avatar, i.e. the camera is behind the avatar.
In 3D computer games the third person view is preferred because the user can see both the position as well as the actions of her avatar.
14 3.
User Perspective
Worlds are usually made of several scenes which are connected in different ways. The user can dick at objects or closed doors, which work in a similar way to hyperlinks in web pages. If the user clicks, the scene associated with the object is loaded and the user is put into the new scene. Different systems use different terms for this concept: anchor, hotspot, door, farcaster, wormhole, tunnel or teleport.
A more sophisticated kind of these door, called a portal, allows the user to see parts of the other scene through the open door without having to Ioad the other scene completely.
3.4 Communication
An important aspect of virtual multi-user worlds is the communication among users. Currently, text chat, i.e. the transfer of textual messages, is the state of the art. Some experimental systems use audio or video transmission, e.g., NTT's Interspace. Voice chat is sometimes also transmitted over a traditional phone connection, but transmission over the internet is more challenging and in some parts of the internet web phones provide acceptable quality even today. As web phones become more mature they will certainly replace text chat.
We will now Iook closer at the features of text chat. The reader should note that voice chat should provide similar features.
Usually all chat messages are sent to all users in a scene, but there arealso means for private conversation. For this, the user has to switch to whisper mode to send messages only to the closest user in the virtual space or to a user whom she selects by name. Some systems also support user groups. In this case a message can be sent to all members of the group. The members of the group don't have to be in the same scene of the world.
The reader certainly will know emoticons from her electronic mail. Here combinations of certain characters are used to represent emotions, e.g., winking ; -) or a shouting : -0 face. In addition to using emoticons in the text chat, the user can use gestures to express emotions. For this, she can select a gesture in a menu and her avatar will then perform this gesture, e.g., smile or dance.
In Comic Chat the user's messages are displayed in a balloon next to his avatar. The user can change the form of this balloon and the style of the font (hold, italic, etc.).
In several systems the user can select the expression of his avatar's face (smile, frown, laugh) or animations of the avatar (dance, jump, bow) from a menu.
A bot is a programmed, active object, sometimes also called an agent or angel. It can happen that a bot pretends to be an avatar and that users don't realize that they are actually talking to a program. Such bots are based
3.4
15
Communication
on an artificial intelligence dassie called Eliza [86]. In 1996 Joseph Weizenbaum developed this program, which imitates a therapist who uses the Rogers method, which is a certain kind of conversation therapy.
3.5 Multi-User Worlds- The Future?
Recently, the term Post-Nintendo kids has been coined, referring to the fact that today most children have been exposed to 3D computer games. With ease they navigate through virtual environments interpreting audio-visual hints as they go. Astonished parents watch their kids with concern and envy. Just, as the WIMP (windows, menus, pull-downs) metaphor rules the design of graphical user interfaces (GUI) of today's software and replaced the command line control, 3D environments and 3D navigationwill provide new GUI metaphors for operating systems and desktop applications in the future.
Multi-user worlds are a new way for people to collaborate. Rumans are social beings. In multi-user worlds they can form new communities which have common interests and are not restricted by the locality, mobility or status of the person in the real world.
In the days of the first telephones, radios and TV sets nobody was able to foresee how these media would evolve. Today we are in quite a similar situation. Predicting the future of multi-user worlds is a forlorn hope. New technologies change social structures and new demands emerge which can be satisfied by exactly these technologies. In hindsight it remains unclear, whether the demand produced the technology or whether the technology produced the demand.
The success of DVWs depends not only on technology. A successful DVW must be compared with a movie and is a result of a team of experts with very different skills: programmers, directors, designers, story writers, producers and marketing experts.
Clarke- Willson [20] suggests that virtual environment designers should apply the same principles that made even early games so appealing: third person view, discovery and exploration, player control, maps, landmarks, closed environments (limited space), complexity management (reduced nurober of active objects) and constant positive feedback.
A platform of increasing importance for multi-user worlds are game consoles. Since 1995 Sony has sold over 20 million Play Stationsand SEGA sold 500.000 Dreamcast consoles in the US in just two weeks. The Dreamcast console and those under development by Nintendo and Sony can be connected to the internet and thus make possible multi-user games. Given the low price of these consoles, they might even be able to supersede personal computers as internet stations. This trend has also been realized by Microsoft and Intel. Allegedly, they recently started to develop a game console in cooperation.
16 3. User Perspective
Part II Fundamentals
4. Three-Dimensional
Computer Graphics
In this chapter we look at how three-dimensional computer graphics are produced from mathematical models. We first look at some mathematical preliminaries. Then we look at the different stages of the graphics pipeline.
Three-dimensional worlds are made of three-dimensional objects, which in turn are constructed from spheres, boxes, cones or sets of surfaces. Objects are not just combined but also transformed, i.e. they are scaled, rotated or translated. Mathematically these transformations can be described by matrices and composition of transformations by multiplication of the associated matrices. Coordinate systems play an important role in computer graphics. In VRML the geometry, position and orientation of an object are defined in a local coordinate system. Then the object can be placed in another coordinate system by defining the position, orientation and scale of its local coordinate system in the enclosing coordinate system.
4.1 Some Mathematical Preliminaries
In the mathematical view of 3D computer graphics, objects are just sets of points in a three-dimensional coordinate system. Usually one uses cartesian systems, i.e. systems with orthogonal coordinate axes. A coordinate system is either right handed or left handed (Figure 4.1). These terms stem from the fact that if you hold your right hand appropriately, the thumb, index and middle finger point into the directions of the X-, Y- and Z-axes of a right-handed system. The analog holds for left-handed systems.
Fig. 4.1. Right- and left-handed coordinate systems
y y z
20 4. Three-Dimensional Computer Graphics
When defining a 3D scene one usually proceeds as follows: one defines each object in a local coordinate system with its own origin, and then these objects are integrated by rotating, translating and scaling into another coordinate system. In 3D computer graphics homogeneaus coordinates are often used. These coordinates include an additional scaling factor w. The relation between cartesian coordinates (X, Y, Z) and homogeneaus coordinates (x, y, z, w) of a point are as follows:
(x,y,z,w) = (Xjw, Yjw,Zjw,w), for w # 0.
(4.1)
If w = 1, then the coordinates are called homogenized. Furthermore, w = 0 is used to describe points at infinity.
In the following we assume that all homogeneaus coordinates have been homogenized. Assume, that a point is translated by tx in direction of the X-axis, ty in direction of the Y-axis and tz in direction of the Z-axis, then the resulting point has the coordinates ( x', y', z', w') where
for homogeneaus coordinates:
x' = x+tx
y' = y+ty
z' = z + tz
w' =w = 1,
and for cartesian coordinates:
X' =X +tx
Y' = Y +ty
Z' = Z +tz.
(4.2)
The set of equations for homogeneaus coordinates can also be encoded by a translation matrix T, and the translation of a point is achieved by multiplying the coordinates of the point by T. For cartesian coordinates the equation can be turned into a vector equation and the translation is achieved by vector addition.
For homogeneaus coordinates:
(x',y',z', 1) = (x,y,z, 1) * [n H].
tx ty tz 1
For cartesian coordinates:
(X', Y', Z') =(X, Y, Z) + (tx, ty, tz).
(4.3)
The translation can be reversed. The translated point is simply translated by -tx, -ty and -tz. Thus we get the inverse matrix: