Document Sample
3D VIRTUAL DESKTOP APPLICATION Of UNSW Introduction What we Powered By Docstoc
APPLICATION Of UNSW                                                         Introduction

                                                                                To build a stand alone or web based interactive virtual 3D map of
                                                                                the UNSW Kensington campus.

                                                                            What do we have to start off with?
                                                                                An existing 3D model of the campus in .SHP and .DXF file

          By Jack Chen, Pui-Hei Lui and Yatheezan Seevaratnam
                           Advisor Chris Rizos
                    Supervised by Dr. Samsung Lim

What we propose to do 1/4                                                   What we propose to do 2/4
Add realistic textures to the currently bare 3D model                       Add attribute information for each building.
                                                                                So users know what they’re looking at.
     Current model only has dimensional information of campus
      buildings, no textures at all. So let’s make it sexy and beautiful!          Add attribute information to each building.
                                                                                    Such as Building Name, Coordinate Location, School
     Surface by applying photographic images or segments of actual                 Offices/Faculty, Opening hours, Facilities, etc.
      campus building walls. Will entail reconnaissance.
                                                                                   Information gathering about the buildings from faculties.
     3D model data will need to be converted into a more 3D-editing-               Will entail more reconnaissance and co-operation from faculties.
      friendly format, so that we can render and surface the model
      easily, as the current .shp/.dxf files cannot be imported into any           Implementing a campus database containing all the information
      known 3D editing software.                                                    ready for querying.

What we propose to do 3/4                                                   What we propose to do 4/4
Implement querying capabilities and information display for                    Virtual flythrough of the campus in 3D.
                                                                                We plan to implement our 3D model adaptations in 3D programs that
  building information and locations.
                                                                                have flythrough capability. So users should be able to fly through a
        So users can find what they want.                                       realistic virtual campus.

     stand-alone or web-based interface will include querying                  Who says you can’t go to uni everyday of the week!
      capabilities to search for information about campus buildings.
      Queries and Coordinate information should help users find the            Shortest path between two locations on campus.
      location of buildings in the campus map                                   If time allows, we wish to implement shortest path algorithms onto the
                                                                                campus topology. This would also entail virtual walkthroughs of the
     Whilst viewing the 3D model, users can select buildings to view           designated path, giving users first hand virtual guidance.
      their information.

Design Introduction                                                  How do we actually integrate the 3 components?

   The project is consisted of 3 main components
   Database Component - Building information, location, dimension
    and usage information (DBMS,DB acess)

   Graphic model - Model of UNSW , main emphasis here is close                  Missing Link                         Missing Link
    resemblance to the actual campus (Graphic file, API loader)

   User interface + functionalities - provided through JAVA / C++
                                                                            GRAPHICS                                       DATABASE

                                                                     Which Main Programming
Main Points To Consider                                              Language?
   Web based / Stand alone
   What’s the main programming language
   DBMS                                                                                           Programming
   Graphic editor                                                                                  Language

   Integration programming language / DBMS
   Integration programming language / Graphics
   Project Monitoring
                                                                              Graphics                                     Database
   Project Testing and Evaluation                                             Editor                                      Platform

Why We Choose JAVA                                                   What Graphics Editor
   Familiarity with JAVA                                               We considered what needs to be done (texturing, editing and extraction)

                                                                        Looked at various mainstream programs
   We already identified several key APIs which we
    can use for the various components (swing, Awt,                     Google sketchup - Easy to use but alters the scale and can only save
                                                                         as sketchup format.
    Java 3D, JOGL)
                                                                        Autocad 2006 – Complex to learn. Given model file is constructed with
                                                                         several layers which makes it difficult to add textures.
   Java was originally created for network computing
    on embedded systems.
                                                                        3D Max – Does everything we required with ease

    API Choice For Graphics                                                             • JDBC
        Looked at Open GL, Direct 3D, X3D, Java 3D,                                    • ODBC

        Decided on X3D or Java 3D for further research

        X3D – Web based

        Java 3D – Stand Alone

        Considered interchangeability

                                   DBMS                                             Comparisons
                                                                                       PostgreSQL and MySQL are open source relational database management
                                PostgreSQL                                             systems (RDBMS) that use SQL.
                                                                                        PostgreSQL offers Multi-Version Concurrency.
                                MySQL                                              

                                                                                       PostgreSQL’s performance is constant no matter the size of the database nor the
                                                                                        complexity of the query.
                                MS Access                                             MySQL has been designed from the ground up to be a simple as possible to
                                                                                        understand and use which is why most people who are new to SQL do so in the
                                                                                        context of handling web pages.
                                                                                       MySQL is the "popular, easy-to-use" database.
                                                                                       PostgreSQL is the "feature-rich, standards-compliant" database.
                                                                                       MySQL and MS Access can't index fields to the same level as PostgreSQL thus
                                                                                        performance tuning cannot be carried out in the same sophisticated manner.
                                                                                       PostgreSQL's security is also far more advanced than both.

    Comparisons contd.                                                              MS Access and JDBC
       MS Access out performs PostgreSQL and MySQL when dealing with object           Set up Java to understand Microsoft's data access method, ODBC.
        structure rather than data.
       MS Access is easy to use and has powerful design tools.                        Set up a connection to the database.

       PostgreSQL consistently performs faster than MS Access and MySQL, but not                            String filename = "C:/UNSW/unsw.mdb";
        always. For example, MS Access and MySQL are faster than PostgreSQL in          String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
        performing some operations like insert and select.
                                                                                               Connection con = DriverManager.getConnection( database ,"","");
                                                                                       Run queries
       MS Access and MySQL handle connections very fast.
                                                                                                              Statement s = con.createStatement();
                                                                                                       s.execute("select building_name from Building");
       Therefore, MS Access, we chose you!
                                                                                                                  ResultSet rs = s.getResultSet();
                                                                                                                           if (rs != null)
                                                                                          while ( ){System.out.println("Building Name: " + rs.getString(1) );}

      ERD                                                                      Schema
                                   Name                 Faculty                create table Building (
                                                                                         building_id varchar(8) PRIMARY KEY,
                                                                                         building_name varchar(50),
                                             Building             Coordinate
                                                                                         building_coordinates varchar(20),
                    Building ID                                                          faculty varchar(50)
                                                                               create table Rooms (
                                                                                        room_id varchar(8) PRIMARY KEY,
                                                                                        building_id varchar(8);
                                                                                        room_name varchar(20);
                                                                                        room_number varchar(20);
                                                                                         capacity int;
                                             Rooms                 Capacity              FOREIGN KEY (building_id) REFERENCES Building(building_id);
                     Room ID

                                   Room                 Room
                                  Number                Name

Java 3D                                                                        What is a Scene Graph?
   Graphics API which runs on D3D or Open GL

   Is vendor neutral and platform independent

   Focuses on content rather than rendering. 3D optimization is
    handled by Java 3D and not the developer.

   Java 3D programs are composed of scene graphs created and
    manipulated by users

Scene Graph                                                                    Why Java 3D 1/2
                                                                                  Optimized for real-time 3D rendering
   A scene graph can be consisted of shapes, groups and
    transforms, lights, fog and backgrounds, sounds and                            Integrates readily with existing Java APIs. Swing for the user
    environmental sounds                                                           interface, JDBC for database access

   For the purpose of this project we will only be using a subset                A large range of loaders available for various main stream
                                                                                   graphics file formats such as DXF, 3DS, OBJ and VRML etc
    which includes shapes, lights, backgrounds and sound (optional)

                                                                                  Java 3D class library provides a simpler interface than most
                                                                                   other 3D libraries.

Why Java 3D 2/2                                                                 Against Java 3D
   Is platform independent which means it can run on different OS,                Lack of support for software rendering
    hardware configurations, various output and input devices
    support. Given its nature this is important !!!                                Applications runs in a window some graphic cards (older ones
                                                                                    voodoo chipsets) supports hardware acceleration only in full
   Using Cyber3D toolkit we can convert Java 3D to VRML which                      screen mode.
    means we have some sort of platform to work with if we want to
    make a web based interface later.                                              100% CPU usage

                                                                                   Lacks some of the more advanced graphic functionalities (ray

Open GL or Direct 3D                                                            Java 3D conclusion
   There are 2 versions of Java 3D                                             Java 3D is a very good platform for the stand alone
                                                                                version as it allows us to concentrate on the content of
   We decided on the Open GL version because                                   our application rather than worrying about rendering.
                                                                                Most of its shortcomings are graphics card based and
        Open GL is more wildly support on different platforms
                                                                                can be ignored base on graphic card speed nowadays.
       Open GL version was developed first therefore more optimized
        and has shown to be achieving 30-50% high fps.
                                                                                Its most important factor includes flexibility for us to
       Open GL version should also be more stable considered it was            transfer what we have done in Java 3D onto other
        the primary platform implementation                                     development platforms.
       Open GL version has more features such as line width, line anti
        aliasing, two sided lighting and back face normal flip all can be
        useful within our project

X3D                                                                             X3D Features
   The New ISO standard for delivering 3D content over the web. Successor to      XML Integrated: the key to integration with:
                                                                                     Web Services

   Open architecture which supports a wide array of domains and user                Distributed Networks
    scenarios.                                                                       Cross-platform, inter-application file and data transfer

   Combines both geometry and real time behavior into a single XML file.
                                                                                   Real-Time: graphics are high quality, real-time, interactive, and
                                                                                    include audio and video as well as 3D data.
   Also scene graph oriented in a cyclic graph, or as nodes

   Content can viewed in either native X3D browsers of web browsers.              Well-Specified: makes it easier to build conformant, consistent and
                                                                                    bug-free implementations.
   X3D is componentised to accommodate different engineering and scientific

X3D Support 1/2                                                           X3D Support 2/2

   3D graphics and programmable shaders - Polygonal geometry,               Navigation - Cameras; user movement within the 3D scene; collision,
    parametric geometry, hierarchical transformations, lighting,              proximity and visibility detection.
    materials, multi-pass/multi-stage texture mapping, pixel and vertex
    shaders, hardware acceleration.                                          Scripting - Ability to dynamically change the scene via programming
                                                                              and scripting languages. Can be programmed using C, C++ or Java.
   CAD data – can translate CAD data to an open format for publishing
    and interactive media.
                                                                             Fully Java based components classed as XJ3D.

   Spatialized audio and video - Audio-visual sources mapped onto
    geometry in the scene allowing for audio and visual cues.

Why X3D                                                                   Against X3D
   Also high quality 3D data, audio and visual integration allows for
    high interactivity.                                                      Achieving desired functionalities would require the integration of
                                                                              multiple components, which may prove complex.
   Large range of data converters available.
                                                                             Viewing by web browser requires X3D plug-ins.

   CAD data can be imported readily, should we edit in AutoCAD.
                                                                             Web based integration may prove difficult to implement for
                                                                              inexperienced team members.
   Well-specified; XJ3D is well componentised and can accommodate
    to any desired functionalities.

   Camera navigation which allows for flythrough and perspective
    features such as proximity and collision.

X3D Conclusion                                                            Final Conclusion
                                                                             Main question, stand alone or web based?
    X3D is a very suitable platform to support our project, as
    it can both be delivered as a stand alone or web based                   We choose stand alone for now due to
    application, is the world wide ISO standard for delivering                   Web based requires a new set of issues for us to consider such
    3D information on the web, so is easily interchangeable                       as security, web server access, speed ( transferring issues /
    with other data formats and software, can be                                  rendering) and graphic data complexity. In the end we fear these
    implemented in a language familiar to all team members,                       issues may distract us from the main requirements
    namely Java in the form of JX3D. Apart from the                              Team members lack experience and in some cases the
                                                                                  knowledge required for web based application development
    possible complexity of it’s implementation, X3D can fulfill
                                                                                 We can make the transition from Java 3D to X3D without too
    all our foreseeable requirements.
                                                                                  much complication when we are satisfied with our stand alone

Final Design Decision                                                         Alternate Proposal
   Stand Alone                                                              OpenGL Positives
                                                                                Open sourced and is hugely popular

   Java for main programming of functionality and interface                    Can be implemented in Java through the binding call JOGL

                                                                                Available across a range of platforms.
   3D Max for graphics editing                                                 Offers more advanced graphical rendering features (ray
   Java 3D for 3D graphics API (handles main programming
    language and graphics integration).                                      OpenGL Negatives
                                                                                More complex than Java3D
   DBMS Microsoft Access                                                       Concentrates greatly on the positioning and states

                                                                                Hardware extensions
   Database Access JDBC API + ODBC

Testing                                                                       Monitoring
   Testing through out the project execution will be conducted                  We have drawn up a project schedule, which will help us guide and
    internally by our project team members.                                       monitor the progress of our project through out the semester.

   Our overall application will be tested against Usability requirements;       Milestones for deliverables and project phases have been put in
    whether our application is efficient, easy to use or prone to error.          place so that we have foreseeable and achievable short term goals
                                                                                  and regular intervals to gauge our current progress.
   End user testing and walkthroughs will also be conducted towards
    the end of the project to obtain feedback as to how we can refine            Any deviance from the project schedule will give us a good indicator
    our application’s functionality and interfacing.                              of how we should manage time ahead, be it shortcomings or

Project Schedule
   Main bulk of the project is in the graphical and database aspects.
    This is due to immense amounts of information and photographic

   Total project estimation time is 16 weeks. Though we plan to start
    before semester begins next year.

   Show project schedule in MSproject.

Design and Software Choice Reference:
   [1]
Java 3D Reference:
   [1]
   [2]
   3D/forDevelopers/J3D_1_3_API/j3dguide/index.html
   [3] Introduction to programming with Java 3D David R. Nadeau University of California
   at San Diego
   [4]
   [5]
   [6]
   [7]
X3D Reference:
   [1] Web3D Consortium – X3D Overview,
   [2] Java Sun
Database References:
   [1] PostgreSQL 8.0
   postgres%2520vs%2520mysql.pdf+postgresql+oracle+mysql+jdbc+comparison&hl=en&
   gl=au&ct=clnk&cd=839
   [2] Database Programming with JDBC and Java By George Reese
   [3] Linux Today
   [4] PostgreSQL
   [5] The Java™ Tutorials
   [6] Comparison of different SQL implementations
Alternative Proposal Reference
   [1]


Shared By:
Description: 3D VIRTUAL DESKTOP APPLICATION Of UNSW Introduction What we ...