Project 3: Welcome to your world: Choose, create, and play!

02 December, 2019




In this VR application, the user starts off in a room ready to pick from options to form the kind of world they want to be in. Once the user enters the world they have created, they can choose to interact with objects, play a mini-game, or just laze around. My favourite option remains watching television on the beach while the sun sets. The user can exit out and change the environment and add-ons available in that environment retaining the placement of things, i.e if you move the beach chairs in the island to a corner and then exit out and move into the indoor space selecting beach chairs, you would find it at the same corner. This is done to ensure everything is not reset and required to be arranged again.


Demo Video:




Source Code: Github link

Downloading and setting up the project to run:

Please download the source code from Github.
Make sure you have Unity installed or download it here. I have developed this on Unity version: 2019.2.8f1
  1. Download the zipped files from the master branch
  2. Unzip the files into a directory of your preference
  3. Navigate into the unzipped folder, it will be named 'World_Project3'
  4. Unzip the VRTK folder and save it in the Assets folder
  5. Open Unity Hub --> click on Add--> Select the folder 'World_Project3' and click on Ok
  6. In the project hierarchy, go to Assets-->Scenes and open the main.unity file

To run the application on the Vive, make sure 'SimulatedCameraRig' is unchecked and 'UnityXRCameraRig' is checked before clicking play.
To run the application on the simulator, make sure 'UnityXRCameraRig' is unchecked and 'SimulatedCameraRig' is checked before clicking play.
The first time the application is installed, it takes time to compile and set up. Please bear with it.


Details about the project:

The application let's the user pick the world they wish to reside in, time of the day, and add extra objects that are not native to the environment selected. While selecting extra items, only the items not native to the environment are shown. For example, the user can pick an indoor space as their environment and then add tigers to the space. Once they are in the world, the user can interact with the objects.

Initially the user ends up in small rooms where they have to select an option by touching a box and then pressing the red button to get to the next room. In all, there are four rooms and in the second room onwards, the user has to select options. The flow of the application is as follows:

Room 1:
In room 1 the user presses the red button on the door to enter the game. It is a staging area and will serve as an entry point when the user wants to switch between environments as well.

Room 2:
In room 2 there are three boxes lying in front of the user. The user selects an environment by touching a box. The following options are available to the user:
Room 3:
After pressing the red button and exiting out of room 2, the user then moves to room 2 where they find two boxes. Selecting one of them will set the backdrop depicting the time of the day. The options provided are: Cloudy backdrop is the default option.

Room 4:
In room 4, the user gets to choose items to add to their that are not native to the environment chosen but are present in the other two environments. For example, sandcastles are not native to an indoor space but the option will be available to the user to add it. The user will have options from the following:

If the user does not choose to add any extra items in their world, then the default scene will be created with the objects relevant to that scene.
  1. Forest:
    • Baby Elephants [available as an add-on for the Island and Indoor Space]
    • Tigers [available as an add-on for the Island and Indoor Space]
    • Deers [available as an add-on for the Island and Indoor Space]
    • Trees
    • Game: throw the ball at the target
  2. Island:
    • Sandcastle [available as an add-on for the Forest and Indoor Space]
    • Huts [available as an add-on for the Forest and Indoor Space]
    • Ship in bottle [available as an add-on for the Forest and Indoor Space]
    • Beach chairs [available as an add-on for the Forest and Indoor Space]
    • Palm tree
    • Volleyball net
    • Game: Hit the target
  3. Indoor Space:
    • Television [available as an add-on for the Forest and Island]
    • Gym equipment [available as an add-on for the Forest and Island]
    • Sofa set [available as an add-on for the Forest and Island]
    • Desk and chairs [available as an add-on for the Forest and Island]
    • Coca cola vending machine [available as an add-on for the Forest and Island]
    • Game: bowling



Navigating through the Space using buttons:

While you can physically walk around in the space, you can also teleport and use the controller buttons to interact and play with objects in the space. You can use the buttons for the following:


Tools Used:

Interactions:

Most objects in this game are interactable. Touching, moving, grabbing are possible. All objects in this world do not follow the laws of gravity, just as you can't pick up animals such as baby elephants in the real world.

The interactions are as follows: At the start- in the game room where you choose options
  1. Touch each red button to open the door. There are four such buttons. The doors that can be opened are identified by a brown color and red button on it.
  2. Touch a box present on the tables to choose that option to be added to your world. Touching the box will emit a red glow around it
Default Indoor Space
  1. Grab the headphones to hear the music that is playing on it. You can move it around as well.
  2. Touch, move, grab, throw the red mug
  3. Touch, move, grab, throw the fruit basket
  4. Touch, move, grab, punch the punching bag in the gym equipment
  5. Touch the vending machine to get a can of Coca-Cola and hear the sound that comes with it.
  6. Touch the television to watch a show
    The television has two shows- split into half, whichever side you touch will start that show. Touch it again to stop playing.
  7. Game: Bowling. Pick one of the balls on the side and throw it at the pins to make them fall and hear the sound.
Default Forest
  1. Touch, move, grab the deers. You will hear a sound when you touch it.
  2. Touch, move, grab the tigers. You will hear a sound when you touch it.
  3. Touch, move, grab the baby elephants. You will hear a sound when you touch it.
  4. Game: Hit the target- Pick a ball and aim at the target and hear the sound
Default Island(beach)
  1. Touch, move, grab, throw the beach chairs
  2. Touch, move, grab, throw the huts
  3. Touch, move, grab, throw the sandcastle
  4. Game: Hit the cans! Pick a ball and throw it at the cans to make them fall and hear the sound.


Screenshots

--------------------------------------------------------------------------------------
Game room- starting off and creating your world
--------------------------------------------------------------------------------------


Start of the game- Ready?


Room where you can choose a scene- forest, island/beach, or an indoor space


Next options: Do you want a cloudy bright day or want to watch the sunset?


Final options: Picking items to add in your world



--------------------------------------------------------------------------------------
Default Indoor Space
--------------------------------------------------------------------------------------


Indoor space


Showing the bowling game, sofa set, TV, gym equipment


Exit sign



--------------------------------------------------------------------------------------
Default Forest
--------------------------------------------------------------------------------------


Forest view with animals


Forest view with game view


Plain forest side


Way to exit out of the forest



--------------------------------------------------------------------------------------
Default Island
--------------------------------------------------------------------------------------


Island with chairs and exit


Items available at the island


Huts and games


Full view with palm tree



--------------------------------------------------------------------------------------
Customized environment
--------------------------------------------------------------------------------------


Sofa set in forest


Vending machine in forest


Animals and television at the island



Assets used

Environments:

  1. Forest :Source
  2. Island :Source
  3. Water: Source
  4. Indoor space & starting room space :Source
  5. Exit Sign :Source
  6. Arrows: Source
  7. Sky: Source

Island

  1. Sandcastle :Source
  2. Bottle in ship :Source
  3. Beach chairs: Source
  4. Volleyball net :Source
  5. Small table:Source
  6. Coke cans:Source
  7. Huts: Source
  8. Palm tree:Source
  9. Balls :Source

Forest

  1. Baby elephants :Source
  2. Deers :Source
  3. Tigers: Source
  4. Target :Source
  5. Balls :Source

Indoor Space:
  1. Table: Source
  2. Chairs: Source
  3. Button: Source
  4. TV: Source
  5. Fruit basket: Source
  6. Vending Machine: Source
  7. Coke can: Source
  8. Sofa Set :Source
  9. Painting :Source
  10. TV: Source
  11. Martial arts kick bag :Source
  12. Chest press :Source
  13. Gym weights :Source
  14. Red Mug: Self
  15. Headphones: Self
  16. Bowling pins: Source
  17. Balls :Source


Sounds:

The following sounds have been taken from YouTube's audio library
  1. Background score for the game room (Staging area): Summer by JHS Pedals
  2. Background score for the indoor space: Happytoseeyou by Sarah, The Illstrumentalist
  3. Background score for the forest: Happytoseeyou by Sarah, The Illstrumentalist
  4. Song playing on the headphones: Summer by JHS Pedals
  5. Swoosh: Source
  6. Car cruising hand out window: Source
  7. Aluminium can crunch series: Source

The following sounds are taken from soundbible
  1. Background score for the forest: Source
  2. Background score for the island: Source
  3. Sound of the deer: Source
  4. Sound of the tiger: Source
  5. Sound of the baby elephant: Source
  6. Sound of the crowd cheering: Source
  7. Beep ping: Source


Sounds:

The following videos were used for the television:
  1. Bangkok city: Soruce
  2. Surfing: Source


Lights:
  1. Two directional lights in the starting room (staging area)
  2. One area light for each object for selection in the starting room (staging area)
  3. One directional light for the living room



The base project, including the indoor space layout, basic Unity-VR configs- Vive buttons, teleportation, few models credited above have been developed by the professor Andrew Johnson and is part of Project 2 assigned for his class CS 428



Discussion here