Apr
25
2019
25
2019
Simple Image Tracking AR Android app using Vuforia
An article by mgear
2 Comments
How to build simplest possible android AR app in “few” steps. ( No coding at all! )
- Download Unity 2018.3.x https://download.unity3d.com/download_unity/06548a9e9582/UnityDownloadAssistant-2018.3.13f1.exe
- Install with these 3 options selected: [x] Unity, [x] Android Build Support, [x] Vuforia support. *Visual studio might be listed here also, if you don’t already have it, install that also.
- Start Unity, Create new Project
- File / Build settings… Switch to Android platform
- From Player Settings, do all these:
- XR Settings / Enable [x] Vuforia Augmented Reality Support *If you didn’t install Vuforia plugin initially, it should open downloader here.
- Company Name: Change it from DefaultCompany to something else, otherwise build fails
- Other Settings / Package name: Change the default value into something else, like com.myar.vuforiaar, otherwise build fails
- [ ] Android TV Compatibility should be disabled by default already (otherwise build fails)
- From Unity menu, select GameObject / Vuforia Engine / AR Camera
- “import vuforia engine assets” appears, click Import
- In Hierarchy window
- delete old “Main Camera” gameobject
- Select “ARCamera” gameobject and click “Vuforia Engine Configuration” in the inspector
- *Optional: You can click that download new vuforia engine version and install it (probably need to close unity at that point)
- In Vuforia Configuration
- Click Add License (it opens website https://developer.vuforia.com/license-manager )
- Log in or create vuforia account
- Once you are in at https://developer.vuforia.com/vui/develop/licenses
- Click “Get Development key”
- License name: whateverAR, [x] check box, Click Confirm
- From License manager list, click your newly created license name and copy that long string and Paste it into “App License Key” field in unity inspector (at Vuforia Configuration)
- Click “Add Database” (opens website https://developer.vuforia.com/vui/develop/databases?dataRequestedForUserId= )
- Click “Add Database”, give some name, Type = Device
- Click that newly created database from the list
- Click Add Target, Single Image, Width = 1 (then image equals 1 unity unit), name: anythinghere
- And for the image, select your AR target tracking image (this is the image that objects will appear into. If you dont have printer, google some image of a product that you have at your house, like some product logo, milk box side image, and crop & upload that)
- If after upload the Rating value is very low, you might have issues tracking with this marker, try something else
- Then click “Download Database All”, Select a development platform: Unity
- Double click the downloaded unitypackage to import it to your project
- From Unity Menu, GameObject / Vuforia Engine / Image (adds image tracker to scene, it should contain your marker image already)
- In Hierarchy window
- Select “ImageTarget” gameobject
- Right click over it, 3D Object/Sphere
- 3D sphere is now child of your “ImageTarget” gameobject, this means, once the tracker is detected, these child objects will become visible at this position. You can move and resize the sphere if want to. (or add other objects there)
- CTRL+S to save scene, lets say create folder Scenes/ and save ardemo.scene there
- File / Build Settings
- Click “Add Open Scenes”, to add your scene into build list
- Hit “Build” button, set output path for .APK somewhere and wait
- If you have all the necessary tools for Android development in unity, then .apk file should appear on that folder (and you can copy it to your device for testing)
- You can also click “Build & Run” if your device is connected and has developer mode enabled.
- Done! Your first AR app should now display 3D sphere when the marker is visible on device camera.
Related Posts
2 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
@unitycoder_com
My TweetsSubscribe to Blog via Email
Tag Cloud
2d
3D
AI
algorithm
android
asset
build
color
custom
demo
editor
effect
error
fake
free
game
generator
greasemonkey
indie
javascript
light
line
ludumdare
mesh
paint
particles
physics
plugin
proto
prototype
script
sea
shader
shadow
sprite
terrain
texture
tutorial
ui
unity
vertex
visibility
water
waves
webgl
Hey, I also published a tutorial on getting started with Vuforia and Unity, you can read it over here: https://www.raywenderlich.com/6120-how-to-make-an-ar-game-using-vuforia
nice, got more details there!