Electronic Signs (Mahmut): Difference between revisions

From CS486wiki
Jump to navigationJump to search
Content deleted Content added
Msubasi1 (talk | contribs)
Created page with "This page is designed to explain VBUSigns Project. It is a subproject of VirtualBU project. ---- ==Project Description== VBUSigns project is a subproject of VirtualBU project. Vi..."   (change visibility)
 
Msubasi1 (talk | contribs)
No edit summary   (change visibility)
Line 4: Line 4:
VBUSigns project is a subproject of VirtualBU project. VirtualBU project aims to create photo realistic of 3D environment of Binghamton University campus. VBUSigns project – subproject of VirtualBU aims to create and show signs in front of main entrance of campus. VBUSigns project is a module that is used in openwonderland project that is coded in java. The module has two parts, these are the 3D model of sign board and code part that enable the module to work in openwonderland client window.
VBUSigns project is a subproject of VirtualBU project. VirtualBU project aims to create photo realistic of 3D environment of Binghamton University campus. VBUSigns project – subproject of VirtualBU aims to create and show signs in front of main entrance of campus. VBUSigns project is a module that is used in openwonderland project that is coded in java. The module has two parts, these are the 3D model of sign board and code part that enable the module to work in openwonderland client window.
==Websites==
==Websites==
The main page of the VirtualBU project is http://cs.binghamton.edu/~steflik/wiki/index.php/VirtualBU
The main page of the VirtualBU project is
The URL for the website for VBUSigns subproject is http://cs.binghamton.edu/~steflik/wiki/index.php?title=Electronic_Signs_(Mahmut)&action=edit&redlink=1
http://cs.binghamton.edu/~steflik/wiki/index.php/VirtualBU
The URL for the website for VBUSigns subproject is
http://cs.binghamton.edu/~steflik/wiki/index.php?title=Electronic_Signs_(Mahmut)&action=edit&redlink=1

The websites is used to test and run VirtualBU project are
The websites is used to test and run VirtualBU project are
http://vbu.cs.binghamton.edu:8080
http://vbu.cs.binghamton.edu:8080
Line 14: Line 17:
To be able to run VBUSigns project you need to install NetBeans IDE. You can find installation package on the following link
To be able to run VBUSigns project you need to install NetBeans IDE. You can find installation package on the following link
http:// http://netbeans.org/downloads/
http:// http://netbeans.org/downloads/

To run VBUSigns project you need to download source code of Openwonderland project in following order
To run VBUSigns project you need to download source code of Openwonderland project in following order
../wonderland/trunk/wonderland
../wonderland/trunk/wonderland
../wonderland/trunk/wonderland-modules/VBUsigns
../wonderland/trunk/wonderland-modules/VBUsigns
After building openwonderland project you will be able to run VBUSigns subproject.
After building openwonderland project you will be able to run VBUSigns subproject.
You can download Openwonderland project source code with following link
You can download Openwonderland project source code with following link

http://code.google.com/p/openwonderland/wiki/DownloadBuildSource05
http://code.google.com/p/openwonderland/wiki/DownloadBuildSource05



Revision as of 13:46, 9 May 2011

This page is designed to explain VBUSigns Project. It is a subproject of VirtualBU project.


Project Description

VBUSigns project is a subproject of VirtualBU project. VirtualBU project aims to create photo realistic of 3D environment of Binghamton University campus. VBUSigns project – subproject of VirtualBU aims to create and show signs in front of main entrance of campus. VBUSigns project is a module that is used in openwonderland project that is coded in java. The module has two parts, these are the 3D model of sign board and code part that enable the module to work in openwonderland client window.

Websites

The main page of the VirtualBU project is http://cs.binghamton.edu/~steflik/wiki/index.php/VirtualBU The URL for the website for VBUSigns subproject is http://cs.binghamton.edu/~steflik/wiki/index.php?title=Electronic_Signs_(Mahmut)&action=edit&redlink=1

The websites is used to test and run VirtualBU project are http://vbu.cs.binghamton.edu:8080 http://vbu1.cs.binghamton.edu:8080 http://vbu2.cs.binghamton.edu:8080

Prerequisites

To be able to run the VirtualBU project you need to install Java on your computer. If you do not know how to get and install Java, you will find a link under the ‘’Launch’’ button on the main page of VirtualBU project. To be able to run VBUSigns project you need to install NetBeans IDE. You can find installation package on the following link http:// http://netbeans.org/downloads/

To run VBUSigns project you need to download source code of Openwonderland project in following order

     ../wonderland/trunk/wonderland
     ../wonderland/trunk/wonderland-modules/VBUsigns

After building openwonderland project you will be able to run VBUSigns subproject. You can download Openwonderland project source code with following link

http://code.google.com/p/openwonderland/wiki/DownloadBuildSource05

Project Development

There are two parts of the project;

Modelling Part

Applications Used

  • Google SketchUp

With Google SketchUp, I modeled the signboard that is placed in front of the main entrance of the campus. The model is embedded into module.

Coding Part

In Openwonderland for development Java is being used. For coding part I am required to write a module that illustrates the content of the signboard in the openwonderland client window. That is the module refreshes its screen in a time period and in every refresh the content on the board changes.

Code

Basically openwonderland modules have 3 parts. These are client side, server side and common side. Client side handles the cell creation, rendering and requests from server. When we open a client window everything we see is brought by client side of the code. In my code there is an extra class that creates and renders a JFrame that is used to show content taken from local a .txt file. Other classes are default classes that come when you created an module for openwonderland module, but still I have modified and added extra code parts in order to make my module worked. The common part handles the communication between client and server. Since there may be some extra content that client needs and these contents are kept on the server. In my module contents are model and the text file that wanted to be shown on the panel. The server part handles the server side of the project, which is it handles the changes in the world. In this part I wrote an extra part again to handle the changes in the text file. The handler checks whether text file is changed or not, if changed it retrieves and send the new content. Since my module runs dynamically I wrote an extra package named ‘’main’’ that initialize the connection to the client window and retrieves the text file location and refresh time from server and starts the module.

Environments Used

  • NetBeans IDE 6.9.1 and NetBeans IDE 7.0

How to run VBUSigns Module

After competing prerequisites, open module in NetBeans. Then right click on the module and ‘’build’’ it, after right click again and click ‘’deploy to server’’. After the module deployed to server just right click and press ‘’run’’. NetBeans will ask you the location of your text file enter it, then you will asked to enter refresh time enter it in number format and module will start. To run module in different servers you can change the following value in the ‘’build.xml’’ file; ‘’<arg value="target server address:8080"/>’’

Basic module definition in Openwonderland

A Wonderland world consists of:

  • Cells, that represent visible objects
  • Components, attached to cells, that add specific features to cells
  • Cell renderers, that use the graphics engine API to make cells visible on-screen
  • Art and other resources

Once these have all been created, they need to be packaged in some way for easy upload to the server. This is done using a Wonderland MODULE. A module is basically a wrapper file that contains all the Wonderland building blocks according to a specific structure. This structure lets the server know where all the different building blocks are. A module is actually a Java jar file. Server and Client Programs If lots of people are visiting the same virtual world, we have to make sure that everything in the world is the same for everyone. For example, if you're playing a game inside Open Wonderland and your friend tells you to pick up a health pack, you both have to be able to see the same health pack, at the same time, in the same location. And if someone else comes along and takes the pack, everyone else in the game has to know that the pack is no longer available. So, Wonderland has to keep track of all the objects in the world. This is very difficult – but Open Wonderland has been designed to make it easy. Wonderland is an example of a client-server application. To see what this means, we'll look at some of the main requirements for a virtual word.

  • Every user in the virtual world must see the same things as everyone else.
        If Nicole and Jon are in a room together, and Nicole sees a book in the room, then Jon must see the same book in the same location.
            • If anything changes, everyone should be kept up to date. If Nicole picks up the book, Jon should see that it is now no longer on the shelf, but is being
              held by Nicole.
            • Users should be able to connect at any time and see the current state of the world. If Jon has to leave the world for some reason, and while he is gone
              Nicole puts the book on a table, when Jon visits the room again, he should see the book on the table (assuming it hasn't moved since then).
            • Users do not need to know anything about the physical location of any other user in the real world. Nicole does not need to know that Jon is really in 
              San Francisco or that another user is in Singapore, nor do they need to know that Nicole is in Massachusetts. They do not need to communicate directly with 
              each other in the real world. Their computers also do not need to communicate with each other directly.

Wonderland is split into two parts, a server program, and a client program (we say that Wonderland has a client-server architecture):

          Server
             • The virtual world is stored on a computer at a particular IP address. The actual address is defined as a URL.
             • The server knows everything about the virtual world: it stores all the objects that will be displayed, controls how different parts of the Wonderland 
                system communicate with each other, and knows which users are inside the virtual world.
          Client
             • The client is on another computer, at a different IP address.
             • The client must log into the server to join a virtual world.
             • After the client logs on, the server sends a copy of the virtual world to the client. (Actually, the client can cache data locally, but on entering a new 
               virtual world, the data is sent to the client by the server.)
             • Note that there can be lots of different clients, each running on a different computer. There can also be more than one server, though this is rather complex.

Your computer is the client, asking the Wonderland server to send you all the data you need to display and interact with the virtual world.

       • The client is the program that you run on your computer – a Wonderland client.
       • The server is the program that runs on the other computer – a Wonderland server.

If another person (say, Jon) wants to join you in the virtual world, they must log on to the same server as you, and request their own copy of all the virtual world data. Now, you both have the same virtual world displayed on your computer. If you change something about the world, e.g. move a book, Jon needs to know what happened (or he'll get confused). So, when you pick up the book, four things are done:

       • your client sends the new position of the book object to the Wonderland server
       • the server updates its own copy of the book object
       • the server then sends the new position of the book to Jon's client program
       • Jon's client updates its own copy of the book object, and displays it in its new location

Now everyone is up-to-date. All this communication is handled by Wonderland. But we must still write code to plug our own cells into the Wonderland communication system. This is also packaged inside a module, along with everything else.

Prepared by Mahmut SUBASI