Posts

Week 10: Project finalization

Image
VR Escape Room  Finalization We tried many ways to make the buttons pressable, and only one way worked for us, which is by using animations. So we started by creating the animation, which is a simple change in the position of the button.  Then, we only want the button to animate if the player presses it, so we need a trigger to start the animation. After creating the button’s animation, we double click on the animator to get its window. By default, the animator will look something like this: Which means that as soon as the button is instantiated, the animation will start. But we wanted to only start when the player presses it. So we replaced the default state of the button with a new empty state that we just created and we set it as default. Next thing is to create a transition between the new default state and the ButtonAnimation, and also the transition between the buttonAnimation and the default state, so, back and forth. We also create a boolean parameter to the animator t...

Week 9: VR Escape Room Implementation

Image
 Escape Room Implementation We started this week by creating the fire and the fireplace. At first, we tried to search for an asset bundle that has both, but we ended up only finding separate ones for each of the fire and the fireplace. So we first downloaded the fireplace asset and added it to the corner of the room. Then we found a cool campfire asset that we can add to the fireplace. This asset gives a really nice fire effect (lights, sparks, sounds, smoke,...) so that helped us at this point. We need the fire to be on when the game starts, and then the player should turn it off to find the key to the outer door. So we created a script for the fire, that makes it turn off as soon as the bucket collides with it. Which means that the water turned it off.  In the following snippet, you can see that if the bucket collider triggers the fire’s collider, and the bucket is full of water, the fire will turn off. Next step is to add the key to the door that the player will use to esca...

Week 8: XR Application

Image
VR Escape Room Introduction The idea was about creating an escape room for children with educational purpose. To escape the room the player needs to solve mathematical equations placed on the desk and press one of four buttons with possible solutions.If the correct button will be pressed, the water will start running from the tap. Next step is finding the bucket and filling it with water from the tap. When the bucket is full, the player needs to put water from the bucket on the fire in the fireplace. After that, the fire stops and the key appears instead. Player needs to grab the key and walk to the door. When the player is close enough to the door, it opens and a “Congratulations” message is displayed. The game finishes at this point. The following figure shows how we planned the game to be like: We figured that since the target users of this escape room are little kids, the theme should be appropriate, and especially at a young age, every child’s dream is to escape a classroom, so we...

Week 7: VR Finalising project

Image
VR Beat  Saber  Finalization This week, we had to finalize and test the game. We also wanted to make the scene and the objects looks nicer and more realistic, so we tried to add shades as the following: Post processing: To avoid the colors looking too opaque, we wanted to add some shades and light. So we downloaded the Post Processing package, and we added the post process layer and volume to the CenterEyeAnchor. In the layer, we set the layer to PostProcessing. In the volume, we added the pp profile, and there we added some effects, like Blur, Color Grading, etc..  The Post Exposure which is found under Color Grading effect, is the option that we changed the most, since it really gave nice effects to the scene. In the lighting settings, we added fog and we set its color as blue, and we also checked the auto-generate checkbox, which is found under Debug Settings. Testing and fixing: After we added the VR Integration, the sabers didn’t work as intended, so we first replace...

Week 6: VR Implementation

Image
 Beat  Saber  Implementation This week, we started by creating the floor and a room using cubes. To get the color of the room in black from the inside and outside, we set the material settings to this: We also added some lines to the scene to make the room look pretty: Now we create the boxes that the player will hit, and we tried to make them look like the ones in beat saber: Both boxes are prefabs so we can spawn them in the game. Now we need the boxes to move forward, so we create a script for the boxes and under the update method, we add a line of code that will do so. Here we are using a velocity of 2 meters by second, by multiplying the position by time.deltatime by 2: So we add the Spawner, we do so by adding an empty GameObject and add a new script to it. The Spawner script will have the logic to spawn the boxes. The script will have two arrays, one with the boxes prefabs, BLUE and RED, and one with the place holders of where the boxes will be spawned from. It als...

Week 5: Virtual reality Introduction

Image
IDEA We started our work with looking for ideas for our VR project. After watching a few videos on YouTube and downloading and playing some demos to get inspiration, we decided we would like something that will make us move and will be 100% involved. Initial idea was the game with objects moving fast towards the player. The player should move in a way to avoid being hit by the moving object. After considering all pros and cons, we realized that if we go with this idea, we wouldn’t really use the controllers. That is why we decided to change “escaping” from the objects into hitting them. The final decision was to create a game with principals of “Beat Saber”. The player is keeping red and blue sabers and needs to hit the moving red and blue cubes that are positioned in different angles. The red objects should be hit with red saber in the right direction and the same goes to the blue. SETTING UP UNITY AND OCULUS SET After choosing the idea we started to set up OCULUS device. We used alre...

Week 4: Markerless Implementation and Finalisation

Image
Markerless Virtual Worlds At this point, we have some of the project done and running, such as detecting planes and displaying the portal on the new plane, now we have to work on travelling to Paris when the user enters the portal. First, we start by finding a suitable 360 video, that we be the virtual world behind the portal. We found a video that is about Paris and it shows the main attractions there plus captions of what landmarks they are showing at the moment, which is really cool, so we downloaded it and imported it to the assets in our project. Our goal now is to add the video to the scene, and since it’s a 360 video, a sphere is perfect to have the video playing on the circumference of the sphere.  So we created a sphere and we scale it up to 50, so it becomes the new virtual world. We attach a Video Player component to it and add our video as the Video Clip. Now, the video is playing on both sides of the portal, but we want it to only play on the other side, to do so, we s...