31
Virtual Reality Exhibition Hall Hypercube Chenxi Shi Li Ma Shuyu Zhang Ziren Wang Oulei Zhou Guided By Prof. CHAIYAPORN MUTSALKLISANA

FinalReport_HyperCube

Embed Size (px)

Citation preview

Page 1: FinalReport_HyperCube

Virtual Reality Exhibition Hall

Hypercube

Chenxi Shi

Li Ma

Shuyu Zhang

Ziren Wang

Oulei Zhou

Guided By Prof. CHAIYAPORN MUTSALKLISANA

Page 2: FinalReport_HyperCube

1

ContentsIntroduction......................................................... 3

Problem Description.................................................. 4

Intended Customers & Benefits........................................ 5

EER Diagram.......................................................... 6

Normalization........................................................ 7

Views................................................................ 8

1) View Artist ..................................................... 8

2) View Artwork .................................................... 8

3) View Level 1 Artwork ............................................ 9

4) View Level 2 Artwork ............................................ 9

5) View User Comments ............................................. 10

6) View User Link ................................................. 10

7) View User Payment .............................................. 11

8) View User Profile .............................................. 11

Procedures.......................................................... 12

Procedure 1 for Different Artist .................................. 12

Procedure 2 for Different Artwork ................................. 12

Procedure 3 for Different User Collection ......................... 12

Procedure 4 for Different Artist .................................. 13

Procedure 5 for Different User Level .............................. 13

Procedure 6 for Recent Comment .................................... 14

Procedure 7 for Different Style Artwork ........................... 14

Procedure 8 for Different MediumTech Artwork ...................... 15

Triggers............................................................ 16

Trigger in Payment with User-Level ................................ 16

Trigger in Comment with User-Activist ............................. 17

Triggered after update a comment record ........................... 17

Index............................................................... 18

Page 3: FinalReport_HyperCube

2

Transaction......................................................... 20

Unity 3D Program.................................................... 24

Introduce ......................................................... 24

Program Parts Detail .............................................. 25

Future Scope and Conclusion......................................... 29

Display ........................................................... 29

Sound ............................................................. 29

Voice ............................................................. 29

Page 4: FinalReport_HyperCube

3

Introduction

Virtual reality technology is a way to create and experience the virtual world of computer simulation system, which uses a computer-generated simulation system. In addition to general computer having visual perception, there are auditory perception, tactile perception, motion perception, even including the taste, smell, perception and so on. Ideal virtual reality should have all the people with the sensing function.

In this project, database tables including exhibits, themes, activities, visitors and so on can be established. Then it can create a VR system that shows a kind of exhibition hall interactive 3D dynamic visual and even the physical behavior, which enable users to immerse a real exhibition environment.

Page 5: FinalReport_HyperCube

4

Problem Description

With the development of modern technology, the virtual reality technology is no more a fantasy. Industrial giants like Google, Sony and Razer have already delivered promising VR demo system. In addition to general computer having visual perception, there are auditory perception, tactile perception, motion perception, even including the taste, smell, perception and so on. Ideal virtual reality should have all the people with the sensing function. The V-R equipment is usually a goggle or a helmet, and can transport people’s mind to any virtual environment.

A V-R system always needs an enormous database system to organize detailed VR elements. For our project, we use background knowledge of Virtual Reality, setup a database for a VR exhibition hall. In order to realize such database, we will need to define structure of users’ information, exhibition hall maps, exhibit models, activities’ information and sensorial feedback. The exhibits are assumed to be scanned by a high resolution 3D scanner and the database can provide ports for these model information inputs.

Page 6: FinalReport_HyperCube

5

Intended Customers & Benefits

The customers for this database are visitors who are interested in artworks. This document should show people 3D pictures of almost all famous artworks even provide tactile feeling. This database still includes some functional specification of application, which can help customers understand easily.

This database can host different themes of activity, determine various architecture styles of the virtual hall. Users can interact with the exhibits and other users in the virtual community. All the exhibits can be scanned and stored in the database system so that people can see and touch in a virtual world and the tactile sensor would response the actual feeling to the users.

Page 7: FinalReport_HyperCube

6

EER Diagram

Page 8: FinalReport_HyperCube

7

Normalization

Database normalization is the process of organizing the columns and tables of a relational database to minimize data redundancy. The Purposes for Normalization are eliminating redundant data and Ensuring data dependencies make sense. 1NF refers to each table should be organized into rows, and each row should have a primary key that distinguishes it as unique. 2NF means that for a table that has concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence. 3F applies that every non-prime attribute of table must be dependent on primary key.

Page 9: FinalReport_HyperCube

8

Views

1) View ArtistDisplays all artist information.

It is ordered by artist name.

It joins artist table with other 2 tables.

SELECT * FROM VR.`artist view`;

2) View ArtworkDisplays all artwork information.

It is ordered by artwork name.

It joins artwork table with other 4 tables.

SELECT * FROM VR.`artwork view`;

Page 10: FinalReport_HyperCube

9

3) View Level 1 ArtworkDisplays the artwork that is level 1.

It is ordered by artwork name.

It joins attributes from two tables.

SELECT * FROM VR.`level 1 artwork`;

4) View Level 2 ArtworkDisplays the artwork that is level 2.

It is ordered by artwork name.

It joins attributes from two tables.

SELECT * FROM VR.`level 2 artwork`;

Page 11: FinalReport_HyperCube

10

5) View User CommentsDisplays the buyer and details about the products they have bought.

It is ordered by comment ID.

It joins attributes from two tables.

SELECT * FROM VR.`user comment`;

6) View User LinkDisplays the link information between users.

It is ordered by first user ID.

SELECT * FROM VR.`user link`;

Page 12: FinalReport_HyperCube

11

7) View User PaymentDisplays the payment information of users.

It is ordered by transaction ID.

It joins attributes from two tables.

SELECT * FROM VR.`user payment`;

8) View User ProfileDisplays the user profile information.

It is ordered by user ID.

It joins attributes from two tables.

SELECT * FROM VR.`user profile`;

Page 13: FinalReport_HyperCube

12

Procedures

Procedure 1 for Different Artist

Procedure 2 for Different Artwork

Procedure 3 for Different User Collection

Page 14: FinalReport_HyperCube

13

Procedure 4 for Different Artist

Procedure 5 for Different User Level

Page 15: FinalReport_HyperCube

14

Procedure 6 for Recent Comment

Procedure 7 for Different Style Artwork

Page 16: FinalReport_HyperCube

15

Procedure 8 for Different MediumTech Artwork

Page 17: FinalReport_HyperCube

16

TriggersA trigger is a procedure that initiates an action when upon an event. Those event may be an insert, delete, and update. There are two types of triggers, which are before and after triggers. The DBMS automatically fires the trigger as a result of a data entry or modification to the table in concern. Triggers are used to maintain the referential integrity of data by changing the data in an orderly manner.

Trigger in Payment with User-Level

Triggered after insert a payment record

When insert a payment record in the table payment

➨ update the U_level=2

➨make the user could see more number of artworks

triggered after delete a payment record

when delete a payment record in the table payment (which means the cancel a payment)

➨ update the U_level=1

➨make the user could see less number of artworks than before

Page 18: FinalReport_HyperCube

17

Trigger in Comment with User-Activist

Triggered after insert a comment record

When insert a comment record in the table comment

➨ update the U_Activist= U_Activist+1

➨make the user could use this activist points to do some activists in the VR

Triggered after update a comment recordWhen update a comment record in the table comment

➨ update the U_Activist= U_Activist+1

➨make the user could use this activist points to do some activists in the VR

Page 19: FinalReport_HyperCube

18

IndexThe database index is a data structure that improves the speed of data retrieval operations on a table. Four index included in this table of Artwork, User, Art owner, Payment can search information quicker.

Create Index on Art owner table, we can get information about Art owner much quicker.

Create Index on Payment table, we can get information about payment much quicker

Page 20: FinalReport_HyperCube

19

Create Index on User table, we can get information about user much quicker

Page 21: FinalReport_HyperCube

20

TransactionWe use transaction syntax every time we insert data into the table.

Here is an example when we add data into the MediumTech table.

START TRANSACTION;

USE `VR`;

INSERT INTO `VR`.`MediumTech` (`Tech_Code`, `Name_Tech`, `Description_Tech`) VALUES ('OC', 'Oil on canvas', 'Description_Tech');

INSERT INTO `VR`.`MediumTech` (`Tech_Code`, `Name_Tech`, `Description_Tech`) VALUES ('OP', 'Oil on poplar', 'Oil painting on a poplar wood panel');

INSERT INTO `VR`.`MediumTech` (`Tech_Code`, `Name_Tech`, `Description_Tech`) VALUES ('P', 'Portrait', 'NULL');

INSERT INTO `VR`.`MediumTech` (`Tech_Code`, `Name_Tech`, `Description_Tech`) VALUES ('F', 'Frescoes', 'NULL');

INSERT INTO `VR`.`MediumTech` (`Tech_Code`, `Name_Tech`, `Description_Tech`) VALUES ('M', 'Marble', 'NULL');

COMMIT;

Users and Privileges

We have a variety of roles that is made up of certain privilege that can be used to give our users different access.

Page 22: FinalReport_HyperCube

21

CEO:

Own the database.

Have all privileges for the database.

CFO:

Have access to all tables.

Only select data from tables.

System Admin:

Have access to all tables, views, procedures, triggers and anything else.

Museum Manager:

Have access to all tables that is related to the museum itself.

Can select, insert, update and delete.

Financial Manager:

Have access to tables and views to all tables about payment.

Can select, insert and update.

Artist:

Have access to tables about their own work and information.

Can select and update.

User:

Page 23: FinalReport_HyperCube

22

User has 3 privileges.

Users are our museum visitors; they can select all tables and views about our museum, artwork and artist.

Users can leave comments; they can select and insert to table and view in comment part.

Users can make changes to their profile; they can select, insert and update in user profile part.

Back up

Backup plan is shown below.

For every week, make full backups on Tuesday and Friday at 11:00pm – 5: 00am (next day), the other days of the week make incremental backups at 12:00pm – 2:00am (next day).

For every month, make full backups on 15th and 30th. If 15th (or 30th) is just Tuesday or Friday coincidentally, then use that day’s full back up as the month full backup. If not, make new backup for the month backup. In addition, the weekly backup won’t not be affected by the monthly full backup (like 30th, it still needs to make an incremental backup for the weekly backup).

Sunday Monday Tuesday Wednesday

Thursday

Friday Saturday

1

IB

2

FB

3

IB

4

IB

5

FB

6

IB

Page 24: FinalReport_HyperCube

23

7

IB

8

IB

9

FB

10

IB

11

IB

12

FB

13

IB

14

IB

15

FB(IB)

16

FB

17

IB

18

IB

19

FB

20

IB

21

IB

22

IB

23

FB

24

IB

25

IB

26

FB

27

IB

28

IB

29

IB

30

FB(IB)

Page 25: FinalReport_HyperCube

24

Unity 3D Program

IntroduceBecause our topic is “Virtual Reality Exhibition Hall”, we decide to apply our database on a real Virtual Reality program, then our 3D program was born.

At the beginning, we found that Google developed a solution to realize the theory of 3d imaging, named as CardBoard. Then when researched the realization of Cardboard, we found that Google supply the SDK based on Unity 3D. Everything was all set, why don't make one. However, not everything is all set…

First, the application of Unity 3D based on the knowledge of Unity 3D, which is a complicated program. Second, the development of a 3D program stands on the knowledge of 3D design and computer game design, including scene, gameobject, transform, quaternion, material, texture, rendering, etc. Third, the interaction between gameobjects, and the trigger of game event all realized in script. We choose to use C# to realize it, for the following reasons. 1, much more programmers use C# as their Unity languages. 2, many tutorials on the Internet all write by C#, and I need to learn C# as a freshman. 3, many powerful features of C#let it better at in-depth development.

Finally, we realized that real-life program all appliedtheir database remotely, so we installed MySQL in Linux (Ubuntu) as a server, and input our database into the server. Then the remote accessing is realize by setting database user privileges. By granting user privileges at an

Page 26: FinalReport_HyperCube

25

IP range, our database can be accessed in by devices in subnet.

Program Parts DetailUsing System.Data.dll and MySql.Data.dll as library

Because we set our database at the Linux, so we use the GUI in Unity 3D to get the connection Information including server IP address, user name, user password, database name.

Page 27: FinalReport_HyperCube

26

Try to use this information to make connection. If successful, use the function ReadUserInfo() in script LoginGUI.cs to get user information.

Then compare the input of user name and user password with the user information in database, if match, transfer the

Page 28: FinalReport_HyperCube

27

user level and connection information to next scene and load function ReadFig.cs.

ReadFig.cs execute the connection function related about database, so that it can get the info of pictures. Then applies many function of Unity 3D to Instantiate gameobject, texture the gameogject clones, set the sizes, positions and rotations these clones. Finally, update the database with the clone’s location

Page 29: FinalReport_HyperCube

28

Page 30: FinalReport_HyperCube

29

Future Scope and Conclusion

DisplayBinocular stereo vision played an important role In VR systems. Different images are generated respectively and displayed on different monitors. When users wear special glasses, one eye can only see the odd frame image and another eye can only see even frame images. The difference between odd and even frames produces a three-dimensional. Because there are six dimension in three-dimensional space,it is difficult to find a more intuitive approach to map the mouse plane motion to an arbitrary three-dimensional space. So some more complex devices to provide six dimension such as 3Space digitizer and Space Ball are needed.

SoundWhen sound runs to different ears, the time or distance are different.

So People determine the direction of the sound source difference by the sound phase difference. So there will be a sense of direction. But in the VR system, the movement direction of the sound has nothing to do with the user's ears. In the future, more complex technology is needed to show real sound.

Voice

Page 31: FinalReport_HyperCube

30

Voice input and output of voice are still important in the VR system. That requires a virtual environment can understand what people say and real-time interaction with people. However it is pretty hard to make computer recognize people language .Because there are multilateralism and complexity in voice signal and natural language signal.