Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2009 13th IEEE/ACM International Symposium on Distributed Simulation and Real Time Applications

A Peer-To-Peer Architecture for Real-Time Distributed Visualization of 3D Collaborative Virtual Environments


Alma Martnez G., H ctor Orozco A., F lix Ramos C., Mario Siller e e Centro de Investigaci on y de Estudios Avanzados del I.P.N. CINVESTAV Unidad Guadalajara Av. Cientca 1145, colonia el Bajo, Zapopan, Jalisco, M exico E-mail:{vmartine, horozco, framos, msiller}@gdl.cinvestav.mx

AbstractA 3D collaborative virtual environment (CVE) is a distributed simulation of a 3D virtual environment (VE) in which a large number of users located in different geographical places can interact with each other in real-time. In order to collaborate in a 3D CVE, it is necessary to send update messages corresponding to the change in the state of a shared object among involved users. In this paper, we present a new system for real-time distributed visualization of 3D CVEs. This distribution is carried out on a grid of heterogeneous computers implementing a communication based on a hybrid peer-to-peer (P2P) architecture. Our system ensures a coherent visualization in according to a consistent updating of 3D VE for all involved users. In this way, each user can visualize in real-time the changes done by other users. Keywords-Virtual Environment; Area of Interest; Peer-ToPeer Architecture; Real-Time Distributed Visualization.

I. I NTRODUCTION In recent years, the design of medium and large-scale distributed virtual environments (DVEs) have been focused on the creation of 3D interactive distributed applications, such as massively multi-player online games (MMOGs) in the entertainment industry. An efcient way to implement these systems is by using peer-to-peer (P2P) architectures [1], because they are a convenient platform for supporting and handling thousands and even hundreds of thousands of users interacting at the same time within them. So, different users can easily access remotely to these systems, generally through the Internet. A VE has three principal components: a set of 3D scenarios, a set of avatars and a set of 3D objects (they will be described in section III-A). These components are used to dene the degree of interaction and communication between users and to compute the evolution of VE. The main problems to make a correct distribution and visualization of a VE are: executing the actions and changes into it in a correct order, thus the users can take decisions based on the current state of VE; providing consistency between users to maintain the same environment state among them; solving the communication problems to reduce the number of messages and the delay and loss of them; taking into account the internal and external characteristics of the virtual
1550-6525/09 $26.00 2009 IEEE DOI 10.1109/DS-RT.2009.21 251

characters (avatars) to make a most realistic representation of the evolution of VE. In this work, we present a new approach for real-time distributed visualization of 3D VEs based on a P2P architecture. We implement a consistent and coherent distribution for all involved users in a specic VE by dening two main characteristics: local visualization for each user and communication management among them. Both features are managed to prevent delays when updating the VE. This paper is organized as follows. The following section is devoted to overview the related work. In this section we will give a detailed revision of the state of the art about the available architectures for supporting DVEs and the existing techniques for parallel and distributed rendering. The third section is dedicated to the proposal of this work. In this section we will present a system for real-time visualization of 3D dynamic VEs. In the last section we will present the obtained conclusions from this work. II. R ELATED W ORK As the interactivity is a basic requirement in a collaborative virtual environment (CVE) [2], it is necessary a level of persistence and consistency to give all users the impression of interacting in a collaborative or shared way [3] within it. This level can be achieved by synchronizing user actions and its behavior. Thus in a CVE, messages corresponding to the change in the state of a share resource must be transmitted among all involved users. We must consider certain factors such as bandwidth, expected latency of messages, topology, and facilities offered by the nal architecture [4]. In this paper our approach is only focused on the visualization of VEs and one primordial aim is to facilitate the creation and representation of different kind of 3D scenarios. In order to compare our work with the present state of the art in literature, we analyze the most important related work and we do an analysis about rendering, distribution of VEs and video games. In [5] is presented an study about the research issues (resource allocation, task partition and data management) in constructing a distributed rendering for massive data sets on

computational Grids. They also presented an implementation of the Dynamic Pixel Bucket Partition (DPBP) algorithm. This algorithm is used for task allocation of distributed rendering applications on computational Grids and it shows that performance of near real-time rendering can be reached. The above revised work is not useful for us, because the output of the rendering process is an image. If we will use this result, it will be necessary to generate several images per second to visualize the complete evolution of the 3D scenarios. Another problem in these works is that exists a main server in charge of compose the nal image, if server fails, it would not be possible to generate the nal image and the rendering process would be incomplete. Finally, the features of each element in the process are very specic, limiting its use to a small group of users. A system for distributed rendering of large and detailed virtual worlds was described in [6]. This system is a distributed client-server implementation, where the processing of virtual world is distributed among the available servers. This system can be used for generating virtual worlds with ne detail at planetary scales. The capacity of server limited the amount of client in the system. We can make a comparative with other applications like video games. This is because the games allow the interaction of multiple users. Most games implement a client-server architecture [7]. In these games the user can manipulate the avatars, but the users actions are not performed by the user application [8]. Instead of this, the user application sends update messages to the server who is responsible for computing the evolution of game. Therefore, the server often represents a bottleneck. There are some games that use a distributed architecture [9], but these games have a simple behavior and the set of actions of user is usually limited [10]. III. S YSTEM A RCHITECTURE In this section we present a system for supporting the creation of 3D CVEs. Our system implementation takes advantage of the use of the computational grids and characteristics of the peer-to-peer architectures by generating a realtime distributed visualization of 3D VEs. Our architecture has the following components: Public knowledge base (KB): Is a set of ontologies based on OWL (Web Ontology Language). These ontologies manage and offer information about the VE components (3D scenarios, avatars and 3D objects). Coordinator nodes: These are special users that manage the consistency of VE. These nodes are grouped by areas of interest into the VEs. User nodes: They are external entities that can perform actions into the VEs. With the use of different nodes avoids the dependence on servers, in this manner, it is possible to get a correct and complete evolution of VE in a most easy way, even if
252

there will be a disconnect node (user). Each node contains a minimum KB with which it can participate in the VE. If any of them does not contain all the necessary entities for interacting into the VE, it may request to other nodes (users or coordinator) sending entities missing. In this work, some aims are: displaying the correct and complete visualization of the different kind of VE, and allowing the users the manipulation and animation of the avatars without the use of predened or precomputed animations. Instead of this, the users can animate to the 3D entities (avatars or 3D objects) by manipulating their internal skeleton and their joints in run time. A. Virtual Environment Components A VE is formed by the following components: A set of 3D scenarios (S): A 3D scenario is a place into the VE, where are carried out the requested actions by users and where can be visualized the done changes by them. For example, a room, a park, a school, etc. A set of avatars (A): An avatar is an autonomous articulated virtual entity with well-dened features and functionalities. This entity is able to live and interact autonomously into the VE. For example, a virtual human, an virtual animal, etc. In order to animate an avatar, it has an internal skeleton, a dynamic behavior (personality, emotions and moods) and a set of skills that can performs (walking, running, etc). A set of 3D objects (O): A 3D object is an entity that requires an external stimulus to perform an action. For example, a box, a table, a door. The classication of the components of VE facilitates to recognize the dependences between the users actions and to make an assignation of priorities. In this way, it is possible to identify which actions can be make in parallel. The use of predened animations shows the same actions at any time. In our system, these are similar to the real world. For example: a user can move and animate a virtual human in different ways depending on the state of VE, where can inuence factors such as the type of ground of VE, the current weather conditions into the VE, among other. B. System Communication A user can execute actions in the VE through a visual port. This port is a 3D visual interface in which are displayed changes into the VE. This interface was made using a 3D engine that permits a real-time manipulation of the virtual entities. We have implemented a communication architecture based on a P2P communication [11]. By using a peer-topeer architecture, each user is able to understand all actions that are occurring within the VE (see gure 1). Thus, it is possible to eliminate as much as possible the dependence and utilization of servers that act as interpreters of actions on the VE.

Figure 2. Figure 1. Interaction between the user and the visual port and modeling layered for a P2P communication scheme

Action selection based on a dynamic TS

Figure 1 shows that our architecture is divided into different layers, in order to identify and reduce the dependence of upper and lower layers. The local processing layer is necessary to update the local interface and to maintain a minimum consistency into the VE. That is to say, when a user requests to execute an action, this is evaluated to verify its consistency. For example, all affected entities must exist and the actions must be valid in the entity before to apply changes in the state of them. This in order not to assume that the users actions are 100% reliable. It is necessary to check the consistency among all involved users. To do this, consistency messages are generated. These messages contain a description of the area of interest to which the user belongs. Consistency messages are distributed by the layer distribution of updates. This layer also is responsible for selecting a reliable means to deliver them to a responsible coordinator of an area of interest. Next, we present a more detailed explanation of the tasks that have been completed to obtain a real-time visualization of DVEs. These task are the following: real-time visualization and message distribution. C. Real-Time Visualization When a user wants to perform an action on an avatar, it is automatically generated a request. This request has the following elements: the required avatar, the action to perform, and the time stamp (Ts) that indicates the order in which actions must be performed. For each avatar is managed a queue of requests. In this queue are added all actions the avatar must perform. Figure 2 shows that by using a time slot (TS) it is possible to manage properly the workload locally, allowing viewing in real-time the required changes into the VE. The TS is handled taking into account an increase in local time that increases or decreases the amount of actions to be executed in a process. In this way, each new state of VE is given by the concurrent execution of processes. Each process returns a result that is sent to the user. This result tells the user if the actions were performed correctly or if there was any anomaly or failure during the execution of these.
253

In our implementation, the real-time visualization of changes into the VE does not exceed 60 milliseconds, because the human eye perceives a continuous movement when changes are made the transition from one image to another at intervals of 60 milliseconds [12]. If these intervals are larger, the movement will be slow and discontinuous. D. Message Distribution One of the main challenges in a shared DVE is to efciently send update messages in a correct way to provide scalability, minimized the delivery delay of messages, and to obtain a better reliability of VE. In our implementation, in order to carry out the distribution of messages among users (nodes in the system), we take into account the following aspects: the organization of the nodes, the type of communication channel, and the involved communication protocols (see gure 3). These factors affect the delivery of packages, the delivery time is very important to ensure a real-time visualization of VE. Nodes of system are grouped in a heterogeneous grid, where there are divisions based on the area of interest of each avatar. To identify to which area of interest belongs each avatar, we consider two aspects: the vision area of the avatars and the constraints of vision of VE. The vision area is given by the range of vision of the avatars, that is to say, characteristics and details of VE that are visible for each avatar. Constraints of vision of VE are given by the objects that restrict the range of vision of the avatars. Thus, having identied the areas of interest, it is necessary to choose a coordinator node for each area of interest. This choice is done taking into account the average distance between all nodes, and also considering the available bandwidth. This is to reduce the delay in message delivery and minimize loss of them. In a reliable connexion is possible to know the time to live (TTL) eld. This eld contains the number of jumps needed for a packet reaches its destination. We dene the distance like the number of jumpers that a packet has done. For example in gure 3, node 3 has the shortest distance to all other nodes, so it is taken as the coordinator node. The new state of VE is calculated by taking into account

on Parallel and Distributed Systems - Volume 2 (ICPADS07). Washington, DC, USA: IEEE Computer Society, 2007, pp. 1 8. [2] M. H. Ahmed, D. Gracanin, A. Abdel-Hamid, and K. Matkovic, An approach to interaction interoperability for distributed virtual environments, In Short Paper Proceedings of the 14th Eurographics Symposium on Virtual Environments (EGVE 2008), p. 3538, 2008. [Online]. Available: http://www.vrvis.at/publications/PB-VRVis-2008016
Figure 3. The election of a coordinator in by area of interest

two major agreements: the rst one among all involved users in an area of interest and its coordinator (new state of the area of interest) and the second one among all involved coordinators in the VE (nal state of VE). If a coordinator has a work overload, it is difcult to process the real-time visualization of VE. To solve this problem, a new coordinator is selected. In this way, there may be more of a coordinator per area of interest. These coordinators are selected according to the distances they have to other nodes. This ensures that each coordinator manages a balanced amount of users. When a user logs off, it is checked whether there needs to be more of a coordinator for the area of interest. In a similar way, when one user changes to other area of interest, it is veried whether there needs to choose a new coordinator for the area of interest. IV. C ONCLUSIONS By using a dynamic TS that allows grouping and administering all actions that can be done in 60 milliseconds, it is possible to ensure a real time visualization of the changes into the VE. Time stamps allow the execution of actions in the same order they were requested. The nodes are grouping in different interest areas, this minimize the amount of messages in network. The messages from VE are classied into subsets, a node receives messages just one subset therefore reducing or avoiding the overload in each node. Finally, we believe that it is necessary to make a comparison test between our research and other systems like video games. A possible test can be to analyze the users reaction with the aim of measuring the subjective quality resulting. ACKNOWLEDGMENTS This research is partially supported by CoECyt-Jal Project No. 2008-05-97094, whilst authors Alma Martnez and H ctor Orozco are supported by CONACYT grants No. e 47605 and 203060 respectively. R EFERENCES
[1] S. Rueda, P. Morillo, and J. M.Orduna, A peer-to-peer platform for simulating distributed virtual environments, in ICPADS 07: Proceedings of the 13th International Conference
254

[3] C. de Oliveira Jauvane, S. Shirmohammadi, and N. D. Georganas, A collaborative virtual environment for industrial training, in VR 00: Proceedings of the IEEE Virtual Reality 2000 Conference. Washington, DC, USA: IEEE Computer Society, 2000, p. 288. [4] S. Singhal and M. Zyda, Networked Virtual Environments: Design and Implementation. New York, NY, USA: ACM Press/Addison-Wesley Publishing Co., 1999. [5] H. Zhu, L. Wang, K. Y. Chan, W. Cai, and S. See, A distributed rendering environment for massive data on computational grids, in P2P 03: Proceedings of the 3rd International Conference on Peer-to-Peer Computing. Washington, DC, USA: IEEE Computer Society, 2003, p. 176. [6] Chaudhuri, D. Horn, P. Hanrahan, and V. Koltun, Distributed rendering of virtual worlds, in Technical Report CSTR 200802, Computer Science Department, Stanford University, 2008. [7] P. Svoboda, W. Karner, and M. Rupp, Trafc analysis and modeling for world of warcraft, in Communications, 2007. ICC 07. IEEE International Conference on, 2007, pp. 16121617. [Online]. Available: http://dx.doi.org/10.1109/ICC.2007.270 [8] G. Armitage, M. Claypool, and P. Branch, Networking and online games : understanding and engineering multiplayer internet games. John Wiley, 2006. [9] A. Bharambe, J. Pang, and S. Seshan, Colyseus: a distributed architecture for online multiplayer games, in NSDI06: Proceedings of the 3rd conference on 3rd Symposium on Networked Systems Design & Implementation. Berkeley, CA, USA: USENIX Association, 2006, p. 12. [Online]. Available: http://portal.acm.org/citation.cfm?id=1267680.1267692 [10] K. Chen, P. Huang, and C. Lei, Game trafc analysis: An mmorpg perspective, Computer Networks, vol. 50, no. 16, pp. 30023023, 2006. [11] T. Braun, M. Diaz, J. Gabeiras, and T. Staub, End-to-End Quality of Service Over Heterogeneous Networks. Springer, 2008. [12] A. M. Marini, Tiempo de reaccion al inicio del moviemiento: Un estudio sobre la percepcion de velocidad, PhD Perception, Communication and Time, Department of Educational Psychology, Universidad Autonoma de Barcelona, Barcelona, 2002.

You might also like