Skip to main content

1st AR Project

Hello everyone,


We are a group of software engineering students: Yassin Aden, Pau Francino, Boris Llona and Roger Weber. We are taking a Mixed Reality course at VIA University in which we will learn about both Augmented and Virtual Realities from a practical approach.

In this DevBlog we will keep you updated on every step we take.


On our first project we have been assigned to do a basic AR game to get in touch with the technologies involved. This project is to be done using Unity5 to develop the game, and the extension "Vuforia" to display AR objects on the image targets. As none of the group members had any previous experience with those programs, we had to follow some online tutorials to learn the basics.


After a brainstorming session we collected the best ideas, evaluating them in terms of practicability, creativity and effort needed, and finally selected the idea we all liked the most taking in account the 2 weeks time limit: an Augmented Reality Air Hockey video game.


In order to get started with the game, we planned the project procedure, listing the steps that needed to be done:

  • Creating Game Objects

  • Applying physics

  • Creating Movement Scripts

  • Print the QR codes for the AR recognition

  • Apply 3D animations to the markers

  • Develop Game Logic


After learning the basics we still needed more specific knowledge, which we got from 2 videos we found on youtube. A 2D Air Hockey Unity tutorial where we learned how to actually build the game, but we had some problems with the renderer, as we were using 2D oriented methods as an example, so we also used a 3D AR Pong game tutorial to adapt it to the 3D space and furthermore for the Augmented Reality visualisation.


Moving on to the actual process of creating the game, we needed the following objects:

  • Background: No physics

  • Wall: Not movable, not controllable, rigid body

  • Ground: Not movable, not controllable, no friction, rigid body

  • Puck: Movable, not controllable, no friction, no gravity, rigid body

  • Player: Movable, controllable, rigid body


To be able to implement and customize the behaviour of the game elements we used the following scripts:

  • ResetBall():


    
        This script is called when the game starts and every time a goal is scored, it places the ball in the
        middle and gives it a movement towards a random direction in a given range.

  • Update() for the Ball:

        This script is executed every frame, it updates the position of the Ball

  • OnCollisionEnter():




        This script is responsible for the Ball's behaviour whenever it collides with any other object in the
        game, including the goals.

  • Update() for the Player:



        This script not only updates the players position but it keeps the camera attached to the particular         player to keep track on it by raycasting.


Finally, we added the AR functionality using the Vuforia extension following the indications on Unity's webpage.


This is how the game looks like:



The link to our work is the following: https://github.com/Yasin-0109/AR-AIR-HOCKEY-Game That's all for our first project, we will be posting new cool stuff every week about Mixed Reality.







Comments

Popular posts from this blog

2nd AR Project - LEARNING through AR! - Week 41

 Week 41 Having the main idea of the project defined, we started the second week of development organizing the tasks in our group. We all took some tutorials on how ARCore works to get a main idea and functions that might be useful. Later on we started working with interfaces, canvas and buttons and we struggled with their size and interaction. So our main idea was to have an interface in front of what the user is watching (that in this case will be the video comming from the camera) that allows them to select between diferent colors to change the colour of the wall.                                                  First version of the interface An out of scope feature that we could implement is to improve the interface offering the user the possibility to select from the whole color palette like pantones...

2nd AR Project - LEARNING through AR! - Week 40

Week 40  The second project of the mixed reality course aims to develop an educational application with Augmented Reality, with some different tools that allow us to discover the wide range of possibilities that this technology has to offer. This time we will work with ARCore and ARKit. Those tools provide us with better methods for  localization and mapping purposes.  ARKit fares better in reliable tracking and ARCore leads in mapping and reliable recovery. Besides that it  provides the developers with some usefull libraries regarding the use and treatment of color temperature and intensity .  Like any development process of a technological product we started brainstorming some of the ideas that we thought would be nice to implement as a project with educational purposes. The first idea was to show the skelleton of a person with labeled bones but we thought it was kind of classic and basic idea that has been implemented many times and it has not much logic behi...