AR: How to Appear on the Daily Prophet Like Harry Potter
By Arshiya Sayyed
If you have watched the Harry Potter series, you will definitely remember the scene below where Harry reads the news about “Dumbledore’s Dark Secrets” on the Daily Prophet. Even though that was done through magic in the story, today we can actually do the same thing using Augmented Reality. In this augmented reality tutorial, I will show you how to do the same thing using tools like Unity very easily.
- Unity (5.4.1 64 bit)
- Vuforia for unity
- Video Player
- Daily prophet newspaper image.
- Video to augment.
Steps for this Augmented Reality Tutorial
Create a new project in Unity.
Import the downloaded Vuforia Package (Here is a Vuforia tutorial for beginners if needed).
Drag and drop the AR Camera prefab (type in AR Camera in the search bar to locate it) and drag and drop the image target.
Delete the main camera by selecting it and pressing delete.
Generating a License Key for Your AR Camera
You will need to create an account on Vuforia and log in. Navigate to ‘Develop’ section and click on ‘Add License key’.
Select Project type as ‘Development’ and specify the Application name. Click on ‘Agree to terms and conditions’ on the next page. You can see its name in the list of license keys, select it and you can see the license key generated.
Paste this key into the AR Camera license key box which you can see by selecting AR Camera and clicking on ‘Open Vuforia Configuration’ on the right side of the screen.
Now we need to specify the image to augment our video on, to do this first we need to download the data set:
Select your data set and click on ‘Add target’. Browse to select the image you want to set (don’t forget to download Harry Potter’s Daily Prophet images) and set width to 1. Select the database and click on ‘Download Database (all)’.
Now import this data set into Unity. We activate this data set by selecting image target and setting the database as our downloaded database.
Now activate this in AR Camera as well.
Now go to Assets->Import new asset and select the video and c# file (playvideo.cs) and import it (link to video and C# script given at the end).
Right Click on Image Target ->3d object->plane.
This will create a white plane on the marker, adjust it to fit the rectangular shape on the image as follows.
Now drag and drop the video and C# script on the plane (check if orientation is proper if not rotate it by -180 degrees to align it properly). And the last step of this augmented reality tutorial is to just press the play button on the top and hold the printed image marker in front of your webcam to see the preview as follows.
You can see the video playing on the image which makes it look like the images on the paper are in motion, giving it the feel of ‘Daily Prophet’.
And with that, you are ready with your own Daily Prophet version. Try doing it with different images and different videos. Feel free to ask if you have any questions regarding this augmented reality tutorial by commenting below. All the best, have fun!