Vuforia Workshop

Chris took us through Vuforia and how to use this in Unity.
As I had already downloaded Unity but didn't add Vuforia when installing, I had to download the Vuforia support for Unity.

We added an AR camera using the Vuforia Engine and added an ImageTarget to the camera.
We deleted the other GameObjects from the scene that weren't needed for this project.




In the project settings' XR settings we enabled the Vuforia Augmented Reality Support.


We then pressed 'Add Target' to the ImageTarget GameObject and we were automatically sent to the Vuforia site. We logged in created a project and went to the develop section and pressed, 'Get Development Key'. This gave us a free development license key. 


On the AR camera we clicked 'Open Vuforia Engine Configuration' which allowed us to insert the development key in the 'App Licence Key' section.

We then added a database to the project we created earlier and added a target to this database. 

The target we created was a single image (we downloaded an image of a lion) and added a width of 30cm.



After adding this target we refeshed the page and the status of the target became active. 
The image only had three stars because Vuforia prefers images that have more lines (vectors).




These are the points that Vuforia picked up and therefore means that the target that is displayed doesn't require colour as it is only looking for lines to display the image.
We then downloaded this database for the Unity editor and imported this into Unity.



In the ImageTarget GameObject we selected the Database and Image Target.
We added a Quad to the ImageTarget GameObject so that we could view this image in the scene.



We changed the rotation to 90 degrees and the changed the scale to fit to superimpose a video on top of the Image Target.



We then dragged and dropped the Lion video into the resources folder in our assets panel which allowed us to add this to the Quad GameObject.



We added the video player component to the Quad GameObject so that the Quad could play the video.



I videoed the final result which you can see that the lion image changes to the video clip of the lion.

Chris then showed us how to export the app build so that it works using an andriod device instead of the laptops webcam.

Comments

Popular posts from this blog

Unity Project 4: Ball platformer game

Reflective Post

[Research] Traditional Poster Design (4CTA1214)