Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer...

13
Vuforia quick install guide Android devices and Unity 3D models edition

Transcript of Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer...

Page 1: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

Vuforia quick install guide Android devices and Unity 3D models edition

Page 2: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This quick install guide will get you started building augmented reality applications using Vuforia, a PTC Inc. product used by thousands of developers across the globe.

The way it works is you create a new digital environment where 3D model data is visualized and layered over your physical world. Imagine the possibilities….viewing augmented reality video games in your living room, touring the city of Paris and using AR information to tell you famous stories and facts about historical monuments, or helping people solve problems by giving them directions or instructional videos on how to fix something. If you are curious how augmented reality is used in industry and consumer markets, visit Vuforia’s website and see what inventors are doing with PTC augmented reality suite of tools! Required Materials

• Windows computer 32/64 bit, minimum 4 GB RAM & 6 GB storage • Android mobile device (smart phone or tablet) • Connection USB cable from phone to computer • Web camera in your PC or detachable option • Unity 3D models (free library online, see instructions below)

Page 3: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

PTC Vuforia 5.5 – Quick Installation Guide with Unity 3D Models

1. Download and install Unity Editor 5.2.4 (recommended for the sample pack) or any release up to 5.3.1:

• https://unity3d.com/get-unity/download/archive o Create a Unity ID (if you don’t have one) here. o Please note that in order to use Vuforia we advise to install Unity Editor 32-bit

version

• Run the UnitySetup32-5.X.XXX.exe file, agree the License Agreement and install it.

2. Run Unity, Sign in to your Unity ID and create a New Project.

• Name the project, then click Create Project.

• From the Hierarchy window select Main Camera and Directional Light and delete them.

Page 4: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

3. Minimize the Unity and Register on developer.vuforia.com.

• Complete all fields, read the Vuforia Developer Agreement.

• Agree the Vuforia Developer Agreement and click Register.

4. After you log into your account, download Vuforia 5.5 SDK - “Download for Unity” and save it on your computer (you will need to locate it later so a usual location would help):

• https://developer.vuforia.com/downloads/sdk

Agree the license

Next steps will apply for all the applications that you will create

5. From the Develop tab Add a License Key for your application:

• Insert the application name Installation Guide and click Next.

• Confirm License Key (thick the box and click confirm)

• Now your License for the Installation Guide application is created.

Page 5: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

6. Create a Database from the Target Manager

• Add the name and select Device, then Create.

• Click on the new Created Database and add a target to it.

The target can be any .jpg or .png you have. Here are some recommendation for a good tracking stability.

• For this example you can use this image. Right click on it and save it on your computer.

• Click Add Target and Browse for the image that you will be using.

• Add the Width of it, in this case we can use 512.

• Name the Image, then click Add.

Page 6: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

7. Check the information about your new target. The higher its rating is, the more stable your application will be.

• Open the target and click Show Features. The areas of the target without yellow marks will not be tracked, so an image fully covered will be better than one with lots of targets in the same area.

8. Go back to the Target Manager → InstallationGuide and click Download Dataset (All).

• Select Unity Editor and then download it (save it in a common location as you will soon browse for it).

• At this time you should have: the image (.jpg) file, the vuforia-unity-5-5-9.unipackage and

InstallationGuide.unitypackage

Page 7: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

9. Go back in the Unity project and from Assets → Import Package → Custom Package… browse for the folder that contains vuforia-unity-5-5-9.unipackage file and open it. After it loads, click Import.

10. Do the same for the InstallationGuide.unitypackage file.

Page 8: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

11. Under Assets you will find the Vuforia folder. Open it and then open Prefabs from it. Drag the ARCamera in the Hierarchy window.

12. Then drag ImageTarget in the same window, under the ARCamera.

13. Select ARCamera from the Hierarchy and look in the Inspector window

• Locate the Vuforia Behaviour (Script). Paste the App License Key from the Vuforia → Develop → License Manager → Installation Guide (here)

• Locate Database Load Behaviour (Script) and under it thick Load Data Set and Activate.

Page 9: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

14. Select ImageTarget and in the Inspector locate the Image Target Behaviour (Script)

• Data Set → InstallationGuide

Now If you will zoom out the Scene Window you should be able to see the image added.

Page 10: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

15. Now you need to add the 3D shape in the application, so under Window select Assets Store.

• Look in 3D Models → Vehicles → Air and lower on the page select Top Free. Mobile Planes: Small Passenger Plane can be find there. Select it, Download it and Import it.

• Go back to Scene window from the top of the graphic area.

• Locate the Small Passenger Plane.prefab on the path Assets → Mobile Airplanes → Small

Passenger Plane → Prefabs.

• Drag the Small Passenger Plane.prefab on the target image (in the graphic window), then drag it from the Hierarchy window and drop it in the ImageTarget.

• From the Inspector window set the position to 0, 0, 0; rotation to 0, 180, 0; scale to 0.1, 0.1, 0.1

16. Add a Directional Light from the GameObject → Light.

Page 11: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

17. Congratulations! Your first Vuforia AR application is finished. In order to play it you can print the image on a paper, press the Play button from the top of the graphic window and aim the webcam at the printed image.

Page 12: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

Creating the Android application 18. For this step you will need the Android SDK and the Android Studio

19. Put the Android device in developer mode (go to Settings → About phone and tap Build number seven times. Return to the previous screen to find Developer options), connect it to your computer with USB Debugging active.

20. Build the application:

• File → Build & Run opens the Build Settings. Select Android and in the scene builder Add Current (give it a name and save it)

• Press the Player Settings…

o Add a Company Name [PTC] and Product Name [InstallGuide] o Under Other Settings → Identification → Bundle Identifier replace the Company and

Product name with the ones you inserted (com.PTC.InstallerGuide)

• Press Build and Run and enjoy it on your Android device.

2.

Page 13: Vuforia quick install guide - apps.ptc.com · Welcome to the new age of product design and customer experience!! Using augmented reality you can create a whole new experience. This

Additional Resources

• Vuforia example AR experiences • Vuforia Developer Portal Library • Vuforia Developer Support Portal • Academic Program

This resource was developed by the PTC Academic Program. All rights, providisions and trademarks are the property of PTC Inc.This resource is for educational purposes only. For more info, please contact us at: [email protected]