A virtual museum in a game-like environment

sandpaperleadSoftware and s/w Development

Oct 31, 2013 (3 years and 10 months ago)

74 views










A virtual museum in a game
-
like environment

created with Unity3D.



Student
names

Christos Baferas

Olga Beza


Student IDs and mails

(1824724) cbs750@few.vu.nl


(1828576) oba200@few.vu.nl

Course

Multimedia Project

Supervisor of
Project

P
ro
fessor
Dr. Anton Eliens

Date

May 9
th
, 2011






Index

1 Introduction

................................
................................
................................
................................
...............

3

1.2 About the application

................................
................................
................................
.........................

3

2. Imple
mentation features

................................
................................
................................
..........................

4

2.1 Terrain

................................
................................
................................
................................
.................

4

2.2 Player Character

................................
................................
................................
................................
..

4

2.3 Game objects and models
................................
................................
................................
...................

4

2.4 Graphical user interfaces and menus

................................
................................
................................
.

5

2.5 Textures and graphics

................................
................................
................................
.........................

6

2.6 Scripts

................................
................................
................................
................................
..................

6

3 Interactive Objects

................................
................................
................................
................................
.....

7

4 Difficulties and problems

................................
................................
................................
...........................

8

5 What we gained

................................
................................
................................
................................
.........

9

6 Future Work

................................
................................
................................
................................
...............

9

7 References

................................
................................
................................
................................
.................

9














1 Introduction

This report is concerned with the documentation of
the “Rockaway Beach virtual museum for Rock and
Roll”. The project is fulfilled for

the needs of the Multimedia Project course, VU Amsterdam. The goal of
this project was to create a
n

interactive virtual space that resembles a museum wrapped in a game
-
like
environment.
The theme is about music and music artists.
Users are able to navigat
e into the scene and
interact with game objects in order to find
and
retrieve information about music artists.
An additional
goal was to investigate how deep the implementation of such a project could go, using just the freeware
version of Unity.

1.
2

Abou
t the application

The project was implemented using
the free version
Unity3D
3.0
as the main tool.
Unity

is an
integrated

authoring platform

for creating 3D

video games

or
other interactive content such
as

architectural visualizations

or real
-
time 3D anima
tions.

The nature of the project required additional

image processing
which was performed using Photoshop and GIMP. Finally t
he 3D
models were
designed in 3dsMAX or retrieved from the

Internet
and available
Unity assets.

Assets include the entire
collection of
object
s
, prefabs, models, textures, scripts and components used
in the project.
Unity introduces
Game Objects a
s

abstract types of entities that are used for bringing any
item on the virtual world

of the application
. The main
G
ame
O
bjects
tha
t consist the

Rockaway Beach
hierarchy
are the following:

Game Object Name

Description

AmpBuidling

Contains the building model as well as any related items
of

the interior
design
of the building.

Artist Frames

Contains all the interactive frames and

the required items
, textures,
models and scripts
that implement the Rock’n’Roll framed artists.

Lights

Contains all the lights placed in the
virtual world.

Outdoors

Contains all the object
s

and
models placed in the outdoors environment of
the museum.

Player

Contains the camera, the character and the scripts that
animate the player
model.

Terrains

Contains the
various
terrains of the scenery.

TouchScreen

Contains all the items and scripts of the interactive information hotspot,
located next to the
entrance desk.

Various Objects

Contains any other object, furniture or 3d model.



2.

Implementation

features

2.1 Terrain

The terrain was created from scratch using Unity3D terrain editor and the Unity3D Terrain toolkit plug
-
in. (available at
http://unity3d.com/support/resources/unity
-
extensions/terrain
-
toolkit
). The terrain
editor is a nice and easy way to form a realistic looking terrain, as the available tools
are intuitive

and
easy to use. The application terrain is consisted from two separate terrain objects. One is the main
terrain where all the objects and building are found, while the second one is shaped as a volcano
containing a particle smoke system
and
serves only decorative purposes.


The arrangement
and texturing
of the outdoors space

was also made using the Unity terrain toolkit

brushes
.
The visual effect is the result of blending various textures together with different opacity levels
applied to ea
ch of them. Other e
lements such as,

grass, trees, rocks, wind
and water were imported
from the standard asset
Unity package
. Trees and rocks were
additionally
modified in order to add
collision detection feature. The sky was created using the prefabricated

Skybox asset, and modified to
out liking.

The sunny skybox
is

a big cube
that embodies the entire scenery
. Each side of the cube has a
picture attached, thus giving the illusion of a natural
sky
.

2.2 Player Character

The user is able to navigate throughout the scene using a first person style controller. Unity offers a
ready prefab for the controller
(called
FirstPersonControllerPrefab
)
as well as all the necessary scripts
that implement movement and physics. The chara
cter asset options were afterwards modified in order
to give the character the intended behavior. The user is able to move the character model, jump and
look around using the arrow keys, space bar and mouse respectively.

2.3 Game objects and models

3D mo
dels were both fabricated using 3DsMAX and Blender or found and imported from available
models from the Internet. The idea for designing the main building was to create a structure that
resembles a large guitar amplifier and it was solely designed in 3dsMA
X.
The main methodology used
was box mirror modeling.
Other
models

include va
rious furniture objects, rocks
, stairs and outdoors
objects.



2.4 Graphical user interfaces and menus

All the GUIs were designed and created using
a combination of
Unity
GUI
Text and

GUI Texture

objects.
The scripts attached to the GUIs are written in JavaScript. The technique used for navigating through the
different GUI options is implemented by switching scenes corresponding to the player’s choice.
The
player can choose to
enter the virtual museum, read the about section and find instructions how to play
the game
. As soon as the player presses the button, the application loads the scene. For example, the
button “About” will load the
separate about scene.



Unity3D offers a

variety of different GUI components such as buttons, labels, windows, tooltips and text
areas. Valuable insight on how to create GUI elements was found in the Unity GUI Scripting Reference
Manual and Unity GUI tutorials located in Unity3D website.

2.5 Te
xtures and graphics

Many of the images being used in the project were found and retrieved from the Web
. Additionally,
Unity
offers a small collection of tillable high quality textures like grass, rock and dirt
;
M
ost
images
required the proper manipulation

and modification to achieve the desired aesthetics. For example, the
images seen on the graphical user interfaces had to be blended together using a number of different
pictures and appliance of various filters.
In other images, it was required to remove
letters and patch
patterns in various spots.
Other textures, as for example
,

the brick texture applied in the walls of the
main
building, had to be made from scratch in order to create a uniform looking texture and avoid
variations in color and shading as

found in freely available brick textures.
Image manipulation was done
using either Photoshop or GIMP.

Furthermore,
due to their shapes, many objects c
ould not

just be assigned a wrap texture on their
surfaces. Also, differences in resolution and tilling
required the creation

of
custom materials using either
Unity3D or 3dsMAX in order to give color or texture to specific surfaces and objects. Some examples
of
various textures and graphics found in the application are shown below:



2.6 Scripts

The scripts

that control the behavior of the character as well as the application mechanics were either
imported from Unity assets or written in Javascript. The scripts are categorized into folders according to
their functionality.

Script Folder

Description

StartGUI

Contains all the scripts used to control and create
the initial application GUI.

Touchscreen

Contains all the scripts that implement the
functionalities of the information hotspot.

FramePictures

Contains all the scripts that implement the
functi
onalities of the interactive portraits.

Rest

Contains the general purpose scripts of the project

3 Interactive Objects


In the entrance of the museum the user can find an info
screen
.
By pressing the button the user is
transferred to a new scene where he

sees only the “touchscreen”.

From there he is able to

type

names
of bands and artists and retrieve their biography .To implement this function we created
the
phpservice.php file that invokes the las
t
.
fm AP
I

and retrieves bio
graphies

of artists

from an xml

file that
the API returns
. On pressing the button
search

unity sends the keywords to the php file. The php

file

fetches the data from Lastfm and the results appear on the screen.

This connection is achieved with the
following method. The whole procedure r
esembles an Ajax request and it is simple to implement. An
example of the script that send the request is shown below:


Around the walls of the museum there are pictures of the most important representatives of rock and
roll music. The user can interact with them pressing a button at th
e bottom of their frames. Once
pressing it a GuiWindow appears on screen giving more information about the singer

(
information

was
taken from

http://www.rockhall.com)
.
Additionally, when the user comes close to a certain distance, it
triggers a relevant so
ng
of each artist
to play

along
with a

popup window that displays information
about the song.
To close the pop up
w
indow and continue the tour around the museum has to press the
x button on the right upper side of the window.


4 Difficulties and problems


During the implementation period of the project we met a number of related problems and difficulties
either having to do with the restrictions that the free version of Unity imposes or functional
/
methodological
issues.
For example, the free version of Un
ity does not support video playback, a fact
which held a few ideas back.
Despite the fact that there are numerous tutorials and resources
concerning Unity, many of them were unrelated or non intuitive. The most difficult and frustrating part
was understand
ing the Unity platform from the beginning without any previous knowledge.
The Unity
application itself also crashed or erroneously functioned from time to
time;

leading to some minor loses
of progress and loss of time. Additional difficulties also occurred

from learning to use 3dsMAX from
scratch. Designing the building was a more difficult task that we initially predicted and the final result
came only after some failed attempts took place. Additional effort was given for designing a character
model from s
cratch as well. Again, this task proved to be more taunting than we initially predicted.
Finally we scraped the custom character for a Unity premade asset. Finding proper resolution for images
and textures had also been causing problems. The brick texture
of the building, despite being correctly
designed in Photoshop, presents some minor glitches and visual flaws. This might be a problem of the
building geometry of the building, as when imported from 3dsMAX to Unity, the building losses some
geometry specif
ications of its initial design. Another difficult part was to generally figure out and follow
a proper methodology for creating the project. This had ei
ther to do with Unity and learning to
manipulate and control objects in a correct way, or with MAX and l
earning how to design using different
techniques.
Finally, with an exception of a few free musical instruments related models, most models
were for sale in high prices. Thus the idea of decorating the museum with various instruments was
abandoned.

In the

current phase, the project still suffers from some bugs and imperfections:

-
Ideas involving video playback were not implemented and scraped.

-
The process of designing the various GUI’s has been difficult and overall troublesome. We were also
designing an
interactive Timeline feature, which proved to be harder than expected. The timeline
feature is still incomplete and has not been attached to the project.

-
The information that is retrieved from LastFM contains hypertext code that cannot be interpreted by
U
nity. As a result the text returned from queries might contain hyperlinks. Additional problems with the
LastFM API included not being able to search for
specific band names. For example, when searching for
Motorhead, the API does not return any result.

-
V
isual glitches and artifacts can be located to various graphics.

5 What we gained

Implementing the virtual museum using Unity was a rather enjoyable and beneficial procedure. To start
with we became familiar with 3dsmax and basic creation and manipulation
of 3d objects.
We explored
various methodologies for creating models and materials.
Exploring Unity has also been a beneficial
experience as well. In comparison with previous OpenGL projects, the overall procedure was much
easier and straightforward.
This
was
the

first time we dwelled into creating a 3D game
-
like environment
and even though the result is far from perfect, we believe that this effort gave us valuable experience in
this domain.
We found knowledge through various tutorials and examples as ther
e are numerous
resources found on the Internet concerning developers of different skill levels.
Finally, it was a nice
opportunity to refresh and master our Photoshop skills

even

further.

6 Future Work

There are improvements that could be developed in f
ur
ther stages of this project,
as well as extra
functionalities that can be added in future stages of the project:

-
Add Gui with timeline
that presents the history of Rock and roll from its earlier stage till its pick.

-
The user can have more flexibility choosing transition between 3rd person and first person shooter.

-
Addition of video elements.
(Requires Unity Pro)

-
Improve the overall
vis
ual
appeal of the project.

-
Added functionalities such as mini games

and quizzes
.

7 References

[1] Unity 3D Video Tutorials : www.unity3dstudent.com/

[2] 3ds Max tutorials :http://www.creativecrash.com/3dsmax/tutorials

[3]
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12754609&linkID=9241175

[4] Unity Script Wiki:
http://www.unifycommunity.com/wiki/index.php?title=Scripts

[5] Unity Scripting Reference:
http://unity3d.com/support/documentation/ScriptReference/index.htm
l

[6] Various tutorials for Unity, MAX, Photoshop etc:
http://cg.tutsplus.com/

[7] Free 3D Models:
http://www.3dmodelfree.com/
,
http://archive3d.net/
,
http://artist
-
3d.com/